Skip to content

Commit

Permalink
use main default branch (#29710)
Browse files Browse the repository at this point in the history
(cherry picked from commit 2379370)

# Conflicts:
#	.ci/jobs/apm-beats-update.yml
#	.ci/jobs/beats-tester.yml
#	.ci/jobs/beats.yml
#	.ci/jobs/packaging.yml
#	.ci/schedule-daily.groovy
#	.ci/schedule-weekly.groovy
#	.mergify.yml
#	README.md
#	filebeat/_meta/test/docs/testing.md
#	x-pack/elastic-agent/README.md
  • Loading branch information
v1v authored and mergify-bot committed Feb 3, 2022
1 parent a6454f2 commit 7b7fa34
Show file tree
Hide file tree
Showing 33 changed files with 220 additions and 49 deletions.
2 changes: 1 addition & 1 deletion .ci/apm-beats-update.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ pipeline {
when {
beforeAgent true
anyOf {
branch 'master'
branch 'main'
branch "\\d+\\.\\d+"
branch "v\\d?"
tag "v\\d+\\.\\d+\\.\\d+*"
Expand Down
2 changes: 1 addition & 1 deletion .ci/beats-tester-bc.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ pipeline {
}
parameters {
string(name: 'version', defaultValue: '', description: 'Id of the Build Candidate (7.10.0-b55684ff).')
string(name: 'BRANCH_REFERENCE', defaultValue: 'master', description: 'Branch to grab the Groovy script(for test changes).')
string(name: 'BRANCH_REFERENCE', defaultValue: 'main', description: 'Branch to grab the Groovy script(for test changes).')
}
stages {
stage('Run Beat Tester') {
Expand Down
6 changes: 3 additions & 3 deletions .ci/beats-tester.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ pipeline {
setEnvVar('VERSION', sh(script: "grep ':stack-version:' ${BASE_DIR}/libbeat/docs/version.asciidoc | cut -d' ' -f2", returnStdout: true).trim())
}
}
stage('Build master') {
stage('Build main') {
options { skipDefaultCheckout() }
when { branch 'master' }
when { branch 'main' }
steps {
runBeatsTesterJob(version: "${env.VERSION}-SNAPSHOT")
}
Expand All @@ -78,7 +78,7 @@ pipeline {
when {
not {
anyOf {
branch comparator: 'REGEXP', pattern: '(master|.*x)'
branch comparator: 'REGEXP', pattern: '(main|.*x)'
changeRequest()
}
}
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 @@ -29,7 +29,7 @@ pipeline {
}
parameters {
booleanParam(name: "RELEASE_TEST_IMAGES", defaultValue: "true", description: "If it's needed to build & push Beats' test images")
string(name: 'BRANCH_REFERENCE', defaultValue: "master", description: "Git branch/tag to use")
string(name: 'BRANCH_REFERENCE', defaultValue: "main", description: "Git branch/tag to use")
}
stages {
stage('Checkout') {
Expand Down
8 changes: 6 additions & 2 deletions .ci/jobs/apm-beats-update.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
- job:
name: Beats/apm-beats-update
display-name: 'APM Server Beats update'
description: 'Check if the Beats lib update works on the APM server master branch'
description: 'Check if the Beats lib update works on the APM server main branch'
view: Beats
concurrent: true
project-type: multibranch
Expand All @@ -18,7 +18,11 @@
discover-pr-forks-trust: 'permission'
discover-pr-origin: 'merge-current'
discover-tags: true
<<<<<<< HEAD
head-filter-regex: '(master|7\.[x789]|7\.1\d|8\.\d+|PR-.*|v\d+\.\d+\.\d+)'
=======
head-filter-regex: '(main|7\.1[6789]|8\.\d+|PR-.*|v\d+\.\d+\.\d+)'
>>>>>>> 237937085 (use main default branch (#29710))
disable-pr-notifications: true
notification-context: 'apm-beats-update'
repo: 'beats'
Expand All @@ -33,7 +37,7 @@
ignore-tags-newer-than: 30
- named-branches:
- exact-name:
name: 'master'
name: 'main'
case-sensitive: true
- regex-name:
regex: '7\.[x789]'
Expand Down
2 changes: 1 addition & 1 deletion .ci/jobs/beats-schedule-daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
parameters:
- string:
name: branch_specifier
default: master
default: main
description: the Git branch specifier to build
pipeline-scm:
script-path: .ci/schedule-daily.groovy
Expand Down
2 changes: 1 addition & 1 deletion .ci/jobs/beats-schedule-weekly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
parameters:
- string:
name: branch_specifier
default: master
default: main
description: the Git branch specifier to build
pipeline-scm:
script-path: .ci/schedule-weekly.groovy
Expand Down
2 changes: 1 addition & 1 deletion .ci/jobs/beats-test-infra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
credentials-id: f6c7695a-671e-4f4f-a331-acdce44ff9ba
reference-repo: /var/lib/jenkins/.git-references/apm-test-pipeline.git
branches:
- master
- main
triggers:
- timed: 'H H(3-4) * * 1-5'
2 changes: 1 addition & 1 deletion .ci/jobs/beats-tester-bc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
parameters:
- string:
name: BRANCH_REFERENCE
default: master
default: main
description: the Git branch specifier
pipeline-scm:
script-path: .ci/beats-tester-bc.groovy
Expand Down
6 changes: 5 additions & 1 deletion .ci/jobs/beats-tester.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@
discover-pr-forks-trust: 'permission'
discover-pr-origin: 'merge-current'
discover-tags: true
<<<<<<< HEAD
head-filter-regex: '(master|7\.([x9]|1\d+)|8\.\d+|PR-.*|v\d+\.\d+\.\d+)'
=======
head-filter-regex: '(main|7\.1[6789]|8\.\d+|PR-.*|v\d+\.\d+\.\d+)'
>>>>>>> 237937085 (use main default branch (#29710))
disable-pr-notifications: true
notification-context: 'beats-tester'
repo: 'beats'
Expand All @@ -29,7 +33,7 @@
ignore-tags-newer-than: 30
- named-branches:
- exact-name:
name: 'master'
name: 'main'
case-sensitive: true
- regex-name:
regex: '7\.([x9]|1\d+)'
Expand Down
6 changes: 5 additions & 1 deletion .ci/jobs/beats.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@
discover-pr-forks-strategy: 'merge-current'
discover-pr-forks-trust: 'permission'
discover-pr-origin: 'merge-current'
<<<<<<< HEAD
head-filter-regex: '(master|6\.[89]|7\.[x789]|7\.1\d|8\.\d+|PR-.*|v\d+\.\d+\.\d+)'
=======
head-filter-regex: '(main|6\.[89]|7\.1[6789]|8\.\d+|PR-.*|v\d+\.\d+\.\d+)'
>>>>>>> 237937085 (use main default branch (#29710))
discover-tags: true
notification-context: "beats-ci"
repo: 'beats'
Expand All @@ -33,7 +37,7 @@
ignore-target-only-changes: true
- named-branches:
- exact-name:
name: 'master'
name: 'main'
case-sensitive: true
- regex-name:
regex: '6\.[89]'
Expand Down
2 changes: 1 addition & 1 deletion .ci/jobs/build-it-docker-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
parameters:
- string:
name: BRANCH_REFERENCE
default: master
default: main
description: the Git branch specifier
pipeline-scm:
script-path: .ci/build-docker-images.groovy
Expand Down
6 changes: 5 additions & 1 deletion .ci/jobs/packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@
discover-pr-forks-trust: 'permission'
discover-pr-origin: 'merge-current'
discover-tags: true
<<<<<<< HEAD
head-filter-regex: '(master|7\.[x789]|7\.1\d|8\.\d+|PR-.*|v\d+\.\d+\.\d+)'
=======
head-filter-regex: '(main|7\.1[6789]|8\.\d+|PR-.*|v\d+\.\d+\.\d+)'
>>>>>>> 237937085 (use main default branch (#29710))
disable-pr-notifications: true
notification-context: 'beats-packaging'
repo: 'beats'
Expand All @@ -29,7 +33,7 @@
ignore-tags-newer-than: 30
- named-branches:
- exact-name:
name: 'master'
name: 'main'
case-sensitive: true
- regex-name:
regex: '7\.[x789]'
Expand Down
4 changes: 2 additions & 2 deletions .ci/packer_cache.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ if [ -x "$(command -v docker)" ]; then
## Probably we need a different approach to search the latest minor.
latestMinor=$(curl -s https://api.github.com/repos/elastic/beats/branches\?per_page=100 | jq -r '.[].name' | grep "^7." | tail -1)

for branch in master 7.x $latestMinor ; do
if [ "$branch" != "master" ] ; then
for branch in main $latestMinor ; do
if [ "$branch" != "main" ] ; then
echo "Checkout the branch $branch"
git checkout "$branch"
fi
Expand Down
4 changes: 4 additions & 0 deletions .ci/schedule-daily.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,13 @@ pipeline {
stages {
stage('Nighly beats builds') {
steps {
<<<<<<< HEAD
runBuild(quietPeriod: 0, job: 'Beats/beats/master')
runBuild(quietPeriod: 2000, job: 'Beats/beats/7.16')
runBuild(quietPeriod: 4000, job: 'Beats/beats/7.15')
=======
runBuilds(quietPeriodFactor: 2000, branches: ['main', '8.<minor>', '7.<minor>', '7.<next-minor>'])
>>>>>>> 237937085 (use main default branch (#29710))
}
}
}
Expand Down
4 changes: 4 additions & 0 deletions .ci/schedule-weekly.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,13 @@ pipeline {
stages {
stage('Weekly beats builds') {
steps {
<<<<<<< HEAD
runBuild(quietPeriod: 0, job: 'Beats/beats/master')
runBuild(quietPeriod: 1000, job: 'Beats/beats/7.16')
runBuild(quietPeriod: 2000, job: 'Beats/beats/7.15')
=======
runBuilds(quietPeriodFactor: 1000, branches: ['main', '8.<minor>', '7.<minor>', '7.<next-minor>'])
>>>>>>> 237937085 (use main default branch (#29710))
}
}
}
Expand Down
14 changes: 12 additions & 2 deletions .mergify.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
pull_request_rules:
- name: forward-port patches to master branch
- name: forward-port patches to main branch
conditions:
- merged
<<<<<<< HEAD
- label=backport-v8.0.0
=======
- label=forwardport-main
>>>>>>> 237937085 (use main default branch (#29710))
actions:
backport:
assignees:
- "{{ author }}"
branches:
- "master"
- "main"
labels:
- "backport"
title: "[{{ destination_branch }}](backport #{{ number }}) {{ title }}"
Expand Down Expand Up @@ -104,7 +108,13 @@ pull_request_rules:
- name: notify the backport policy
conditions:
- -label~=^backport
<<<<<<< HEAD
- base=master
=======
- base=main
- -merged
- -closed
>>>>>>> 237937085 (use main default branch (#29710))
actions:
comment:
message: |
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG-developer.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ other Beats should be migrated.
Note: This changelog was only started after the 6.3 release.

=== Beats version 8.0.0
https://github.com/elastic/beats/compare/7.x..master[Check the HEAD diff]
https://github.com/elastic/beats/compare/7.x..main[Check the HEAD diff]

==== Breaking changes
- Replace custom Pins type for a slice of string for defining the `ca_sha256` values.
Expand Down
4 changes: 2 additions & 2 deletions CHANGELOG-developer.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ Note: This changelog documents the current changes which are not yet present in
an actual release.

=== Beats version HEAD
https://github.com/elastic/beats/compare/v7.0.0-rc2..master[Check the HEAD diff]
https://github.com/elastic/beats/compare/v7.0.0-rc2..main[Check the HEAD diff]

The list below covers the major changes between 7.0.0-rc2 and master only.
The list below covers the major changes between 7.0.0-rc2 and main only.

==== Breaking changes

Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
:pull: https://github.com/elastic/beats/pull/

=== Beats version HEAD
https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD diff]
https://github.com/elastic/beats/compare/v7.0.0-alpha2...main[Check the HEAD diff]

==== Breaking changes

Expand Down
13 changes: 3 additions & 10 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ def runBuildAndTest(Map args = [:]) {


/**
* There are only two supported branches, master and 7.x
* Only supported the main branch
*/
def getFlakyBranch() {
if(isPR()) {
Expand All @@ -255,17 +255,10 @@ def getFlakyBranch() {
}

/**
* There are only two supported branches, master and 7.x
* Only supported the main branch
*/
def getBranchIndice(String compare) {
if (compare?.equals('master') || compare.equals('7.x')) {
return compare
} else {
if (compare.startsWith('7.')) {
return '7.x'
}
}
return 'master'
return 'main'
}

/**
Expand Down
21 changes: 20 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
<<<<<<< HEAD
[![Build Status](https://beats-ci.elastic.co/job/Beats/job/beats/job/8.0/badge/icon)](https://beats-ci.elastic.co/job/Beats/job/beats/job/8.0/)
=======
[![Build Status](https://beats-ci.elastic.co/job/Beats/job/beats/job/main/badge/icon)](https://beats-ci.elastic.co/job/Beats/job/beats/job/main/)
>>>>>>> 237937085 (use main default branch (#29710))
[![GoReportCard](http://goreportcard.com/badge/elastic/beats)](http://goreportcard.com/report/elastic/beats)
[![Reviewed by Hound](https://img.shields.io/badge/Reviewed_by-Hound-8E64B0.svg)](https://houndci.com)

Expand All @@ -14,11 +18,16 @@ By "lightweight", we mean that Beats have a small installation footprint, use
limited system resources, and have no runtime dependencies.

This repository contains
<<<<<<< HEAD
[libbeat](https://github.com/elastic/beats/tree/8.0/libbeat), our Go
=======
[libbeat](https://github.com/elastic/beats/tree/main/libbeat), our Go
>>>>>>> 237937085 (use main default branch (#29710))
framework for creating Beats, and all the officially supported Beats:

Beat | Description
--- | ---
<<<<<<< HEAD
[Auditbeat](https://github.com/elastic/beats/tree/8.0/auditbeat) | Collect your Linux audit framework data and monitor the integrity of your files.
[Filebeat](https://github.com/elastic/beats/tree/8.0/filebeat) | Tails and ships log files
[Functionbeat](https://github.com/elastic/beats/tree/8.0/x-pack/functionbeat) | Read and ships events from serverless infrastructure.
Expand All @@ -27,6 +36,16 @@ Beat | Description
[Packetbeat](https://github.com/elastic/beats/tree/8.0/packetbeat) | Monitors the network and applications by sniffing packets
[Winlogbeat](https://github.com/elastic/beats/tree/8.0/winlogbeat) | Fetches and ships Windows Event logs
[Osquerybeat](https://github.com/elastic/beats/tree/8.0/x-pack/osquerybeat) | Runs Osquery and manages interraction with it.
=======
[Auditbeat](https://github.com/elastic/beats/tree/main/auditbeat) | Collect your Linux audit framework data and monitor the integrity of your files.
[Filebeat](https://github.com/elastic/beats/tree/main/filebeat) | Tails and ships log files
[Functionbeat](https://github.com/elastic/beats/tree/main/x-pack/functionbeat) | Read and ships events from serverless infrastructure.
[Heartbeat](https://github.com/elastic/beats/tree/main/heartbeat) | Ping remote services for availability
[Metricbeat](https://github.com/elastic/beats/tree/main/metricbeat) | Fetches sets of metrics from the operating system and services
[Packetbeat](https://github.com/elastic/beats/tree/main/packetbeat) | Monitors the network and applications by sniffing packets
[Winlogbeat](https://github.com/elastic/beats/tree/main/winlogbeat) | Fetches and ships Windows Event logs
[Osquerybeat](https://github.com/elastic/beats/tree/main/x-pack/osquerybeat) | Runs Osquery and manages interraction with it.
>>>>>>> 237937085 (use main default branch (#29710))
In addition to the above Beats, which are officially supported by
[Elastic](https://elastic.co), the community has created a set of other Beats
Expand Down Expand Up @@ -87,7 +106,7 @@ your dev environment to build Beats from the source.

## Snapshots

For testing purposes, we generate snapshot builds that you can find [here](https://artifacts-api.elastic.co/v1/search/8.0-SNAPSHOT/). Please be aware that these are built on top of master and are not meant for production.
For testing purposes, we generate snapshot builds that you can find [here](https://artifacts-api.elastic.co/v1/search/8.0-SNAPSHOT/). Please be aware that these are built on top of main and are not meant for production.

## CI

Expand Down
2 changes: 1 addition & 1 deletion dev-tools/cherrypick_pr
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def main():
help="Assume yes. Warning: discards local changes.")
parser.add_argument("--continue", action="store_true",
help="Continue after fixing merging errors.")
parser.add_argument("--from_branch", default="master",
parser.add_argument("--from_branch", default="main",
help="From branch")
parser.add_argument("--create_pr", action="store_true",
help="Create a PR using the Github API " +
Expand Down
2 changes: 1 addition & 1 deletion dev-tools/merge_pr
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def main():
parser.add_argument("from_branch",
help="From branch (e.g 1.1)")
parser.add_argument("to_branch",
help="To branch (e.g master)")
help="To branch (e.g main)")
parser.add_argument("--yes", action="store_true",
help="Assume yes. Warning: discards local changes.")
parser.add_argument("--continue", action="store_true",
Expand Down
Loading

0 comments on commit 7b7fa34

Please sign in to comment.