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

NO-ISSUE: Adjust CI for all branches #2433

Merged
merged 1 commit into from
Jun 18, 2024
Merged
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
8 changes: 4 additions & 4 deletions .ci/incubator-kie-tools-ci-build.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM cruizba/ubuntu-dind:noble-26.1.3
FROM cruizba/ubuntu-dind:jammy-26.1.3

Copy link
Contributor

Choose a reason for hiding this comment

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

What's the difference between "noble" and "jammy"? :D

Copy link
Contributor Author

Choose a reason for hiding this comment

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

noble is ubuntu 24.04 and jammy is ubuntu 22.04

SHELL ["/bin/bash", "-c"]

Expand Down Expand Up @@ -45,7 +45,7 @@ xvfb \
fluxbox \
subversion && \
apt-get clean autoclean && apt-get autoremove --yes && \
rm -rf /var/lib/{apt,dpkg,cache,log}/
rm -rf /var/lib/{apt,cache,log}/

# Install firefox
RUN wget -O /tmp/firefox-latest.tar.bz2 "https://download.mozilla.org/?product=firefox-latest&os=linux64&lang=en-US" && \
Expand Down Expand Up @@ -117,8 +117,8 @@ RUN wget https://mirror.openshift.com/pub/openshift-v4/clients/ocp/stable/opensh
sudo tar -C /usr/bin/ -xvzf /tmp/openshift-client-linux.tar.gz oc && rm /tmp/openshift-client-linux.tar.gz

# Helm CLI setup
RUN wget https://get.helm.sh/helm-v3.14.3-linux-amd64.tar.gz -P /tmp && \
sudo tar -C /usr/bin/ -zxvf /tmp/helm-v3.14.3-linux-amd64.tar.gz linux-amd64/helm --strip-components 1 && rm /tmp/helm-v3.14.3-linux-amd64.tar.gz
RUN wget https://get.helm.sh/helm-v3.15.2-linux-amd64.tar.gz -P /tmp && \
sudo tar -C /usr/bin/ -zxvf /tmp/helm-v3.15.2-linux-amd64.tar.gz linux-amd64/helm --strip-components 1 && rm /tmp/helm-v3.15.2-linux-amd64.tar.gz

# Python setup
RUN sudo update-alternatives --install /usr/local/bin/python python $(which python3) 1 && \
Expand Down
66 changes: 33 additions & 33 deletions .ci/jenkins/Jenkinsfile.ci-main
Original file line number Diff line number Diff line change
Expand Up @@ -28,51 +28,63 @@ pipeline {
}

environment {
BUILD_IMAGE_TAG = 'latest'
BUILD_IMAGE_JOB_STATUS = 'SKIPPED'
DOCKER_CONFIG = "${WORKSPACE}/.docker"
}

stages {
stage('Load local shared scripts') {
steps {
script {
dockerUtils = load '.ci/jenkins/shared-scripts/dockerUtils.groovy'
pipelineVars = load '.ci/jenkins/shared-scripts/pipelineVars.groovy'
githubUtils = load '.ci/jenkins/shared-scripts/githubUtils.groovy'
}
}
}

stage('Checkout Apache KIE Tools (Simulated squashed merge)') {
stage('Clean workspace before build') {
steps {
cleanWs(deleteDirs: true, disableDeferredWipeout: true)
}
}

stage('Checkout kie-tools') {
steps {
dir('kie-tools') {
checkout scm
}
}
}

stage('Check KIE Tools CI Image build is required') {
steps {
dir('kie-tools') {
script {
githubUtils.checkoutRepoSquashedMerge(
env.CHANGE_AUTHOR,
env.CHANGE_BRANCH,
"https://github.com/${env.CHANGE_AUTHOR}/${pipelineVars.githubRepositoryName}.git",
env.CHANGE_TARGET ?: env.BRANCH_NAME,
"https://github.com/${pipelineVars.githubRepositoryOrg}/${pipelineVars.githubRepositoryName}.git",
"${pipelineVars.kieToolsBotGithubCredentialsId}"
BUILD_IMAGE_REQUIRED = (
githubUtils.fileIsInChangeset("${env.BRANCH_NAME}", 'incubator-kie-tools-ci-build.Dockerfile')
|| !dockerUtils.checkImageExistsInRegistry(
"${pipelineVars.kieToolsCiBuildImageRegistry}",
"${pipelineVars.kieToolsCiBuildImageAccount}",
"${pipelineVars.kieToolsCiBuildImageName}",
"${env.BRANCH_NAME}",
"${pipelineVars.dockerHubUserCredentialsId}",
"${pipelineVars.dockerHubTokenCredentialsId}"
)
)

BUILD_IMAGE_REQUIRED = githubUtils.fileIsInChangeset('incubator-kie-tools-ci-build.Dockerfile')
}
}
}
}

stage('Image Build') {
stage('Trigger KIE Tools CI image build job') {
when {
expression { BUILD_IMAGE_REQUIRED }
}
steps {
script {
BUILD_IMAGE_TAG = "${env.GIT_COMMIT}"
BUILD_IMAGE_JOB_STATUS = build(
job: "KIE/kie-tools/kie-tools-ci-jobs/kie-tools-ci-image-build/${BRANCH_NAME}",
parameters: [
string(name: 'IMAGE_TAG', value: "${env.GIT_COMMIT}")
]
job: "KIE/kie-tools/kie-tools-ci-jobs/kie-tools-ci-image-build/${BRANCH_NAME}"
).result
}
}
Expand All @@ -87,10 +99,7 @@ pipeline {
steps {
script {
build(
job: "KIE/kie-tools/kie-tools-ci-jobs/kie-tools-ci-build/${BRANCH_NAME}",
parameters: [
string(name: 'IMAGE_TAG', value: "${BUILD_IMAGE_TAG}")
]
job: "KIE/kie-tools/kie-tools-ci-jobs/kie-tools-ci-build/${BRANCH_NAME}"
)
}
}
Expand All @@ -100,10 +109,7 @@ pipeline {
steps {
script {
build(
job: "KIE/kie-tools/kie-tools-ci-jobs/kie-tools-ci-check-dependencies/${BRANCH_NAME}",
parameters: [
string(name: 'IMAGE_TAG', value: "${BUILD_IMAGE_TAG}")
]
job: "KIE/kie-tools/kie-tools-ci-jobs/kie-tools-ci-check-dependencies/${BRANCH_NAME}"
)
}
}
Expand All @@ -113,10 +119,7 @@ pipeline {
steps {
script {
build(
job: "KIE/kie-tools/kie-tools-ci-jobs/kie-tools-ci-check-code-formatting/${BRANCH_NAME}",
parameters: [
string(name: 'IMAGE_TAG', value: "${BUILD_IMAGE_TAG}")
]
job: "KIE/kie-tools/kie-tools-ci-jobs/kie-tools-ci-check-code-formatting/${BRANCH_NAME}"
)
}
}
Expand All @@ -126,10 +129,7 @@ pipeline {
steps {
script {
build(
job: "KIE/kie-tools/kie-tools-ci-jobs/kie-tools-ci-check-code-quality/${BRANCH_NAME}",
parameters: [
string(name: 'IMAGE_TAG', value: "${BUILD_IMAGE_TAG}")
]
job: "KIE/kie-tools/kie-tools-ci-jobs/kie-tools-ci-check-code-quality/${BRANCH_NAME}"
)
}
}
Expand Down
8 changes: 4 additions & 4 deletions .ci/jenkins/Jenkinsfile.daily-dev-publish
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ pipeline {

DEV_DEPLOYMENT_KOGITO_QUARKUS_BLANK_APP_IMAGE__registry = 'docker.io'
DEV_DEPLOYMENT_KOGITO_QUARKUS_BLANK_APP_IMAGE__account = 'apache'
DEV_DEPLOYMENT_KOGITO_QUARKUS_BLANK_APP_IMAGE__name = 'incubator-dev-deployment-kogito-quarkus-blank-app'
DEV_DEPLOYMENT_KOGITO_QUARKUS_BLANK_APP_IMAGE__name = 'incubator-kie-sandbox-dev-deployment-quarkus-blank-app'
DEV_DEPLOYMENT_KOGITO_QUARKUS_BLANK_APP_IMAGE__buildTag = 'daily-dev'

DEV_DEPLOYMENT_DMN_FORM_WEBAPP_IMAGE__registry = 'docker.io'
DEV_DEPLOYMENT_DMN_FORM_WEBAPP_IMAGE__account = 'apache'
DEV_DEPLOYMENT_DMN_FORM_WEBAPP_IMAGE__name = 'incubator-dev-deployment-dmn-form-webapp'
DEV_DEPLOYMENT_DMN_FORM_WEBAPP_IMAGE__name = 'incubator-kie-sandbox-dev-deployment-dmn-form-webapp'
DEV_DEPLOYMENT_DMN_FORM_WEBAPP_IMAGE__buildTag = 'daily-dev'

ONLINE_EDITOR__devDeploymentBaseImageRegistry = 'docker.io'
Expand All @@ -63,7 +63,7 @@ pipeline {
ONLINE_EDITOR__devDeploymentDmnFormWebappImageTag = 'daily-dev'
ONLINE_EDITOR__devDeploymentKogitoQuarkusBlankAppImageRegistry = 'docker.io'
ONLINE_EDITOR__devDeploymentKogitoQuarkusBlankAppImageAccount = 'apache'
ONLINE_EDITOR__devDeploymentKogitoQuarkusBlankAppImageName = 'incubator-kie-sandbox-dev-deployment-kogito-quarkus-blank-app'
ONLINE_EDITOR__devDeploymentKogitoQuarkusBlankAppImageName = 'incubator-kie-sandbox-dev-deployment-quarkus-blank-app'
ONLINE_EDITOR__devDeploymentKogitoQuarkusBlankAppImageTag = 'daily-dev'
ONLINE_EDITOR__corsProxyUrl = 'https://daily-dev-cors-proxy-kie-sandbox.rhba-0ad6762cc85bcef5745bb684498c2436-0000.us-south.containers.appdomain.cloud'

Expand Down Expand Up @@ -101,7 +101,7 @@ pipeline {
SERVERLESS_LOGIC_WEB_TOOLS__dashbuilderViewerImageTag = 'daily-dev'
SERVERLESS_LOGIC_WEB_TOOLS__swfBuilderImageRegistry = 'docker.io'
SERVERLESS_LOGIC_WEB_TOOLS__swfBuilderImageAccount = 'apache'
SERVERLESS_LOGIC_WEB_TOOLS__swfBuilderImageName = 'incubator-serverless-logic-web-tools-swf-builder'
SERVERLESS_LOGIC_WEB_TOOLS__swfBuilderImageName = 'incubator-kie-serverless-logic-web-tools-swf-builder'
SERVERLESS_LOGIC_WEB_TOOLS__swfBuilderImageTag = 'daily-dev'
SERVERLESS_LOGIC_WEB_TOOLS__swfBuilderImageBuildTags = 'daily-dev'
SERVERLESS_LOGIC_WEB_TOOLS__baseBuilderImageRegistry = 'docker.io'
Expand Down
21 changes: 4 additions & 17 deletions .ci/jenkins/ci-jobs/Jenkinsfile.ci-build
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ pipeline {
timeout(time: 600, unit: 'MINUTES')
}

parameters {
string(description: 'Image tag', name: 'IMAGE_TAG', defaultValue: 'main')
}

environment {
TESTS_REPORTS_PATTERNS = 'kie-tools/packages/**/dist-tests/junit-report*.xml kie-tools/examples/**/dist-tests/junit-report*.xml kie-tools/packages/**/target/surefire-reports/TEST-*.xml kie-tools/examples/**/target/surefire-reports/TEST-*.xml'
END_TO_END_TESTS_REPORTS_PATTERNS = 'kie-tools/packages/**/dist-tests-e2e/junit-report*.xml kie-tools/examples/**/dist-tests-e2e/junit-report*.xml kie-tools/packages/**/target/failsafe-reports/TEST-*.xml kie-tools/examples/**/target/failsafe-reports/TEST-*.xml'
Expand All @@ -49,7 +45,7 @@ pipeline {
agent {
docker {
label("${buildUtils.apacheAgentLabels()}")
image "docker.io/apache/incubator-kie-tools-ci-build:${params.IMAGE_TAG}"
image "docker.io/apache/incubator-kie-tools-ci-build:${env.BRANCH_NAME}"
args '--shm-size=2g --privileged --group-add docker'
}
}
Expand All @@ -69,19 +65,10 @@ pipeline {
}
}

stage('Checkout Apache KIE Tools (Simulated squashed merge)') {
stage('Checkout kie-tools') {
steps {
dir('kie-tools') {
script {
githubUtils.checkoutRepoSquashedMerge(
env.CHANGE_AUTHOR,
env.CHANGE_BRANCH,
"https://github.com/${env.CHANGE_AUTHOR}/${pipelineVars.githubRepositoryName}.git",
env.CHANGE_TARGET ?: env.BRANCH_NAME,
"https://github.com/${pipelineVars.githubRepositoryOrg}/${pipelineVars.githubRepositoryName}.git",
"${pipelineVars.kieToolsBotGithubCredentialsId}"
)
}
checkout scm
}
}
}
Expand Down Expand Up @@ -151,7 +138,7 @@ pipeline {

stage('Upload end-to-end tests results to Buildkite (`main` only)') {
when {
expression { !env.CHANGE_ID && env.BRANCH_NAME == 'main' && env.ENABLE_BUILDKITE == 'true' }
expression { env.BRANCH_NAME == 'main' && env.ENABLE_BUILDKITE == 'true' }
}
steps {
dir('kie-tools') {
Expand Down
15 changes: 3 additions & 12 deletions .ci/jenkins/ci-jobs/Jenkinsfile.ci-check-code-fmt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ pipeline {
stage('Check code formatting') {
agent {
docker {
image "docker.io/apache/incubator-kie-tools-ci-build:${params.IMAGE_TAG}"
image "docker.io/apache/incubator-kie-tools-ci-build:${env.BRANCH_NAME}"
}
}

Expand All @@ -49,19 +49,10 @@ pipeline {
}
}

stage('Checkout Apache KIE Tools (Simulated squashed merge)') {
stage('Checkout kie-tools') {
steps {
dir('kie-tools') {
script {
githubUtils.checkoutRepoSquashedMerge(
env.CHANGE_AUTHOR,
env.CHANGE_BRANCH,
"https://github.com/${env.CHANGE_AUTHOR}/${pipelineVars.githubRepositoryName}.git",
env.CHANGE_TARGET ?: env.BRANCH_NAME,
"https://github.com/${pipelineVars.githubRepositoryOrg}/${pipelineVars.githubRepositoryName}.git",
"${pipelineVars.kieToolsBotGithubCredentialsId}"
)
}
checkout scm
}
}
}
Expand Down
19 changes: 3 additions & 16 deletions .ci/jenkins/ci-jobs/Jenkinsfile.ci-check-codeql
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ pipeline {
timeout(time: 240, unit: 'MINUTES')
}

parameters {
string(description: 'Image tag', name: 'IMAGE_TAG', defaultValue: 'main')
}

environment {
RESULTS_DIR = '/tmp/codeql/results'
DATABASE_DIR = '/tmp/codeql/db'
Expand All @@ -48,7 +44,7 @@ pipeline {
stage('Check code quality') {
agent {
docker {
image "docker.io/apache/incubator-kie-tools-ci-build:${params.IMAGE_TAG}"
image "docker.io/apache/incubator-kie-tools-ci-build:${env.BRANCH_NAME}"
}
}

Expand All @@ -59,19 +55,10 @@ pipeline {
}
}

stage('Checkout Apache KIE Tools (Simulated squashed merge)') {
stage('Checkout kie-tools') {
steps {
dir('kie-tools') {
script {
githubUtils.checkoutRepoSquashedMerge(
env.CHANGE_AUTHOR,
env.CHANGE_BRANCH,
"https://github.com/${env.CHANGE_AUTHOR}/${pipelineVars.githubRepositoryName}.git",
env.CHANGE_TARGET ?: env.BRANCH_NAME,
"https://github.com/${pipelineVars.githubRepositoryOrg}/${pipelineVars.githubRepositoryName}.git",
"${pipelineVars.kieToolsBotGithubCredentialsId}"
)
}
checkout scm
}
}
}
Expand Down
19 changes: 3 additions & 16 deletions .ci/jenkins/ci-jobs/Jenkinsfile.ci-check-dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ pipeline {
timeout(time: 240, unit: 'MINUTES')
}

parameters {
string(description: 'Image tag', name: 'IMAGE_TAG', defaultValue: 'main')
}

stages {
stage('Load local shared scripts') {
steps {
Expand All @@ -38,7 +34,7 @@ pipeline {
stage('Check dependencies consistency') {
agent {
docker {
image "docker.io/apache/incubator-kie-tools-ci-build:${params.IMAGE_TAG}"
image "docker.io/apache/incubator-kie-tools-ci-build:${env.BRANCH_NAME}"
}
}

Expand All @@ -49,19 +45,10 @@ pipeline {
}
}

stage('Checkout Apache KIE Tools (Simulated squashed merge)') {
stage('Checkout kie-tools') {
steps {
dir('kie-tools') {
script {
githubUtils.checkoutRepoSquashedMerge(
env.CHANGE_AUTHOR,
env.CHANGE_BRANCH,
"https://github.com/${env.CHANGE_AUTHOR}/${pipelineVars.githubRepositoryName}.git",
env.CHANGE_TARGET ?: env.BRANCH_NAME,
"https://github.com/${pipelineVars.githubRepositoryOrg}/${pipelineVars.githubRepositoryName}.git",
"${pipelineVars.kieToolsBotGithubCredentialsId}"
)
}
checkout scm
}
}
}
Expand Down
Loading
Loading