2021-06-24 11:20:43 +02:00
|
|
|
pipeline {
|
|
|
|
agent {
|
|
|
|
label 'Slave'
|
|
|
|
}
|
|
|
|
|
|
|
|
stages {
|
|
|
|
stage('CleanWorkspace') {
|
|
|
|
steps {
|
|
|
|
cleanWs()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
stage('Checkout') {
|
|
|
|
steps {
|
|
|
|
checkout([
|
|
|
|
$class : 'GitSCM',
|
|
|
|
branches : [[name: "${DBZ_GIT_BRANCH}"]],
|
|
|
|
userRemoteConfigs: [[url: "${DBZ_GIT_REPOSITORY}"]],
|
|
|
|
extensions : [[$class : 'RelativeTargetDirectory',
|
|
|
|
relativeTargetDir: 'debezium']],
|
|
|
|
])
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
stage('Build Debezium Connect Image') {
|
|
|
|
steps {
|
|
|
|
withCredentials([
|
|
|
|
usernamePassword(credentialsId: "${QUAY_CREDENTIALS}", usernameVariable: 'QUAY_USERNAME', passwordVariable: 'QUAY_PASSWORD'),
|
|
|
|
]) {
|
|
|
|
sh '''
|
|
|
|
set -x
|
|
|
|
cd "${WORKSPACE}/debezium"
|
|
|
|
./jenkins-jobs/scripts/build-rhel-kafka-image.sh \\
|
|
|
|
--dir="${WORKSPACE}" \\
|
|
|
|
--archive-urls="${DBZ_CONNECTOR_ARCHIVE_URLS}" \\
|
|
|
|
--libs="${DBZ_EXTRA_LIBS}" \\
|
|
|
|
--image="${RHEL_IMAGE}" \\
|
2021-11-03 12:11:45 +01:00
|
|
|
--tags="${EXTRA_IMAGE_TAGS}" \\
|
|
|
|
--auto-tag="${AUTO_TAG}" \\
|
2021-06-24 11:20:43 +02:00
|
|
|
--registry="quay.io" --organisation="${QUAY_ORGANISATION}" \\
|
2021-09-14 13:16:15 +02:00
|
|
|
--dest-login="${QUAY_USERNAME}" \\
|
|
|
|
--dest-pass="${QUAY_PASSWORD}" \\
|
2021-06-24 11:20:43 +02:00
|
|
|
--img-output="${WORKSPACE}/published_image_dbz.txt"
|
|
|
|
'''
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
post {
|
|
|
|
always {
|
2021-11-03 13:55:42 +01:00
|
|
|
mail to: MAIL_TO, subject: "Rhel downstream preparation #${BUILD_NUMBER} finished", body: """
|
2022-01-17 14:20:29 +01:00
|
|
|
${currentBuild.projectName} run ${BUILD_URL} finished with result: ${currentBuild.currentResult}
|
|
|
|
"""
|
2021-06-24 11:20:43 +02:00
|
|
|
}
|
|
|
|
success {
|
|
|
|
archiveArtifacts "**/published_image*.txt"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|