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
2 changes: 1 addition & 1 deletion .ci/build-docker-images.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ pipeline {
quietPeriod(10)
}
triggers {
cron 'H H(0-5) * * 1-5'
cron '@daily'
Copy link
Contributor

Choose a reason for hiding this comment

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

do not use daily, it will run on weekends, and 24h after the last execution so the time is not fixed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, I used what we added in the apm-pipeline-library for building images: https://github.com/elastic/apm-pipeline-library/blob/master/.ci/jobs/beats-docker-images-pipeline.yml#L27

What is the recommended cron trigger? Maybe weekly/monthly is enough

Copy link
Contributor

Choose a reason for hiding this comment

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

'H H(0-5) * * 1-5' Monday to Friday anytime between 00:00 AM to 05:00 AM this is fine, the key is to set a range (H(0-5)) of hours where the build can run, Jenkins will manage to not overload the instance in that range.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, this is what we use for the nightly scheduled pipelines. Will use what we have in there

}
stages {
stage('Checkout') {
Expand Down
9 changes: 7 additions & 2 deletions .ci/jobs/build-docker-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
description: Job to pre-build docker images used in E2E tests.
view: Beats
project-type: pipeline
parameters:
- string:
name: branch_specifier
default: master
description: the Git branch specifier to build
pipeline-scm:
script-path: .ci/build-docker-images.groovy
scm:
Expand All @@ -17,6 +22,6 @@
credentials-id: f6c7695a-671e-4f4f-a331-acdce44ff9ba
reference-repo: /var/lib/jenkins/.git-references/e2e-testing.git
branches:
- master
- $branch_specifier
mdelapenya marked this conversation as resolved.
Show resolved Hide resolved
triggers:
- timed: 'H H(0-5) * * 1-5'
- timed: '@daily'
mdelapenya marked this conversation as resolved.
Show resolved Hide resolved