Skip to content

Commit

Permalink
[7.17](backport elastic#2159) jjbb: daily job with branch aliases (el…
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Feb 23, 2022
1 parent 62b1aeb commit 9b0e1eb
Show file tree
Hide file tree
Showing 10 changed files with 92 additions and 18 deletions.
6 changes: 3 additions & 3 deletions .backportrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
"multipleCommits": true,
"prTitle": "{commitMessages} backport for {targetBranch}",
"targetBranchChoices": [
{ "name": "7.16", "checked": true },
{ "name": "7.15", "checked": true },
{ "name": "7.14", "checked": true }
{ "name": "8.1", "checked": true },
{ "name": "8.0", "checked": true },
{ "name": "7.17", "checked": true }
],
"targetPRLabels": ["backport"],
"upstream": "elastic/e2e-testing"
Expand Down
3 changes: 0 additions & 3 deletions .ci/e2eTestingFleetDaily.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 0 additions & 3 deletions .ci/e2eTestingHelmDaily.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 0 additions & 3 deletions .ci/e2eTestingK8SAutodiscoveryDaily.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion .ci/jobs/e2e-testing-fleet-daily-mbp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
scm:
- github:
branch-discovery: no-pr
head-filter-regex: '(main|8\.0|7\.16|7\.15)'
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
Expand Down
2 changes: 1 addition & 1 deletion .ci/jobs/e2e-testing-helm-daily-mbp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
scm:
- github:
branch-discovery: no-pr
head-filter-regex: '(main|8\.0|7\.16|7\.15)'
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
Expand Down
2 changes: 1 addition & 1 deletion .ci/jobs/e2e-testing-k8s-autodiscovery-daily-mbp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
scm:
- github:
branch-discovery: no-pr
head-filter-regex: '(main|8\.0|7\.16|7\.15)'
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
Expand Down
26 changes: 26 additions & 0 deletions .ci/jobs/e2e-testing-schedule-daily.yml
Original file line number Diff line number Diff line change
@@ -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: [email protected]: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'
45 changes: 45 additions & 0 deletions .ci/schedule-daily.groovy
Original file line number Diff line number Diff line change
@@ -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.<minor>', '8.<next-patch>', '7.<minor>'])
}
}
}
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
}
}
18 changes: 15 additions & 3 deletions .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,18 @@ pull_request_rules:
git merge upstream/{{base}}
git push upstream {{head}}
```
- name: backport patches to 8.1 branch
conditions:
- merged
- base=main
- label=backport-v8.1.0
actions:
backport:
assignees:
- "{{ author }}"
branches:
- "8.1"
title: "[{{ destination_branch }}](backport #{{ number }}) {{ title }}"
- name: backport patches to 8.0 branch
conditions:
- merged
Expand All @@ -30,17 +42,17 @@ pull_request_rules:
branches:
- "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: backport patches to 7.15 branch
conditions:
Expand Down

0 comments on commit 9b0e1eb

Please sign in to comment.