From 4b49965fc87db693209209a2be46687a8d1c06dc Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Mon, 21 Feb 2022 17:08:04 +0000 Subject: [PATCH 1/3] jjbb: daily job with branch aliases --- .ci/e2eTestingFleetDaily.groovy | 3 -- .ci/e2eTestingHelmDaily.groovy | 3 -- .ci/e2eTestingK8SAutodiscoveryDaily.groovy | 3 -- .ci/jobs/e2e-testing-fleet-daily-mbp.yml | 2 +- .ci/jobs/e2e-testing-helm-daily-mbp.yml | 2 +- ...2e-testing-k8s-autodiscovery-daily-mbp.yml | 2 +- .ci/jobs/e2e-testing-schedule-daily.yml | 26 +++++++++++ .ci/schedule-daily.groovy | 45 +++++++++++++++++++ 8 files changed, 74 insertions(+), 12 deletions(-) create mode 100644 .ci/jobs/e2e-testing-schedule-daily.yml create mode 100644 .ci/schedule-daily.groovy diff --git a/.ci/e2eTestingFleetDaily.groovy b/.ci/e2eTestingFleetDaily.groovy index 27a47bc1f7..9655599bb7 100644 --- a/.ci/e2eTestingFleetDaily.groovy +++ b/.ci/e2eTestingFleetDaily.groovy @@ -34,9 +34,6 @@ pipeline { rateLimitBuilds(throttle: [count: 60, durationName: 'hour', userBoost: true]) quietPeriod(10) } - triggers { - cron('H H(4-5) * * 1-5') - } stages { stage('Run Tests') { steps { diff --git a/.ci/e2eTestingHelmDaily.groovy b/.ci/e2eTestingHelmDaily.groovy index fa530380c7..6a872bf205 100644 --- a/.ci/e2eTestingHelmDaily.groovy +++ b/.ci/e2eTestingHelmDaily.groovy @@ -34,9 +34,6 @@ pipeline { rateLimitBuilds(throttle: [count: 60, durationName: 'hour', userBoost: true]) quietPeriod(10) } - triggers { - cron('H H(4-5) * * 1-5') - } stages { stage('Run Tests') { steps { diff --git a/.ci/e2eTestingK8SAutodiscoveryDaily.groovy b/.ci/e2eTestingK8SAutodiscoveryDaily.groovy index 50cde37655..82f2657709 100644 --- a/.ci/e2eTestingK8SAutodiscoveryDaily.groovy +++ b/.ci/e2eTestingK8SAutodiscoveryDaily.groovy @@ -34,9 +34,6 @@ pipeline { rateLimitBuilds(throttle: [count: 60, durationName: 'hour', userBoost: true]) quietPeriod(10) } - triggers { - cron('H H(4-5) * * 1-5') - } stages { stage('Run Tests') { steps { diff --git a/.ci/jobs/e2e-testing-fleet-daily-mbp.yml b/.ci/jobs/e2e-testing-fleet-daily-mbp.yml index b08aa3ca00..60b277f42f 100644 --- a/.ci/jobs/e2e-testing-fleet-daily-mbp.yml +++ b/.ci/jobs/e2e-testing-fleet-daily-mbp.yml @@ -9,7 +9,7 @@ scm: - github: branch-discovery: no-pr - head-filter-regex: '(main|8\.0|7\.17|7\.16)' + head-filter-regex: '(main|8\.\d|7\.17|7\.16)' discover-pr-forks-strategy: merge-current discover-pr-forks-trust: permission discover-pr-origin: merge-current diff --git a/.ci/jobs/e2e-testing-helm-daily-mbp.yml b/.ci/jobs/e2e-testing-helm-daily-mbp.yml index c5860b573b..1138750fc4 100644 --- a/.ci/jobs/e2e-testing-helm-daily-mbp.yml +++ b/.ci/jobs/e2e-testing-helm-daily-mbp.yml @@ -9,7 +9,7 @@ scm: - github: branch-discovery: no-pr - head-filter-regex: '(main|8\.0|7\.17|7\.16)' + head-filter-regex: '(main|8\.\d|7\.17|7\.16)' discover-pr-forks-strategy: merge-current discover-pr-forks-trust: permission discover-pr-origin: merge-current diff --git a/.ci/jobs/e2e-testing-k8s-autodiscovery-daily-mbp.yml b/.ci/jobs/e2e-testing-k8s-autodiscovery-daily-mbp.yml index 5fc0481636..53685435a2 100644 --- a/.ci/jobs/e2e-testing-k8s-autodiscovery-daily-mbp.yml +++ b/.ci/jobs/e2e-testing-k8s-autodiscovery-daily-mbp.yml @@ -9,7 +9,7 @@ scm: - github: branch-discovery: no-pr - head-filter-regex: '(main|8\.0|7\.17|7\.16)' + head-filter-regex: '(main|8\.\d|7\.17|7\.16)' discover-pr-forks-strategy: merge-current discover-pr-forks-trust: permission discover-pr-origin: merge-current diff --git a/.ci/jobs/e2e-testing-schedule-daily.yml b/.ci/jobs/e2e-testing-schedule-daily.yml new file mode 100644 index 0000000000..cd08898c46 --- /dev/null +++ b/.ci/jobs/e2e-testing-schedule-daily.yml @@ -0,0 +1,26 @@ +--- +- job: + name: e2e-tests/e2e-testing-schedule-daily + display-name: Jobs scheduled daily (weekdays) + description: Jobs scheduled daily (weekdays) + view: E2E + project-type: pipeline + parameters: + - string: + name: branch_specifier + default: main + description: the Git branch specifier to build + pipeline-scm: + script-path: .ci/schedule-daily.groovy + scm: + - git: + url: git@github.com:elastic/e2e-testing.git + refspec: +refs/heads/*:refs/remotes/origin/* + wipe-workspace: 'True' + name: origin + shallow-clone: true + credentials-id: f6c7695a-671e-4f4f-a331-acdce44ff9ba + branches: + - $branch_specifier + triggers: + - timed: 'H H(2-3) * * 1-5' diff --git a/.ci/schedule-daily.groovy b/.ci/schedule-daily.groovy new file mode 100644 index 0000000000..7a674213b2 --- /dev/null +++ b/.ci/schedule-daily.groovy @@ -0,0 +1,45 @@ +@Library('apm@current') _ + +pipeline { + agent none + environment { + NOTIFY_TO = credentials('notify-to') + PIPELINE_LOG_LEVEL = 'INFO' + } + options { + timeout(time: 1, unit: 'HOURS') + buildDiscarder(logRotator(numToKeepStr: '20', artifactNumToKeepStr: '20')) + timestamps() + ansiColor('xterm') + disableResume() + durabilityHint('PERFORMANCE_OPTIMIZED') + } + triggers { + cron('H H(4-5) * * 1-5') + } + stages { + stage('Nighly e2e builds') { + steps { + runBuilds(quietPeriodFactor: 100, branches: ['main', '8.', '8.', '7.']) + } + } + } + post { + cleanup { + notifyBuildResult(prComment: false) + } + } +} + +def runBuilds(Map args = [:]) { + def branches = getBranchesFromAliases(aliases: args.branches) + + def quietPeriod = 0 + branches.each { branch -> + build(quietPeriod: quietPeriod, job: "e2e-tests/e2e-testing-fleet-daily-mbp/${branch}", wait: false, propagate: false) + build(quietPeriod: quietPeriod, job: "e2e-tests/e2e-testing-helm-daily-mbp/${branch}", wait: false, propagate: false) + build(quietPeriod: quietPeriod, job: "e2e-tests/e2e-testing-k8s-autodiscovery-daily-mbp/${branch}", wait: false, propagate: false) + // Increate the quiet period for the next iteration + quietPeriod += args.quietPeriodFactor + } +} From 7ace7256bd2b153ceb6812fb18f0824a6bcf3220 Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Mon, 21 Feb 2022 17:10:42 +0000 Subject: [PATCH 2/3] fix ident --- .ci/schedule-daily.groovy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.ci/schedule-daily.groovy b/.ci/schedule-daily.groovy index 7a674213b2..aff8e8cd2e 100644 --- a/.ci/schedule-daily.groovy +++ b/.ci/schedule-daily.groovy @@ -37,8 +37,8 @@ def runBuilds(Map args = [:]) { def quietPeriod = 0 branches.each { branch -> build(quietPeriod: quietPeriod, job: "e2e-tests/e2e-testing-fleet-daily-mbp/${branch}", wait: false, propagate: false) - build(quietPeriod: quietPeriod, job: "e2e-tests/e2e-testing-helm-daily-mbp/${branch}", wait: false, propagate: false) - build(quietPeriod: quietPeriod, job: "e2e-tests/e2e-testing-k8s-autodiscovery-daily-mbp/${branch}", wait: false, propagate: false) + build(quietPeriod: quietPeriod, job: "e2e-tests/e2e-testing-helm-daily-mbp/${branch}", wait: false, propagate: false) + build(quietPeriod: quietPeriod, job: "e2e-tests/e2e-testing-k8s-autodiscovery-daily-mbp/${branch}", wait: false, propagate: false) // Increate the quiet period for the next iteration quietPeriod += args.quietPeriodFactor } From c5c8684fb03a2e3908c489602a35818b19d16941 Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Tue, 22 Feb 2022 09:12:07 +0000 Subject: [PATCH 3/3] Enable 8.1 and disable 7.16 --- .backportrc.json | 4 ++-- .mergify.yml | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.backportrc.json b/.backportrc.json index edc8810f42..2275c52dfb 100644 --- a/.backportrc.json +++ b/.backportrc.json @@ -7,9 +7,9 @@ "multipleCommits": true, "prTitle": "{commitMessages} backport for {targetBranch}", "targetBranchChoices": [ + { "name": "8.1", "checked": true }, { "name": "8.0", "checked": true }, - { "name": "7.17", "checked": true }, - { "name": "7.16", "checked": true } + { "name": "7.17", "checked": true } ], "targetPRLabels": ["backport"], "upstream": "elastic/e2e-testing" diff --git a/.mergify.yml b/.mergify.yml index ec0a7e7861..64953b750f 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -18,41 +18,41 @@ pull_request_rules: git merge upstream/{{base}} git push upstream {{head}} ``` - - name: backport patches to 8.0 branch + - name: backport patches to 8.1 branch conditions: - merged - base=main - - label=backport-v8.0.0 + - label=backport-v8.1.0 actions: backport: assignees: - "{{ author }}" branches: - - "8.0" + - "8.1" title: "[{{ destination_branch }}](backport #{{ number }}) {{ title }}" - - name: backport patches to 7.17 branch + - name: backport patches to 8.0 branch conditions: - merged - base=main - - label=backport-v7.17.0 + - label=backport-v8.0.0 actions: backport: assignees: - "{{ author }}" branches: - - "7.17" + - "8.0" title: "[{{ destination_branch }}](backport #{{ number }}) {{ title }}" - - name: backport patches to 7.16 branch + - name: backport patches to 7.17 branch conditions: - merged - base=main - - label=backport-v7.16.0 + - label=backport-v7.17.0 actions: backport: assignees: - "{{ author }}" branches: - - "7.16" + - "7.17" title: "[{{ destination_branch }}](backport #{{ number }}) {{ title }}" - name: delete head branch after merge conditions: