-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into docs_pipelines
- Loading branch information
Showing
65 changed files
with
1,070 additions
and
1,692 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,10 +30,27 @@ runs: | |
distribution: 'temurin' | ||
java-version: ${{ inputs.java-version }} | ||
check-latest: true | ||
- name: Set up Maven | ||
uses: stCarolas/[email protected] | ||
# We have to download the required scripts to our local workspace | ||
- name: Checkout Scripts | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: apache/incubator-kie-kogito-pipelines | ||
sparse-checkout: | | ||
.ci/actions/maven | ||
path: maven-tools | ||
- name: Cache Maven Download | ||
id: cache-maven-download | ||
uses: actions/cache@v3 | ||
with: | ||
maven-version: ${{ inputs.maven-version }} | ||
key: ${{ runner.os }}-maven-${{ inputs.maven-version }} | ||
path: | | ||
~/.maven/download/ | ||
- name: Set up Maven | ||
shell: sh | ||
run: | | ||
./maven-tools/.ci/actions/maven/install-maven.sh "$HOME/.local/mvn" ${{ inputs.maven-version }} | ||
echo "$HOME/.local/mvn/bin" >> $GITHUB_PATH | ||
- name: Cache Maven packages | ||
uses: actions/cache@v3 | ||
with: | ||
|
@@ -48,70 +65,10 @@ runs: | |
key: ${{ inputs.cache-key-prefix }}-m2-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: ${{ inputs.cache-key-prefix }}-m2 | ||
- name: Setup Maven Settings | ||
uses: whelk-io/maven-settings-xml-action@v21 | ||
with: | ||
repositories: > | ||
[ | ||
{ | ||
"id": "jboss-public-repository-group", | ||
"name": "JBoss Public Repository Group", | ||
"url": "https://repository.jboss.org/nexus/content/groups/public", | ||
"releases": { | ||
"enabled": "true", | ||
"updatePolicy": "never" | ||
}, | ||
"snapshots": { | ||
"enabled": "${{ inputs.allow-snapshots }}", | ||
"updatePolicy": "never" | ||
} | ||
}, | ||
{ | ||
"id": "kogito-staging-repository-group", | ||
"name": "Kogito Staging Repositories", | ||
"url": "https://repository.jboss.org/nexus/content/groups/kogito-public", | ||
"releases": { | ||
"enabled": "true", | ||
"updatePolicy": "never" | ||
}, | ||
"snapshots": { | ||
"enabled": "${{ inputs.allow-snapshots }}", | ||
"updatePolicy": "never" | ||
} | ||
} | ||
] | ||
plugin_repositories: > | ||
[ | ||
{ | ||
"id": "jboss-public-repository-group", | ||
"name": "JBoss Public Repository Group", | ||
"url": "https://repository.jboss.org/nexus/content/groups/public", | ||
"releases": { | ||
"enabled": "true", | ||
"updatePolicy": "never" | ||
}, | ||
"snapshots": { | ||
"enabled": "${{ inputs.allow-snapshots }}", | ||
"updatePolicy": "never" | ||
} | ||
}, | ||
{ | ||
"id": "kogito-staging-repository-group", | ||
"name": "Kogito Staging Repositories", | ||
"url": "https://repository.jboss.org/nexus/content/groups/kogito-public", | ||
"releases": { | ||
"enabled": "true", | ||
"updatePolicy": "never" | ||
}, | ||
"snapshots": { | ||
"enabled": "${{ inputs.allow-snapshots }}", | ||
"updatePolicy": "never" | ||
} | ||
} | ||
] | ||
plugin_groups: > | ||
[ | ||
"org.zanata" | ||
] | ||
shell: bash | ||
run: | | ||
cp maven-tools/.ci/actions/maven/settings-template.xml ${HOME}/.m2/settings.xml | ||
- name: Debug settings.xml | ||
if: ${{ inputs.debug }} | ||
shell: bash | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/bin/sh | ||
set -e | ||
|
||
install_path=$1 | ||
maven_version=$2 | ||
|
||
if [[ -z ${maven_version} ]]; then | ||
maven_version=$(curl https://maven.apache.org/download.cgi --silent | grep "Downloading Apache Maven " | grep -oE '[0-9].[0-9]+.[0-9]+') | ||
fi | ||
maven_file="apache-maven-${maven_version}-bin.tar.gz" | ||
download_url="https://archive.apache.org/dist/maven/maven-3/${maven_version}/binaries/${maven_file}" | ||
download_path="${HOME}/.maven/download/" | ||
|
||
echo "---> Maven version to install is ${maven_version}" | ||
|
||
if [ -e "${download_path}/${maven_file}" ]; then | ||
echo "---> Maven ${maven_version} already exists in '${download_path}', skipping downloading" | ||
else | ||
mkdir -p "${download_path}" | ||
cd "${download_path}" | ||
echo "---> Downloading maven ${maven_version} to ${download_path}" | ||
curl -LO "${download_url}" | ||
cd - | ||
fi | ||
|
||
if [ -z "${install_path}" ]; then | ||
install_path="${HOME}/runner/mvn" | ||
fi | ||
|
||
echo "---> Ensuring maven installation at ${install_path}" | ||
|
||
mkdir -p "${install_path}" | ||
tar -xf "${download_path}/${maven_file}" --strip-components=1 -C ${install_path} | ||
|
||
sh "${install_path}/bin/mvn" --version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 | ||
https://maven.apache.org/xsd/settings-1.0.0.xsd"> | ||
|
||
<mirrors> | ||
<!-- ### configured mirrors ### --> | ||
</mirrors> | ||
|
||
<proxies> | ||
<!-- ### configured http proxy ### --> | ||
</proxies> | ||
|
||
<pluginGroups> | ||
<pluginGroup>org.zanata</pluginGroup> | ||
</pluginGroups> | ||
|
||
<profiles> | ||
<!-- ### extra maven repositories ### --> | ||
|
||
</profiles> | ||
<activeProfiles> | ||
<!-- ### extra maven profile ### --> | ||
</activeProfiles> | ||
</settings> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
version: "2.1" | ||
|
||
dependencies: ./project-dependencies.yaml | ||
|
||
pre: | | ||
export BUILD_MVN_OPTS="${{ env.BUILD_MVN_OPTS }} -nsu -ntp -fae -e -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 -Dmaven.wagon.http.retryHandler.count=3" | ||
echo "BUILD_MVN_OPTS=${{ env.BUILD_MVN_OPTS }}" | ||
export BUILD_MVN_OPTS_CURRENT="${{ env.BUILD_MVN_OPTS_CURRENT }}" | ||
echo "BUILD_MVN_OPTS_CURRENT=${{ env.BUILD_MVN_OPTS_CURRENT }}" | ||
echo "QUARKUS_VERSION=${{ env.QUARKUS_VERSION }}" | ||
echo "ENABLE_DEPLOY=${{ env.ENABLE_DEPLOY }}" | ||
default: | ||
build-command: | ||
before: | ||
current: | | ||
export INTEGRATION_BRANCH=${{ env.INTEGRATION_BRANCH_CURRENT }} | ||
bash -c "if [ ! -z '${{ env.BUILD_ENVIRONMENT }}' ] && [ -f .ci/environments/update.sh ]; then .ci/environments/update.sh ${{ env.BUILD_ENVIRONMENT }} ${{ env.BUILD_ENVIRONMENT_OPTIONS_CURRENT }}; fi" | ||
upstream: | | ||
export INTEGRATION_BRANCH=${{ env.INTEGRATION_BRANCH_UPSTREAM }} | ||
bash -c "if [ ! -z '${{ env.BUILD_ENVIRONMENT }}' ] && [ -f .ci/environments/update.sh ]; then .ci/environments/update.sh ${{ env.BUILD_ENVIRONMENT }} ${{ env.BUILD_ENVIRONMENT_OPTIONS_UPSTREAM }}; fi" | ||
current: | | ||
mvn dependency:tree clean install ${{ env.BUILD_MVN_OPTS }} ${{ env.BUILD_MVN_OPTS_CURRENT }} | ||
upstream: | | ||
mvn dependency:tree clean install -Dquickly ${{ env.BUILD_MVN_OPTS }} ${{ env.BUILD_MVN_OPTS_UPSTREAM }} | ||
build: | ||
- project: apache/incubator-kie-drools | ||
build-command: | ||
current: | | ||
export MVN_CMD=`bash -c "if [ '${{ env.ENABLE_DEPLOY }}' = 'true' ]; then printf 'deploy ${{ env.DEPLOY_MVN_OPTS }} ${{ env.DROOLS_DEPLOY_MVN_OPTS }}'; else printf 'install'; fi"` | ||
mvn dependency:tree clean ${{ env.MVN_CMD }} ${{ env.BUILD_MVN_OPTS }} ${{ env.BUILD_MVN_OPTS_CURRENT }} ${{ env.DROOLS_BUILD_MVN_OPTS }} | ||
upstream: | | ||
mvn dependency:tree clean install -Dquickly ${{ env.BUILD_MVN_OPTS }} ${{ env.BUILD_MVN_OPTS_UPSTREAM }} ${{ env.DROOLS_BUILD_MVN_OPTS_UPSTREAM }} | ||
downstream: | | ||
mvn dependency:tree clean install -Dquickly ${{ env.BUILD_MVN_OPTS }} ${{ env.BUILD_MVN_OPTS_DOWNSTREAM }} ${{ env.DROOLS_BUILD_MVN_OPTS_DOWNSTREAM }} | ||
- project: apache/incubator-kie-kogito-runtimes | ||
build-command: | ||
current: | | ||
export MVN_CMD=`bash -c "if [ '${{ env.ENABLE_DEPLOY }}' = 'true' ]; then printf 'deploy ${{ env.DEPLOY_MVN_OPTS }} ${{ env.KOGITO_RUNTIMES_DEPLOY_MVN_OPTS }}'; else printf 'install'; fi"` | ||
mvn dependency:tree clean -Dfull ${{ env.MVN_CMD }} ${{ env.BUILD_MVN_OPTS }} ${{ env.BUILD_MVN_OPTS_CURRENT }} ${{ env.KOGITO_RUNTIMES_BUILD_MVN_OPTS }} | ||
upstream: | | ||
mvn dependency:tree clean install -Dquickly -Dfull ${{ env.BUILD_MVN_OPTS }} ${{ env.BUILD_MVN_OPTS_UPSTREAM }} ${{ env.KOGITO_RUNTIMES_BUILD_MVN_OPTS_UPSTREAM }} | ||
downstream: | | ||
mvn dependency:tree clean install -Dquickly -Dfull ${{ env.BUILD_MVN_OPTS }} ${{ env.BUILD_MVN_OPTS_DOWNSTREAM }} ${{ env.KOGITO_RUNTIMES_BUILD_MVN_OPTS_DOWNSTREAM }} | ||
- project: apache/incubator-kie-kogito-apps | ||
build-command: | ||
current: | | ||
export MVN_CMD=`bash -c "if [ '${{ env.ENABLE_DEPLOY }}' = 'true' ]; then printf 'deploy ${{ env.DEPLOY_MVN_OPTS }} ${{ env.KOGITO_APPS_DEPLOY_MVN_OPTS }}'; else printf 'install'; fi"` | ||
mvn dependency:tree clean ${{ env.MVN_CMD }} ${{ env.BUILD_MVN_OPTS }} ${{ env.BUILD_MVN_OPTS_CURRENT }} ${{ env.KOGITO_APPS_BUILD_MVN_OPTS }} | ||
upstream: | | ||
mvn dependency:tree clean install -Dquickly ${{ env.BUILD_MVN_OPTS }} ${{ env.BUILD_MVN_OPTS_UPSTREAM }} ${{ env.KOGITO_APPS_BUILD_MVN_OPTS_UPSTREAM }} | ||
downstream: | | ||
mvn dependency:tree clean install -Dquickly ${{ env.BUILD_MVN_OPTS }} ${{ env.BUILD_MVN_OPTS_DOWNSTREAM }} ${{ env.KOGITO_APPS_BUILD_MVN_OPTS_DOWNSTREAM }} | ||
archive-artifacts: | ||
path: | | ||
**/*.log | ||
**/cypress/screenshots/** | ||
**/cypress/videos/** | ||
- project: apache/incubator-kie-kogito-examples | ||
build-command: | ||
# First install the main pom | ||
# Then build the required submodule pom | ||
current: | | ||
export MVN_CMD=`bash -c "if [ '${{ env.ENABLE_DEPLOY }}' = 'true' ]; then printf 'deploy ${{ env.DEPLOY_MVN_OPTS }} ${{ env.KOGITO_EXAMPLES_DEPLOY_MVN_OPTS }}'; else printf 'install'; fi"` | ||
mvn dependency:tree -pl :kogito-examples clean ${{ env.MVN_CMD }} ${{ env.BUILD_MVN_OPTS }} ${{ env.BUILD_MVN_OPTS_CURRENT }} ${{ env.KOGITO_EXAMPLES_BUILD_MVN_OPTS }} | ||
mvn dependency:tree -f ${{ env.KOGITO_EXAMPLES_SUBFOLDER_POM }}pom.xml clean ${{ env.MVN_CMD }} ${{ env.BUILD_MVN_OPTS }} ${{ env.BUILD_MVN_OPTS_CURRENT }} ${{ env.KOGITO_EXAMPLES_BUILD_MVN_OPTS }} | ||
upstream: | | ||
mvn dependency:tree clean install -DskipTests -DskipITs ${{ env.BUILD_MVN_OPTS }} ${{ env.BUILD_MVN_OPTS_UPSTREAM }} ${{ env.KOGITO_EXAMPLES_BUILD_MVN_OPTS_UPSTREAM }} | ||
downstream: | | ||
mvn dependency:tree clean install -DskipTests -DskipITs ${{ env.BUILD_MVN_OPTS }} ${{ env.BUILD_MVN_OPTS_DOWNSTREAM }} ${{ env.KOGITO_EXAMPLES_BUILD_MVN_OPTS_DOWNSTREAM }} | ||
# - project: kiegroup/kie-jpmml-integration | ||
# build-command: | ||
# current: | | ||
# export MVN_CMD=`bash -c "if [ '${{ env.ENABLE_DEPLOY }}' = 'true' ]; then printf 'deploy ${{ env.DEPLOY_MVN_OPTS }} ${{ env.KIE_JPMML_INTEGRATION_DEPLOY_MVN_OPTS }}'; else printf 'install'; fi"` | ||
# mvn clean ${{ env.MVN_CMD }} ${{ env.BUILD_MVN_OPTS }} ${{ env.BUILD_MVN_OPTS_CURRENT }} ${{ env.KIE_JPMML_INTEGRATION_BUILD_MVN_OPTS }} | ||
# upstream: | | ||
# mvn clean install -DskipTests ${ env.BUILD_MVN_OPTS }} ${{ env.BUILD_MVN_OPTS_UPSTREAM }} ${{ env.KIE_JPMML_INTEGRATION_BUILD_MVN_OPTS_UPSTREAM }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# Kiegroup Kogito organization repositories CI Status | ||
|
||
This project is based on [chain-status](https://github.com/kiegroup/chain-status) and information generated thanks to [build-chain-configuration-reader](https://github.com/kiegroup/build-chain-configuration-reader) using [kogito-pipelines definition file](https://github.com/kiegroup/kogito-pipelines/blob/main/.ci/pull-request-config.yaml). | ||
This project is based on [chain-status](https://github.com/kiegroup/chain-status) and information generated thanks to [build-chain-configuration-reader](https://github.com/kiegroup/build-chain-configuration-reader) using [kogito-pipelines definition file](https://github.com/apache/incubator-kie-kogito-pipelines/blob/main/.ci/pull-request-config.yaml). | ||
|
||
Due to the retrieved information requires a `GITHUB_TOKEN` and github API has a limitation it is better to not collect the information on every request from this webpage is made. So this webpage does not really requires an application service and all the required data is stored in github pages. This information is normally retrieved, treated and stored using [chain-status/action tool](https://github.com/kiegroup/chain-status/tree/main/packages/action) which is exposed as a Github Action tool, so we can customize the job execution frequency as we need. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
import org.jenkinsci.plugins.workflow.libs.Library | ||
|
||
@Library('jenkins-pipeline-shared-libraries')_ | ||
|
||
pipeline { | ||
agent { | ||
label 'ubuntu' | ||
} | ||
|
||
environment { | ||
DOCKER_CONFIG = "${WORKSPACE}/.docker" | ||
|
||
IMAGE_NAME = 'quay.io/kiegroup/kogito-ci-build' | ||
IMAGE_TAG = "${BRANCH_NAME}-build-${BUILD_NUMBER}" | ||
IMAGE_NAME_TAG = "${env.IMAGE_NAME}:${env.IMAGE_TAG}" | ||
} | ||
|
||
options { | ||
timeout(time: 60, unit: 'MINUTES') | ||
} | ||
|
||
stages { | ||
stage('Build image') { | ||
steps { | ||
script { | ||
sh 'printenv' | ||
|
||
currentBuild.displayName = env.IMAGE_TAG | ||
|
||
cloud.loginContainerRegistry('quay.io', 'quay_kiegroup_registry_token') | ||
|
||
dir('kogito-pipelines') { | ||
deleteDir() | ||
|
||
checkout scm | ||
|
||
sh """ | ||
docker build --build-arg SDKMAN_JAVA=11.0.20-tem -t ${env.IMAGE_NAME_TAG} -f apache-nodes/Dockerfile.kogito-ci-build . | ||
docker tag ${env.IMAGE_NAME_TAG} ${env.IMAGE_NAME}:${GIT_COMMIT} | ||
docker tag ${env.IMAGE_NAME_TAG} ${env.IMAGE_NAME}:${BRANCH_NAME}-latest | ||
""" | ||
|
||
sh """ | ||
docker --config ${DOCKER_CONFIG} push ${env.IMAGE_NAME_TAG} | ||
docker --config ${DOCKER_CONFIG} push ${env.IMAGE_NAME}:${GIT_COMMIT} | ||
docker --config ${DOCKER_CONFIG} push ${env.IMAGE_NAME}:${BRANCH_NAME}-latest | ||
""" | ||
} | ||
} | ||
} | ||
post { | ||
always { | ||
script { | ||
sh "rm -rf ${DOCKER_CONFIG}" | ||
sh 'docker logout quay.io' | ||
} | ||
} | ||
} | ||
} | ||
stage('Test built image') { | ||
agent { | ||
docker { | ||
image env.IMAGE_NAME_TAG | ||
args '-v /var/run/docker.sock:/var/run/docker.sock --group-add docker --group-add input --group-add render' | ||
} | ||
} | ||
steps { | ||
echo 'Debug basics' | ||
sh ''' | ||
locale | ||
printenv | ||
''' | ||
|
||
echo 'Test tools' | ||
sh ''' | ||
java -version | ||
mvn --version | ||
python --version | ||
pip --version | ||
node --version | ||
npm --version | ||
go version | ||
s2i version | ||
gh version | ||
kubectl version --client | ||
oc version --client | ||
''' | ||
|
||
echo 'Test docker' | ||
sh ''' | ||
docker info | ||
docker run hello-world | ||
''' | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.