From c4bf3a7436369634b2472b994c0909dd8f1ba7f3 Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Mon, 20 Dec 2021 10:50:23 +0000 Subject: [PATCH] Update main branch (#1928) (cherry picked from commit 304c97fadb1e7a62dc689b459e81b3dd0a9595b8) # 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 --- .ci/Jenkinsfile | 6 ++-- .ci/build-docker-images.groovy | 2 +- .ci/e2eFleetServer.groovy | 2 +- .ci/e2eKibana.groovy | 6 ++-- .ci/jobs/build-docker-images.yml | 2 +- .ci/jobs/e2e-testing-fleet-daily-mbp.yml | 4 +++ .ci/jobs/e2e-testing-helm-daily-mbp.yml | 4 +++ ...2e-testing-k8s-autodiscovery-daily-mbp.yml | 4 +++ .ci/jobs/e2e-testing-mbp.yml | 4 +++ .ci/jobs/fleet-server-e2e-tests.yml | 2 +- .ci/jobs/kibana-e2e-tests.yml | 2 +- .mergify.yml | 30 +++++++++++++++++++ README.md | 2 +- cli/README.md | 2 +- e2e/README.md | 8 ++--- 15 files changed, 63 insertions(+), 17 deletions(-) diff --git a/.ci/Jenkinsfile b/.ci/Jenkinsfile index ee633640a6..fdc2166831 100644 --- a/.ci/Jenkinsfile +++ b/.ci/Jenkinsfile @@ -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)') @@ -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 } } diff --git a/.ci/build-docker-images.groovy b/.ci/build-docker-images.groovy index 2ebb595739..99d544c384 100644 --- a/.ci/build-docker-images.groovy +++ b/.ci/build-docker-images.groovy @@ -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' diff --git a/.ci/e2eFleetServer.groovy b/.ci/e2eFleetServer.groovy index 541b5f1637..31133a5a88 100644 --- a/.ci/e2eFleetServer.groovy +++ b/.ci/e2eFleetServer.groovy @@ -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 } diff --git a/.ci/e2eKibana.groovy b/.ci/e2eKibana.groovy index 6bc2a7da1c..c96ac360e0 100644 --- a/.ci/e2eKibana.groovy +++ b/.ci/e2eKibana.groovy @@ -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'){ @@ -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 } @@ -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") diff --git a/.ci/jobs/build-docker-images.yml b/.ci/jobs/build-docker-images.yml index 17f9c4c49e..5dcdb7c918 100644 --- a/.ci/jobs/build-docker-images.yml +++ b/.ci/jobs/build-docker-images.yml @@ -17,4 +17,4 @@ credentials-id: f6c7695a-671e-4f4f-a331-acdce44ff9ba reference-repo: /var/lib/jenkins/.git-references/e2e-testing.git branches: - - master + - main diff --git a/.ci/jobs/e2e-testing-fleet-daily-mbp.yml b/.ci/jobs/e2e-testing-fleet-daily-mbp.yml index 71d30fcd73..5c9222c205 100644 --- a/.ci/jobs/e2e-testing-fleet-daily-mbp.yml +++ b/.ci/jobs/e2e-testing-fleet-daily-mbp.yml @@ -9,7 +9,11 @@ scm: - github: branch-discovery: no-pr +<<<<<<< HEAD head-filter-regex: '(master|7\.16|7\.15)' +======= + head-filter-regex: '(main|8\.0|7\.16|7\.15)' +>>>>>>> 304c97f (Update main branch (#1928)) 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 fb6560fe66..711cc3ed2b 100644 --- a/.ci/jobs/e2e-testing-helm-daily-mbp.yml +++ b/.ci/jobs/e2e-testing-helm-daily-mbp.yml @@ -9,7 +9,11 @@ scm: - github: branch-discovery: no-pr +<<<<<<< HEAD head-filter-regex: '(master|7\.16|7\.15)' +======= + head-filter-regex: '(main|8\.0|7\.16|7\.15)' +>>>>>>> 304c97f (Update main branch (#1928)) 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 113f9b36d6..451ce0caaf 100644 --- a/.ci/jobs/e2e-testing-k8s-autodiscovery-daily-mbp.yml +++ b/.ci/jobs/e2e-testing-k8s-autodiscovery-daily-mbp.yml @@ -9,7 +9,11 @@ scm: - github: branch-discovery: no-pr +<<<<<<< HEAD head-filter-regex: '(master|7\.16|7\.15)' +======= + head-filter-regex: '(main|8\.0|7\.16|7\.15)' +>>>>>>> 304c97f (Update main branch (#1928)) discover-pr-forks-strategy: merge-current discover-pr-forks-trust: permission discover-pr-origin: merge-current diff --git a/.ci/jobs/e2e-testing-mbp.yml b/.ci/jobs/e2e-testing-mbp.yml index 7fd5f6c748..2985bf2fe5 100644 --- a/.ci/jobs/e2e-testing-mbp.yml +++ b/.ci/jobs/e2e-testing-mbp.yml @@ -14,7 +14,11 @@ scm: - github: branch-discovery: no-pr +<<<<<<< HEAD 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)' +>>>>>>> 304c97f (Update main branch (#1928)) discover-pr-forks-strategy: merge-current discover-pr-forks-trust: permission discover-pr-origin: merge-current diff --git a/.ci/jobs/fleet-server-e2e-tests.yml b/.ci/jobs/fleet-server-e2e-tests.yml index 46db114cd7..751b986cf5 100644 --- a/.ci/jobs/fleet-server-e2e-tests.yml +++ b/.ci/jobs/fleet-server-e2e-tests.yml @@ -14,5 +14,5 @@ shallow-clone: true credentials-id: f6c7695a-671e-4f4f-a331-acdce44ff9ba branches: - - "master" + - "main" triggers: [] diff --git a/.ci/jobs/kibana-e2e-tests.yml b/.ci/jobs/kibana-e2e-tests.yml index c068568929..5ad96909b2 100644 --- a/.ci/jobs/kibana-e2e-tests.yml +++ b/.ci/jobs/kibana-e2e-tests.yml @@ -14,5 +14,5 @@ shallow-clone: true credentials-id: f6c7695a-671e-4f4f-a331-acdce44ff9ba branches: - - "master" + - "main" triggers: [] diff --git a/.mergify.yml b/.mergify.yml index 8dcfb35707..6b1258b076 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -13,11 +13,31 @@ pull_request_rules: git merge upstream/{{base}} git push upstream {{head}} ``` +<<<<<<< HEAD - name: backport patches to 7.16 branch conditions: - merged - base=master - label=v7.16.0 +======= + - 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=main + - label=backport-v7.16.0 +>>>>>>> 304c97f (Update main branch (#1928)) actions: backport: assignees: @@ -28,8 +48,13 @@ pull_request_rules: - name: backport patches to 7.15 branch conditions: - merged +<<<<<<< HEAD - base=master - label=v7.15.0 +======= + - base=main + - label=backport-v7.15.0 +>>>>>>> 304c97f (Update main branch (#1928)) actions: backport: assignees: @@ -72,8 +97,13 @@ pull_request_rules: - backport-skip - name: notify the backport policy conditions: +<<<<<<< HEAD - -label~=(^backport|^v7.*) - base=master +======= + - -label~=^backport + - base=main +>>>>>>> 304c97f (Update main branch (#1928)) actions: comment: message: | diff --git a/README.md b/README.md index 994502ff08..657fa60f0f 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/cli/README.md b/cli/README.md index 3c7fd12eae..be641f2866 100644 --- a/cli/README.md +++ b/cli/README.md @@ -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. diff --git a/e2e/README.md b/e2e/README.md index cce2eb9b0d..37f953f3a1 100644 --- a/e2e/README.md +++ b/e2e/README.md @@ -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 \ @@ -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" \ @@ -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. @@ -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.