Skip to content

Commit

Permalink
Fix #1178 - Remove Kogito Operator pipelines and references (#1179)
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardozanini authored Feb 12, 2024
1 parent 610235e commit 746f19b
Show file tree
Hide file tree
Showing 25 changed files with 29 additions and 650 deletions.
62 changes: 0 additions & 62 deletions .ci/jenkins/Jenkinsfile.build-operator-node

This file was deleted.

110 changes: 17 additions & 93 deletions .ci/jenkins/Jenkinsfile.nightly.cloud
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import org.jenkinsci.plugins.workflow.libs.Library

// Deploy jobs
IMAGES_DEPLOY = 'kogito-images-deploy'
EXAMPLES_IMAGES_DEPLOY = 'kogito-examples-images-deploy'
OPERATOR_DEPLOY = 'kogito-operator-deploy'
SEVERLESS_OPERATOR_DEPLOY = 'kogito-serverless-operator-deploy'

// Map of executed jobs
Expand All @@ -17,10 +15,6 @@ FAILED_STAGES = [:]
UNSTABLE_STAGES = [:]

defaultImageParamsPrefix = 'IMAGE'
kogitoImagesParamsPrefix = 'KOGITO_IMAGES'
examplesImagesParamsPrefix = 'EXAMPLES_IMAGES'
baseImageParamsPrefix = 'BASE_IMAGE'
promoteImageParamsPrefix = 'PROMOTE_IMAGE'

// Should be multibranch pipeline
pipeline {
Expand Down Expand Up @@ -48,7 +42,7 @@ pipeline {
returnStdout: true,
script: 'date -u "+%Y-%m-%d"'
).trim()}"""
}
}

stages {
stage('Initialize') {
Expand Down Expand Up @@ -76,7 +70,6 @@ pipeline {

// For testing
addSkipTestsParam(buildParams)
addExamplesParam(buildParams)

// Ask to create the PR with changes occuring in this
addBooleanParam(buildParams, 'CREATE_PR', true)
Expand All @@ -91,83 +84,23 @@ pipeline {
}
}

stage('Build examples images & BDD testing') {
parallel {
stage('Build examples images & BDD testing') {
stages {
stage('Build & Deploy Examples Images') {
when {
expression { return isExamplesImagesDeploy() }
}
steps {
script {
def buildParams = getDefaultBuildParams()
addSkipTestsParam(buildParams)
addImageBuildParams(buildParams, env.NIGHTLY_TAG)
addStringParam(buildParams, constructKey(defaultImageParamsPrefix, 'NAME_PREFIX'), 'examples')
addDeployImageWithLatestTagParam(buildParams)

// For BDD tests
addImageBuildParams(buildParams, env.NIGHTLY_TAG, kogitoImagesParamsPrefix)
addExamplesParam(buildParams)

buildJob(EXAMPLES_IMAGES_DEPLOY, buildParams)
}
}
post {
failure {
addFailedStage(EXAMPLES_IMAGES_DEPLOY)
}
}
}
stage('Build & Deploy Operator') {
when {
expression { return isOperatorDeploy() }
}
steps {
script {
def buildParams = getDefaultBuildParams()
addSkipTestsParam(buildParams)
addImageBuildParams(buildParams, env.NIGHTLY_TAG)
addDeployImageWithLatestTagParam(buildParams)

// For BDD tests
addImageBuildParams(buildParams, env.NIGHTLY_TAG, kogitoImagesParamsPrefix)
addImageBuildParams(buildParams, env.NIGHTLY_TAG, examplesImagesParamsPrefix)
addStringParam(buildParams, constructKey(examplesImagesParamsPrefix, 'CACHE_MODE'), isExamplesImagesDeploy() ? 'always' : 'never')
addStringParam(buildParams, constructKey(examplesImagesParamsPrefix, 'NAME_PREFIX'), 'examples')
addExamplesParam(buildParams)

buildJob(OPERATOR_DEPLOY, buildParams)
}
}
post {
failure {
addFailedStage(OPERATOR_DEPLOY)
}
}
}
}
stage('Build & Deploy Serverless Operator') {
when {
expression { return isOperatorDeploy() }
}
steps {
script {
def buildParams = getDefaultBuildParams()
addSkipTestsParam(buildParams)
addImageBuildParams(buildParams, env.NIGHTLY_TAG)
addDeployImageWithLatestTagParam(buildParams)

buildJob(SEVERLESS_OPERATOR_DEPLOY, buildParams)
}
stage('Build & Deploy Serverless Operator') {
when {
expression { return isOperatorDeploy() }
}
steps {
script {
def buildParams = getDefaultBuildParams()
addSkipTestsParam(buildParams)
addImageBuildParams(buildParams, env.NIGHTLY_TAG)
addDeployImageWithLatestTagParam(buildParams)

buildJob(SEVERLESS_OPERATOR_DEPLOY, buildParams)
}
}
post {
failure {
addFailedStage(SEVERLESS_OPERATOR_DEPLOY)
}
}
}
post {
failure {
addFailedStage(SEVERLESS_OPERATOR_DEPLOY)
}
}
}
Expand Down Expand Up @@ -269,11 +202,6 @@ void addAppsParam(buildParams) {
addStringParam(buildParams, 'APPS_URI', "https://github.com/${getGitAuthor()}/incubator-kie-kogito-apps")
}

void addExamplesParam(buildParams) {
addStringParam(buildParams, 'EXAMPLES_URI', "https://github.com/${getGitAuthor()}/incubator-kie-kogito-examples")
addStringParam(buildParams, 'EXAMPLES_REF', "nightly-${getBuildBranch()}")
}

void addImageBuildParams(List buildParams, String tag, String paramsPrefix = defaultImageParamsPrefix, String extraSuffix = '') {
addStringParam(buildParams, constructKey(paramsPrefix, 'REGISTRY_CREDENTIALS'), env.IMAGE_REGISTRY_CREDENTIALS)
addStringParam(buildParams, constructKey(paramsPrefix, 'REGISTRY'), env.IMAGE_REGISTRY)
Expand Down Expand Up @@ -318,10 +246,6 @@ boolean isImagesDeploy() {
return !params.SKIP_IMAGES
}

boolean isExamplesImagesDeploy() {
return !params.SKIP_EXAMPLES_IMAGES
}

boolean isOperatorDeploy() {
return !params.SKIP_OPERATOR
}
Loading

0 comments on commit 746f19b

Please sign in to comment.