Skip to content
This repository has been archived by the owner on Sep 17, 2024. It is now read-only.

fix: branch_specifier is needed #1097

Merged
merged 10 commits into from
Apr 27, 2021
12 changes: 10 additions & 2 deletions .ci/build-docker-images.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,23 @@ pipeline {
rateLimitBuilds(throttle: [count: 60, durationName: 'hour', userBoost: true])
quietPeriod(10)
}
parameters {
string(name: 'branch_specifier', defaultValue: 'master', description: 'It would not be defined on the first build, see JENKINS-41929.')
mdelapenya marked this conversation as resolved.
Show resolved Hide resolved
}
triggers {
cron 'H H(0-5) * * 1-5'
cron 'H H(4-5) * * 1-5'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use same cron than in the nightly builds

}
stages {
stage('Checkout') {
environment {
// Parameters will be empty for the very first build, setting an environment variable
// with the same name will workaround the issue. see JENKINS-41929
BRANCH_SPECIFIER = "${params?.branch_specifier}"
mdelapenya marked this conversation as resolved.
Show resolved Hide resolved
}
steps {
deleteDir()
gitCheckout(basedir: "${BASE_DIR}",
branch: "${params.BRANCH_REFERENCE}",
branch: "${env.BRANCH_SPECIFIER}",
repo: "https://github.com/elastic/${REPO}.git",
credentialsId: "${JOB_GIT_CREDENTIALS}"
)
Expand Down
2 changes: 0 additions & 2 deletions .ci/jobs/build-docker-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,3 @@
reference-repo: /var/lib/jenkins/.git-references/e2e-testing.git
branches:
- master
triggers:
- timed: 'H H(0-5) * * 1-5'