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

Fix #1178 - Remove Kogito Operator pipelines and references #1179

Merged
merged 4 commits into from
Feb 12, 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
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
Loading