Skip to content

Commit

Permalink
Merge branch 'main' into feature/changelog-for-branches
Browse files Browse the repository at this point in the history
  • Loading branch information
v1v authored Sep 18, 2024
2 parents af0a864 + c2dd1e8 commit d1c3546
Show file tree
Hide file tree
Showing 26 changed files with 278 additions and 196 deletions.
9 changes: 7 additions & 2 deletions .buildkite/scripts/dra.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@ DRA_BRANCH="$BUILDKITE_BRANCH"
dra_command=collect
BRANCHES_URL=https://storage.googleapis.com/artifacts-api/snapshots/branches.json
curl -s "${BRANCHES_URL}" > active-branches.json
if ! grep -q "\"$BUILDKITE_BRANCH\"" active-branches.json ; then
# as long as `8.x` is not in the active branches, we will explicitly add the condition.
if [ "$BUILDKITE_BRANCH" == "8.x" ] || grep -q "\"$BUILDKITE_BRANCH\"" active-branches.json ; then
echo "--- :arrow_right: Release Manager only supports the current active branches and 8.x, running"
else
# If no active branches are found, let's see if it is a feature branch.
echo "--- :arrow_right: Release Manager only supports the current active branches, skipping"
echo "BUILDKITE_BRANCH=$BUILDKITE_BRANCH"
echo "BUILDKITE_COMMIT=$BUILDKITE_COMMIT"
Expand Down Expand Up @@ -98,6 +102,7 @@ dra() {
}

dra "snapshot" "$dra_command"
if [[ "${DRA_BRANCH}" != "main" ]]; then
if [[ "${DRA_BRANCH}" != "main" && "${DRA_BRANCH}" != "8.x" ]]; then
echo "DRA_BRANCH is neither 'main' nor '8.x'"
dra "staging" "$dra_command"
fi
1 change: 0 additions & 1 deletion .ci/updatecli/values.d/scm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@ scm:
commitusingapi: true
# begin updatecli-compose policy values
user: obltmachine
email: [email protected]
# end updatecli-compose policy values
14 changes: 13 additions & 1 deletion .github/workflows/bump-elastic-stack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,24 @@ jobs:
with:
ref: ${{ matrix.branch }}

- name: Get token
id: get_token
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0
with:
app_id: ${{ secrets.OBS_AUTOMATION_APP_ID }}
private_key: ${{ secrets.OBS_AUTOMATION_APP_PEM }}
permissions: >-
{
"contents": "write",
"pull_requests": "write"
}
- uses: elastic/oblt-actions/updatecli/run@v1
with:
command: --experimental apply --config .ci/updatecli/bump-elastic-stack-snapshot.yml --values .ci/updatecli/values.d/scm.yml
env:
BRANCH: ${{ matrix.branch }}
GITHUB_TOKEN: ${{ secrets.UPDATECLI_GH_TOKEN }}
GITHUB_TOKEN: ${{ steps.get_token.outputs.token }}

- if: ${{ failure() }}
uses: elastic/oblt-actions/slack/send@v1
Expand Down
16 changes: 14 additions & 2 deletions .github/workflows/bump-golang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,23 @@ jobs:

- uses: actions/checkout@v4

- name: Get token
id: get_token
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0
with:
app_id: ${{ secrets.OBS_AUTOMATION_APP_ID }}
private_key: ${{ secrets.OBS_AUTOMATION_APP_PEM }}
permissions: >-
{
"contents": "write",
"pull_requests": "write"
}
- uses: elastic/oblt-actions/updatecli/run@v1
with:
command: --experimental apply --config .ci/updatecli/bump-golang.yml --values .ci/updatecli/values.d/scm.yml
env:
GITHUB_TOKEN: ${{ secrets.UPDATECLI_GH_TOKEN }}
GITHUB_TOKEN: ${{ steps.get_token.outputs.token }}
GITHUB_BRANCH: 'main'
GITHUB_LABELS: ${{ needs.labels.outputs.backports }}

Expand All @@ -60,7 +72,7 @@ jobs:
with:
command: --experimental apply --config .ci/updatecli/bump-golang.yml --values .ci/updatecli/values.d/scm.yml
env:
GITHUB_TOKEN: ${{ secrets.UPDATECLI_GH_TOKEN }}
GITHUB_TOKEN: ${{ steps.get_token.outputs.token }}
GITHUB_BRANCH: '7.17'
GITHUB_LABELS: 'backport-skip'

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/microbenchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
branches:
- main
- "8.[0-9]+"
- "8.x"
paths-ignore:
- '**.md'
- '**.asciidoc'
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test-reporter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ jobs:
system-test-results:
runs-on: ubuntu-latest
steps:
- uses: elastic/apm-pipeline-library/.github/actions/test-report@current
- uses: elastic/oblt-actions/test-report@v1
with:
artifact: test-results # artifact name
name: System Tests Results # Name of the check run which will be created
artifact: /test-results-(.*)/ # artifact name pattern
name: 'Test Results $1' # Name of the check run which will be created
path: "*.xml" # Path to test results (inside artifact .zip)
reporter: java-junit # Format of test results
14 changes: 13 additions & 1 deletion .github/workflows/update-beats.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,18 @@ jobs:
with:
ref: ${{ matrix.branch }}

- name: Get token
id: get_token
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0
with:
app_id: ${{ secrets.OBS_AUTOMATION_APP_ID }}
private_key: ${{ secrets.OBS_AUTOMATION_APP_PEM }}
permissions: >-
{
"contents": "write",
"pull_requests": "write"
}
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
Expand All @@ -38,7 +50,7 @@ jobs:
command: --experimental apply --config .ci/updatecli/update-beats.yml --values .ci/updatecli/values.d/scm.yml
env:
BRANCH_NAME: ${{ matrix.branch }}
GITHUB_TOKEN: ${{ secrets.UPDATECLI_GH_TOKEN }}
GITHUB_TOKEN: ${{ steps.get_token.outputs.token }}

- if: ${{ failure() }}
uses: elastic/oblt-actions/slack/send@v1
Expand Down
16 changes: 14 additions & 2 deletions .github/workflows/update-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,18 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Get token
id: get_token
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0
with:
app_id: ${{ secrets.OBS_AUTOMATION_APP_ID }}
private_key: ${{ secrets.OBS_AUTOMATION_APP_PEM }}
permissions: >-
{
"contents": "write",
"pull_requests": "write"
}
- uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
with:
registry: ghcr.io
Expand All @@ -28,13 +40,13 @@ jobs:
with:
command: --experimental compose diff
env:
GITHUB_TOKEN: ${{ secrets.UPDATECLI_GH_TOKEN }}
GITHUB_TOKEN: ${{ steps.get_token.outputs.token }}

- uses: elastic/oblt-actions/updatecli/run@v1
with:
command: --experimental compose apply
env:
GITHUB_TOKEN: ${{ secrets.UPDATECLI_GH_TOKEN }}
GITHUB_TOKEN: ${{ steps.get_token.outputs.token }}

- if: ${{ failure() }}
uses: elastic/oblt-actions/slack/send@v1
Expand Down
37 changes: 33 additions & 4 deletions .mergify.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
queue_rules:
- name: default
merge_method: squash
conditions:
- check-success=test (macos-latest)
- check-success=test (windows-latest)
Expand Down Expand Up @@ -150,7 +151,6 @@ pull_request_rules:
- -conflict
actions:
queue:
method: squash
name: default
- name: delete updatecli branch after merging/closing it
conditions:
Expand All @@ -174,18 +174,34 @@ pull_request_rules:
branches, such as:
* `backport-7.17` is the label to automatically backport to the 7.17 branch.
* `backport-8./d` is the label to automatically backport to the `8./d` branch. `/d` is the digit.
* `backport-8.x` is the label to automatically backport to the `8.x` branch.
**NOTE**: `backport-skip` has been added to this pull request.
- name: add backport-8.x for the all the PRs targeting main if no skipped or assigned already
conditions:
- -label~=^(backport-skip|backport-8.x)$
- base=main
actions:
comment:
message: |
`backport-8.x` has been added to help with the transition to the new branch `8.x`.
If you don't need it please use `backport-skip` label.
label:
add:
- backport-skip
- backport-8.x
- name: remove backport-skip label
conditions:
- label~=^backport-\d
actions:
label:
remove:
- backport-skip
- name: remove backport-8.x label if backport-skip is present
conditions:
- label~=^backport-skip
actions:
label:
remove:
- backport-8.x
- name: notify the backport has not been merged yet
conditions:
- -merged
Expand All @@ -204,7 +220,6 @@ pull_request_rules:
- -conflict
actions:
queue:
method: squash
name: default
- name: backport patches to 8.5 branch
conditions:
Expand Down Expand Up @@ -360,3 +375,17 @@ pull_request_rules:
labels:
- "backport"
title: "[{{ destination_branch }}] {{ title }} (backport #{{ number }})"
- name: backport patches to 8.x branch
conditions:
- merged
- base=main
- label=backport-8.x
actions:
backport:
assignees:
- "{{ author }}"
branches:
- "8.x"
labels:
- "backport"
title: "[{{ destination_branch }}] {{ title }} (backport #{{ number }})"
Loading

0 comments on commit d1c3546

Please sign in to comment.