Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup lts patch #1653

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .ci/environments/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Environments CI scripts

This folder contains update scripts which would be called for a specific environments.
19 changes: 19 additions & 0 deletions .ci/environments/quarkus-lts/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# How to create a patch from a revert commit ?

**NOTE:** Execute those commands at the root of your project

First, set the variables to be used (change the values):

``` bash
commit_id={COMMIT_HASH}
patch_name={ANY_MEANINGFUL_NAME}
```

Finally, create the patch file:

``` bash
git revert --no-commit ${commit_id}
git commit -m "Revert ${patch_name}"
git show $(git rev-parse HEAD) > .ci/environments/quarkus-lts/patches/${patch_name}
git reset HEAD~1 --hard
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
diff --git a/modules/kogito-swf/devmode/build-config/module.yaml b/modules/kogito-swf/devmode/build-config/module.yaml
index 5c72abf3..ed171a73 100644
--- a/modules/kogito-swf/devmode/build-config/module.yaml
+++ b/modules/kogito-swf/devmode/build-config/module.yaml
@@ -9,4 +9,4 @@ envs:
- name: QUARKUS_EXTENSIONS
# NOTE: If you change the QUARKUS_EXTENSIONS value remember to update the scripts/logic/build-quarkus-app.sh too!
# Follow up issue to remove KOGITO_VERSION: https://issues.redhat.com/browse/KOGITO-9270
- value: kogito-quarkus-serverless-workflow,kogito-addons-quarkus-knative-eventing,smallrye-health,kogito-quarkus-serverless-workflow-devui,kogito-addons-quarkus-source-files,kogito-addons-quarkus-jobs-service-embedded,kogito-addons-quarkus-data-index-inmemory,org.kie.kogito:kogito-addons-quarkus-fabric8-kubernetes-service-catalog:${KOGITO_VERSION},org.kie.kogito:kogito-addons-quarkus-kubernetes:${KOGITO_VERSION}
+ value: kogito-quarkus-serverless-workflow,kogito-addons-quarkus-knative-eventing,smallrye-health,kogito-quarkus-serverless-workflow-devui,kogito-addons-quarkus-source-files,org.kie.kogito:kogito-addons-quarkus-jobs-service-embedded:${KOGITO_VERSION},org.kie.kogito:kogito-addons-quarkus-data-index-inmemory:${KOGITO_VERSION},org.kie.kogito:kogito-addons-quarkus-fabric8-kubernetes-service-catalog:${KOGITO_VERSION},org.kie.kogito:kogito-addons-quarkus-kubernetes:${KOGITO_VERSION}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@spolti just thinking whether we should not have directly this change into the module configuration, aka define all extensions with artifact names
This is because some of them are not existing in Quarkus 2.13 platform and we need to define the whole artifact.

48 changes: 48 additions & 0 deletions .ci/environments/update.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#!/bin/bash
set -euo pipefail

script_dir_path=$(cd `dirname "${BASH_SOURCE[0]}"`; pwd -P)

environment=$1
shift

if [ -z "${environment}" ]; then
echo "No environment given as first argument"
exit 1
fi

env_path="${script_dir_path}/${environment}"
echo $env_path
if [ ! -d "${env_path}" ]; then
echo "No configuration given for this environment ... Nothing done !"
exit 0
fi

echo "Update project for environment '${environment}'"

# If update script is present, apply it
if [ -f "${env_path}/before.sh" ]; then
echo "Run before script"
${env_path}/before.sh $@
fi

# Apply patches if any
patches_path="${env_path}"/patches
if [ -d ${patches_path} ]; then
for patch_file in "${patches_path}"/*
do
echo "Apply git patch ${patch_file}"
git apply ${patch_file} --whitespace=fix
done
else
echo 'No patch to apply'
fi

# If update script is present, apply it
if [ -f "${env_path}/after.sh" ]; then
echo "Run after script"
${env_path}/after.sh $@
fi

# Download `setup_integration_branch` script and execute
curl -s https://raw.githubusercontent.com/kiegroup/kogito-pipelines/main/dsl/seed/scripts/setup_integration_branch.sh | bash