ci(jenkins): enable opbeans syncup
@@ -14,6 +14,7 @@ pipeline {
GITHUB_CHECK_ITS_NAME = 'Integration Tests'
ITS_PIPELINE = 'apm-integration-tests-selector-mbp/master'
MAVEN_CONFIG = '-Dmaven.repo.local=.m2'
+ OPBEANS_REPO = 'opbeans-java'
}
options {
timeout(time: 1, unit: 'HOURS')
@@ -263,14 +264,11 @@ pipeline {
stage('Integration Tests') {
agent none
when {
- beforeAgent true
- allOf {
anyOf {
- environment name: 'GIT_BUILD_CAUSE', value: 'pr'
+ changeRequest()
expression { return !params.Run_As_Master_Branch }
}
}
- }
steps {
log(level: 'INFO', text: 'Launching Async ITs')
build(job: env.ITS_PIPELINE, propagate: false, wait: false,
@@ -282,6 +280,32 @@ pipeline {
githubNotify(context: "${env.GITHUB_CHECK_ITS_NAME}", description: "${env.GITHUB_CHECK_ITS_NAME} ...", status: 'PENDING', targetUrl: "${env.JENKINS_URL}search/?q=${env.ITS_PIPELINE.replaceAll('/','+')}")
}
}
+ stage('AfterRelease') {
+ options { skipDefaultCheckout() }
+ when {
+ tag pattern: 'v\\d+\\.\\d+\\.\\d+', comparator: 'REGEXP'
+ }
+ stages {
+ stage('Opbeans') {
+ environment {
+ REPO_NAME = "${OPBEANS_REPO}"
+ }
+ steps {
+ deleteDir()
+ dir("${OPBEANS_REPO}"){
+ git credentialsId: 'f6c7695a-671e-4f4f-a331-acdce44ff9ba',
+ url: "git@github.com:elastic/${OPBEANS_REPO}.git"
+ // It's required to transform the tag value to the artifact version
+ sh script: ".ci/bump-version.sh ${env.BRANCH_NAME.replaceAll('^v', '')}", label: 'Bump version'
+ // The opbeans-java pipeline will trigger a release for the master branch
+ gitPush()
+ // The opbeans-java pipeline will trigger a release for the release tag
+ gitCreateTag(tag: "${env.BRANCH_NAME}")
+ }
+ }
+ }
+ }
+ }
}
post {
cleanup {
