Skip to content
This repository was archived by the owner on Apr 17, 2023. It is now read-only.

ci: publish dev image pointing to master tag of operand #82

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
40 changes: 40 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,46 @@ pipeline {
)
}
}
// rebuild and push the image so that it points to master tag of operand (for nightly testing purposes)
stage("Rebuild and push 'dev' image for nightly testing") {
when {
branch 'master'
}
environment {
// qe-pipeline-library step
DOCKER_DEV_TAG = getDevTag("${env.CLONED_REPOSITORY_PATH}")
}
steps{
dir("${env.CLONED_REPOSITORY_PATH}") {
// remove original build
sh "rm -rf build/_output"

// replace specific operand version with 'master'
sh 'sed -i -E \'s/quay.io\\/aerogear\\/unifiedpush-configurable-container:[a-zA-Z0-9.+-]*/quay.io\\/aerogear\\/unifiedpush-configurable-container:master/\' pkg/constants/constants.go'

// compile
sh "make code/compile"

// build image with full dev tag
// qe-pipeline-library step
dockerBuildAndPush(
credentialsId: "${env.CREDENTIALS_ID}",
containerRegistryServerName: "quay.io",
containerImageName: "quay.io/aerogear/${env.OPERATOR_NAME}:${env.DOCKER_DEV_TAG}",
pathToDockerfile: "build/Dockerfile"
)
}

// create a 'dev' tag pointing at the full dev tag
// qe-pipeline-library step
tagRemoteContainerImage(
credentialsId: "${env.CREDENTIALS_ID}",
sourceImage: "quay.io/aerogear/${env.OPERATOR_NAME}:${env.DOCKER_DEV_TAG}",
targetImage: "quay.io/aerogear/${env.OPERATOR_NAME}:dev",
deleteOriginalImage: false
)
}
}
}
post {
failure {
Expand Down