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

Commit

Permalink
[8.0](backport #1928) Update main branch (#1931)
Browse files Browse the repository at this point in the history
* Update main branch (#1928)

(cherry picked from commit 304c97f)

# Conflicts:
#	.ci/jobs/e2e-testing-fleet-daily-mbp.yml
#	.ci/jobs/e2e-testing-helm-daily-mbp.yml
#	.ci/jobs/e2e-testing-k8s-autodiscovery-daily-mbp.yml
#	.ci/jobs/e2e-testing-mbp.yml
#	.mergify.yml

* use main version for mergify and jjbb

Co-authored-by: Victor Martinez <[email protected]>
  • Loading branch information
mergify[bot] and v1v authored Dec 20, 2021
1 parent 339690b commit 6c98999
Show file tree
Hide file tree
Showing 15 changed files with 78 additions and 35 deletions.
6 changes: 3 additions & 3 deletions .ci/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ pipeline {
issueCommentTrigger("${obltGitHubComments()}")
}
parameters {
booleanParam(name: 'Run_As_Master_Branch', defaultValue: false, description: 'Allow to run any steps on a PR, some steps normally only run on master branch.')
booleanParam(name: 'Run_As_Main_Branch', defaultValue: false, description: 'Allow to run any steps on a PR, some steps normally only run on main branch.')
booleanParam(name: "SKIP_SCENARIOS", defaultValue: true, description: "If it's needed to skip those scenarios marked as @skip. Default true")
booleanParam(name: "NIGHTLY_SCENARIOS", defaultValue: false, description: "If it's needed to include the scenarios marked as @nightly in the test execution. Default false")
string(name: 'runTestsSuites', defaultValue: '', description: 'A comma-separated list of test suites to run (default: empty to run all test suites)')
Expand Down Expand Up @@ -460,10 +460,10 @@ def generateFunctionalTestStep(Map args = [:]){

// TODO: Is this still relevant?
if (isPR() || isUpstreamTrigger(filter: 'PR-')) {
// when the "Run_As_Master_Branch" param is disabled, we will honour the PR filters, which
// when the "Run_As_Main_Branch" param is disabled, we will honour the PR filters, which
// basically exclude some less frequent platforms or operative systems. If the user enabled
// this param, the pipeline will remove the filters from the test runner.
if (!params.Run_As_Master_Branch) {
if (!params.Run_As_Main_Branch) {
tags += pullRequestFilter
}
}
Expand Down
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)
}
parameters {
string(name: 'BRANCH_SPECIFIER', defaultValue: 'master', description: 'It would not be defined on the first build, see JENKINS-41929.')
string(name: 'BRANCH_SPECIFIER', defaultValue: 'main', description: 'It would not be defined on the first build, see JENKINS-41929.')
}
triggers {
cron 'H H(4-5) * * 1-5'
Expand Down
2 changes: 1 addition & 1 deletion .ci/e2eFleetServer.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def getE2EBaseBranch() {
if (!prID.isInteger()) {
// we are building a branch on Fleet Server
setEnvVar('BASE_REF', prID)
// in the case we are triggering the job for a branch (i.e master, 7.16 we directly use branch name as Docker tag
// in the case we are triggering the job for a branch (i.e main, 7.16 we directly use branch name as Docker tag
return prID
}

Expand Down
6 changes: 3 additions & 3 deletions .ci/e2eKibana.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ pipeline {
)
}
parameters {
string(name: 'kibana_pr', defaultValue: "master", description: "PR ID to use to build the Docker image. (e.g 10000)")
string(name: 'kibana_pr', defaultValue: "main", description: "PR ID to use to build the Docker image. (e.g 10000)")
}
stages {
stage('Initialize'){
Expand Down Expand Up @@ -150,7 +150,7 @@ def getDockerTagFromPayload() {
def prID = getID()

if (!prID.isInteger()) {
// in the case we are triggering the job for a branch (i.e master, 7.16) we directly use branch name as Docker tag
// in the case we are triggering the job for a branch (i.e main, 7.16) we directly use branch name as Docker tag
setEnvVar("BASE_REF", prID)
return prID
}
Expand Down Expand Up @@ -186,7 +186,7 @@ def pushMultiPlatformManifest() {
def dockerTag = "${env.DOCKER_TAG}"

dir("${BASE_DIR}") {
def url = 'https://raw.githubusercontent.com/elastic/e2e-testing/master/.ci/scripts/push-multiplatform-manifest.sh'
def url = 'https://raw.githubusercontent.com/elastic/e2e-testing/main/.ci/scripts/push-multiplatform-manifest.sh'
retryWithSleep(retries: 3, seconds: 5, backoff: true) {
sh(label: 'Download script', script: "wget -q -O push-multiplatform-manifest.sh ${url}")
sh(label: 'Grant permissions to script', script: "chmod +x push-multiplatform-manifest.sh")
Expand Down
2 changes: 1 addition & 1 deletion .ci/jobs/build-docker-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
credentials-id: f6c7695a-671e-4f4f-a331-acdce44ff9ba
reference-repo: /var/lib/jenkins/.git-references/e2e-testing.git
branches:
- master
- main
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: '(master|7\.16|7\.15)'
head-filter-regex: '(main|8\.0|7\.16|7\.15)'
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: '(master|7\.16|7\.15)'
head-filter-regex: '(main|8\.0|7\.16|7\.15)'
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: '(master|7\.16|7\.15)'
head-filter-regex: '(main|8\.0|7\.16|7\.15)'
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-mbp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
scm:
- github:
branch-discovery: no-pr
head-filter-regex: '(master|PR-.*|v\d\.d\.d|7\.16|7\.15)'
head-filter-regex: '(main|PR-.*|v\d\.d\.d|8\.0|7\.16|7\.15)'
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/fleet-server-e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@
shallow-clone: true
credentials-id: f6c7695a-671e-4f4f-a331-acdce44ff9ba
branches:
- "master"
- "main"
triggers: []
2 changes: 1 addition & 1 deletion .ci/jobs/kibana-e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@
shallow-clone: true
credentials-id: f6c7695a-671e-4f4f-a331-acdce44ff9ba
branches:
- "master"
- "main"
triggers: []
71 changes: 57 additions & 14 deletions .mergify.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
queue_rules:
- name: default
conditions:
- check-success=beats-ci/e2e-testing/pr-merge

pull_request_rules:
- name: ask to resolve conflict
conditions:
Expand All @@ -13,11 +18,23 @@ pull_request_rules:
git merge upstream/{{base}}
git push upstream {{head}}
```
- name: backport patches to 8.0 branch
conditions:
- merged
- base=main
- label=backport-v8.0.0
actions:
backport:
assignees:
- "{{ author }}"
branches:
- "8.0"
title: "[{{ destination_branch }}](backport #{{ number }}) {{ title }}"
- name: backport patches to 7.16 branch
conditions:
- merged
- base=master
- label=v7.16.0
- base=main
- label=backport-v7.16.0
actions:
backport:
assignees:
Expand All @@ -28,8 +45,8 @@ pull_request_rules:
- name: backport patches to 7.15 branch
conditions:
- merged
- base=master
- label=v7.15.0
- base=main
- label=backport-v7.15.0
actions:
backport:
assignees:
Expand All @@ -42,46 +59,72 @@ pull_request_rules:
- merged
actions:
delete_head_branch:
- name: automatic squash and merge with success checks and the files matching the regex docker-compose.yml$ are modified.
- name: automatic squash and merge with success checks for those automated PRs created by the apmmachine.
conditions:
- -merged
- -closed
- check-success=beats-ci/e2e-testing/pr-merge
- label=automation
- files~=docker-compose\.yml$
- author=apmmachine
- head~=^update-.*-version.*
actions:
merge:
queue:
method: squash
strict: smart+fasttrack
- name: delete upstream branch after merging changes on docker-compose.yml or it's closed
name: default
- name: delete upstream branch after merging changes the automated PR or it's closed
conditions:
- or:
- merged
- closed
- and:
- label=automation
- head~=^update-.*-version.*
- files~=docker-compose\.yml$
actions:
delete_head_branch:
- name: remove-backport label
conditions:
- label~=^v7.*
- label~=backport-v
actions:
label:
remove:
- backport-skip
- name: notify the backport policy
conditions:
- -label~=(^backport|^v7.*)
- base=master
- -label~=^backport
- base=main
actions:
comment:
message: |
This pull request does not have a backport label. Could you fix it @{{author}}? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:
* `v./d./d./d` is the label to automatically backport to the `7./d` branch. `/d` is the digit
* `backport-v./d./d./d` is the label to automatically backport to the `7./d` branch. `/d` is the digit
**NOTE**: `backport-skip` has been added to this pull request.
label:
add:
- backport-skip
- name: notify the backport has not been merged yet
conditions:
- -merged
- -closed
- author=mergify[bot]
- "#check-success>0"
- schedule=Mon-Mon 06:00-10:00[Europe/Paris]
- created-at<2 days ago
actions:
comment:
message: |
This pull request has not been merged yet. Could you please review and merge it @{{ assignee | join(', @') }}? 🙏
- name: automatic close the automated PRs that have not been merged.
conditions:
- -merged
- -closed
- author=apmmachine
- schedule=Mon-Fri 06:00-10:00[Europe/Paris]
- created-at<3 days ago
- head~=^update-.*-version.*
actions:
close:
message: |
This pull request has been automatically closed by Mergify.
There are likely new up-to-date and open pull requests.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Build Status](https://beats-ci.elastic.co/buildStatus/icon?job=e2e-tests%2Fe2e-testing-mbp%2Fmaster)](https://beats-ci.elastic.co/job/e2e-tests/job/e2e-testing-mbp/job/master/)
[![Build Status](https://beats-ci.elastic.co/buildStatus/icon?job=e2e-tests%2Fe2e-testing-mbp%2Fmain)](https://beats-ci.elastic.co/job/e2e-tests/job/e2e-testing-mbp/job/main/)

# End-2-End tests for the Observability projects

Expand Down
2 changes: 1 addition & 1 deletion cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ Projects that have to build a dependency are harder to maintain, because the way
If we are able to remove this build part on a consumer, then the code base would be simpler, increasing how it's used by developers.

#### Build time
Projects that have to build a dependency uses more CI time, as they have to build the dependencies each time the CI triggers a job, be it a PR or branch. It's true that Jenkins (an other CI providers) allows to skip stages depending on conditions, but in the end we always need to build the dependencies at some point (probably at the merge to master).
Projects that have to build a dependency uses more CI time, as they have to build the dependencies each time the CI triggers a job, be it a PR or branch. It's true that Jenkins (an other CI providers) allows to skip stages depending on conditions, but in the end we always need to build the dependencies at some point (probably at the merge to main).

If we are able to remove this build part on a consumer, then the CI build will take less time to finish, as we will consume already published artefacts instead of building them. The pull time will be taken into consideration too, but it would be way faster than the build time.

Expand Down
8 changes: 4 additions & 4 deletions e2e/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ In the following example, we will run the Fleet tests for the 8.0.0-SNAPSHOT sta

```shell
# Use the proper branch
git checkout master
git checkout main
# Run the tests for a specific branch
TAGS="fleet_mode_agent" \
TIMEOUT_FACTOR=3 LOG_LEVEL=TRACE \
Expand All @@ -159,7 +159,7 @@ TAGS="fleet_mode_agent" \
Or running by feature file:
```shell
# Use the proper branch
git checkout master
git checkout main
FEATURES="fleet_mode_agent.feature" \
TIMEOUT_FACTOR=3 LOG_LEVEL=TRACE \
BEAT_VERSION="7.10.1" \
Expand Down Expand Up @@ -191,7 +191,7 @@ To do so:

1. Navigate to Jenkins: https://beats-ci.elastic.co/job/e2e-tests/job/e2e-testing-mbp/
1. Login as a user
1. Select the base branch for the test code: master (for 8.0.0-SNAPSHOT), 7.16, or any other maintenance branch.
1. Select the base branch for the test code: main (for 8.0.0-SNAPSHOT), 7.16, or any other maintenance branch.
1. In the left menu, click on `Buid with Parameters`.
1. In the input parameters form, set the stack version (for Fleet) using the specific variables for the test suite.
1. (Optional) Set the product version (Fleet or Helm charts) using the specific variables for the test suite if you want to consume a different artifact.
Expand All @@ -209,7 +209,7 @@ To do so:

1. Navigate to Jenkins: https://beats-ci.elastic.co/job/e2e-tests/job/e2e-testing-mbp/
1. Login as a user
1. Select the base branch for the test code: 7.14, 7.15, 7.16 or master.
1. Select the base branch for the test code: 7.14, 7.15, 7.16 or main.
1. In the left menu, click on `Buid with Parameters`.
1. In the input parameters form, keep the Beat version (for Fleet) as is, to use each branch's default version.
1. In the input parameters form, keep the stack version (for Fleet) as is, to use each branch's default version.
Expand Down

0 comments on commit 6c98999

Please sign in to comment.