Skip to content

Commit

Permalink
Merge pull request #5 from ricardozanini/disable-nightly
Browse files Browse the repository at this point in the history
NO-ISSUE: Disable nightly images job deploy
  • Loading branch information
ricardozanini authored Nov 16, 2023
2 parents d0a2971 + 14ed9b0 commit 5e8302e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion .ci/jenkins/Jenkinsfile.deploy
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ void createBuildAndTestStageClosure(String image) {
buildParams.add(string(name: 'TESTS_KOGITO_EXAMPLES_URI', value: params.EXAMPLES_URI))
buildParams.add(string(name: 'TESTS_KOGITO_EXAMPLES_REF', value: params.EXAMPLES_REF))

buildParams.add(booleanParam(name: 'DEPLOY_IMAGE', value: true))
buildParams.add(booleanParam(name: 'DEPLOY_IMAGE', value: isDeployImage())
buildParams.add(booleanParam(name: 'DEPLOY_IMAGE_USE_OPENSHIFT_REGISTRY', value: isDeployImageInOpenshiftRegistry()))
buildParams.add(string(name: 'DEPLOY_IMAGE_REGISTRY_CREDENTIALS', value: getDeployImageRegistryCredentials()))
buildParams.add(string(name: 'DEPLOY_IMAGE_REGISTRY', value: getDeployImageRegistry()))
Expand Down Expand Up @@ -371,6 +371,10 @@ boolean isDeployLatestTag() {
return params.DEPLOY_WITH_LATEST_TAG
}

boolean isDeployImage() {
return params.DEPLOY_IMAGE ? params.DEPLOY_IMAGE.toBoolean() : false
}

////////////////////////////////////////////////////////////////////////
// utils
////////////////////////////////////////////////////////////////////////
Expand Down
3 changes: 2 additions & 1 deletion .ci/jenkins/dsl/jobs.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ void setupDeployJob(JobType jobType) {
stringParam('EXAMPLES_REF', '', 'Git reference (branch/tag) to the kogito-examples repository to use for tests.')

// Deploy information
booleanParam('DEPLOY_IMAGE', !Utils.getBindingValue(this, 'DISABLE_DEPLOY').toBoolean(), 'Should we deploy image to given deploy registry ?')
booleanParam('IMAGE_USE_OPENSHIFT_REGISTRY', false, 'Set to true if image should be deployed in Openshift registry.In this case, IMAGE_REGISTRY_CREDENTIALS, IMAGE_REGISTRY and IMAGE_NAMESPACE parameters will be ignored')
stringParam('IMAGE_REGISTRY_CREDENTIALS', "${CLOUD_IMAGE_REGISTRY_CREDENTIALS_NIGHTLY}", 'Image registry credentials to use to deploy images. Will be ignored if no IMAGE_REGISTRY is given')
stringParam('IMAGE_REGISTRY', "${CLOUD_IMAGE_REGISTRY}", 'Image registry to use to deploy images')
Expand Down Expand Up @@ -197,7 +198,7 @@ void setupBuildImageJob(JobType jobType, boolean prodCI = false) {
stringParam('TESTS_KOGITO_EXAMPLES_REF', '', '(Optional) Git reference (branch/tag) to the kogito-examples repository to use for tests.')

// Deploy information
booleanParam('DEPLOY_IMAGE', false, 'Should we deploy image to given deploy registry ?')
booleanParam('DEPLOY_IMAGE', !Utils.getBindingValue(this, 'DISABLE_DEPLOY').toBoolean(), 'Should we deploy image to given deploy registry ?')
booleanParam('DEPLOY_IMAGE_USE_OPENSHIFT_REGISTRY', false, 'Set to true if image should be deployed in Openshift registry.In this case, IMAGE_REGISTRY_CREDENTIALS, IMAGE_REGISTRY and IMAGE_NAMESPACE parameters will be ignored')
stringParam('DEPLOY_IMAGE_REGISTRY_CREDENTIALS', "${CLOUD_IMAGE_REGISTRY_CREDENTIALS_NIGHTLY}", 'Image registry credentials to use to deploy images. Will be ignored if no IMAGE_REGISTRY is given')
stringParam('DEPLOY_IMAGE_REGISTRY', "${CLOUD_IMAGE_REGISTRY}", 'Image registry to use to deploy images')
Expand Down

0 comments on commit 5e8302e

Please sign in to comment.