Skip to content

Commit

Permalink
use main default branch (elastic#29710)
Browse files Browse the repository at this point in the history
  • Loading branch information
v1v authored Feb 3, 2022
1 parent e675f4e commit 2379370
Show file tree
Hide file tree
Showing 33 changed files with 67 additions and 74 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
6 changes: 3 additions & 3 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,7 @@
discover-pr-forks-trust: 'permission'
discover-pr-origin: 'merge-current'
discover-tags: true
head-filter-regex: '(master|7\.1[6789]|8\.\d+|PR-.*|v\d+\.\d+\.\d+)'
head-filter-regex: '(main|7\.1[6789]|8\.\d+|PR-.*|v\d+\.\d+\.\d+)'
disable-pr-notifications: true
notification-context: 'apm-beats-update'
repo: 'beats'
Expand All @@ -33,7 +33,7 @@
ignore-tags-newer-than: 30
- named-branches:
- exact-name:
name: 'master'
name: 'main'
case-sensitive: true
- regex-name:
regex: '7\.1[6789]'
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
4 changes: 2 additions & 2 deletions .ci/jobs/beats-tester.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
discover-pr-forks-trust: 'permission'
discover-pr-origin: 'merge-current'
discover-tags: true
head-filter-regex: '(master|7\.1[6789]|8\.\d+|PR-.*|v\d+\.\d+\.\d+)'
head-filter-regex: '(main|7\.1[6789]|8\.\d+|PR-.*|v\d+\.\d+\.\d+)'
disable-pr-notifications: true
notification-context: 'beats-tester'
repo: 'beats'
Expand All @@ -29,7 +29,7 @@
ignore-tags-newer-than: 30
- named-branches:
- exact-name:
name: 'master'
name: 'main'
case-sensitive: true
- regex-name:
regex: '7\.1[6789]'
Expand Down
4 changes: 2 additions & 2 deletions .ci/jobs/beats.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
discover-pr-forks-strategy: 'merge-current'
discover-pr-forks-trust: 'permission'
discover-pr-origin: 'merge-current'
head-filter-regex: '(master|6\.[89]|7\.1[6789]|8\.\d+|PR-.*|v\d+\.\d+\.\d+)'
head-filter-regex: '(main|6\.[89]|7\.1[6789]|8\.\d+|PR-.*|v\d+\.\d+\.\d+)'
discover-tags: true
notification-context: "beats-ci"
repo: 'beats'
Expand All @@ -33,7 +33,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
4 changes: 2 additions & 2 deletions .ci/jobs/packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
discover-pr-forks-trust: 'permission'
discover-pr-origin: 'merge-current'
discover-tags: true
head-filter-regex: '(master|7\.1[6789]|8\.\d+|PR-.*|v\d+\.\d+\.\d+)'
head-filter-regex: '(main|7\.1[6789]|8\.\d+|PR-.*|v\d+\.\d+\.\d+)'
disable-pr-notifications: true
notification-context: 'beats-packaging'
repo: 'beats'
Expand All @@ -29,7 +29,7 @@
ignore-tags-newer-than: 30
- named-branches:
- exact-name:
name: 'master'
name: 'main'
case-sensitive: true
- regex-name:
regex: '7\.1[6789]'
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
2 changes: 1 addition & 1 deletion .ci/schedule-daily.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pipeline {
stages {
stage('Nighly beats builds') {
steps {
runBuilds(quietPeriodFactor: 2000, branches: ['master', '8.<minor>', '7.<minor>', '7.<next-minor>'])
runBuilds(quietPeriodFactor: 2000, branches: ['main', '8.<minor>', '7.<minor>', '7.<next-minor>'])
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion .ci/schedule-weekly.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pipeline {
stages {
stage('Weekly beats builds') {
steps {
runBuilds(quietPeriodFactor: 1000, branches: ['master', '8.<minor>', '7.<minor>', '7.<next-minor>'])
runBuilds(quietPeriodFactor: 1000, branches: ['main', '8.<minor>', '7.<minor>', '7.<next-minor>'])
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ queue_rules:
conditions:
- check-success=beats-ci/pr-merge
pull_request_rules:
- name: forward-port patches to master branch
- name: forward-port patches to main branch
conditions:
- merged
- label=forwardport-master
- label=forwardport-main
actions:
backport:
assignees:
- "{{ author }}"
branches:
- "master"
- "main"
labels:
- "backport"
title: "[{{ destination_branch }}](backport #{{ number }}) {{ title }}"
Expand Down Expand Up @@ -135,7 +135,7 @@ pull_request_rules:
- name: notify the backport policy
conditions:
- -label~=^backport
- base=master
- base=main
- -merged
- -closed
actions:
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 @@ -242,7 +242,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 @@ -253,17 +253,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
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Build Status](https://beats-ci.elastic.co/job/Beats/job/beats/job/master/badge/icon)](https://beats-ci.elastic.co/job/Beats/job/beats/job/master/)
[![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/)
[![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,19 +14,19 @@ By "lightweight", we mean that Beats have a small installation footprint, use
limited system resources, and have no runtime dependencies.

This repository contains
[libbeat](https://github.com/elastic/beats/tree/master/libbeat), our Go
[libbeat](https://github.com/elastic/beats/tree/main/libbeat), our Go
framework for creating Beats, and all the officially supported Beats:

Beat | Description
--- | ---
[Auditbeat](https://github.com/elastic/beats/tree/master/auditbeat) | Collect your Linux audit framework data and monitor the integrity of your files.
[Filebeat](https://github.com/elastic/beats/tree/master/filebeat) | Tails and ships log files
[Functionbeat](https://github.com/elastic/beats/tree/master/x-pack/functionbeat) | Read and ships events from serverless infrastructure.
[Heartbeat](https://github.com/elastic/beats/tree/master/heartbeat) | Ping remote services for availability
[Metricbeat](https://github.com/elastic/beats/tree/master/metricbeat) | Fetches sets of metrics from the operating system and services
[Packetbeat](https://github.com/elastic/beats/tree/master/packetbeat) | Monitors the network and applications by sniffing packets
[Winlogbeat](https://github.com/elastic/beats/tree/master/winlogbeat) | Fetches and ships Windows Event logs
[Osquerybeat](https://github.com/elastic/beats/tree/master/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.

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 @@ -79,7 +79,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
4 changes: 2 additions & 2 deletions dev-tools/open_pr
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ from os.path import expanduser
usage = """
Example usage:
Open PR against master, with the review label:
Open PR against main, with the review label:
./dev-tools/open_pr --remote tsg
Expand All @@ -36,7 +36,7 @@ def main():

parser.add_argument("--remote", default="origin",
help="Your git remote to push the branch to.")
parser.add_argument("--branch", default="master",
parser.add_argument("--branch", default="main",
help="Remote branch to open PR against (e.g 5.0)")
parser.add_argument("--wip", action="store_true",
help="Add the `in progress` label")
Expand Down
6 changes: 3 additions & 3 deletions docs/devguide/contributing.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ You only need to sign the CLA once.

. Send a pull request! Push your changes to your fork of the repository and
https://help.github.com/articles/using-pull-requests[submit a pull request] using our
<<pr-review,pull request guidelines>>. New PRs go to the master branch. The Beats
<<pr-review,pull request guidelines>>. New PRs go to the main branch. The Beats
core team will backport your PR if it is necessary.


In the pull request, describe what your changes do and mention
any bugs/issues related to the pull request. Please also add a changelog entry to
https://github.com/elastic/beats/blob/master/CHANGELOG.next.asciidoc[CHANGELOG.next.asciidoc].
https://github.com/elastic/beats/blob/main/CHANGELOG.next.asciidoc[CHANGELOG.next.asciidoc].

[float]
[[setting-up-dev-environment]]
Expand Down Expand Up @@ -199,4 +199,4 @@ The following packages are required to run `go generate`:

To keep up to date with changes to the official Beats for community developers,
follow the developer changelog
https://github.com/elastic/beats/blob/master/CHANGELOG-developer.next.asciidoc[here].
https://github.com/elastic/beats/blob/main/CHANGELOG-developer.next.asciidoc[here].
Loading

0 comments on commit 2379370

Please sign in to comment.