Skip to content

Commit

Permalink
Merge branch 'feature/patch-release' into 8.11
Browse files Browse the repository at this point in the history
* feature/patch-release: (249 commits)
  Update release.mk
  [updatecli] Bump elastic stack version to 8.13.0-8upz6ftd (elastic#12380)
  chore: Update to elastic/beats@95f0f85a3edd (elastic#12370)
  ci(release): automate release steps for the minor (elastic#12233)
  build(deps): bump the github-actions group with 1 update (elastic#12365)
  chore: Update to elastic/beats@d1b32774aef4 (elastic#12362)
  [updatecli] Bump elastic stack version to 8.13.0-ybxdr713 (elastic#12349)
  chore: Update to elastic/beats@81ebafc4c2da (elastic#12352)
  [apm docs consolidation] Delete moved files, update README (elastic#12341)
  [updatecli] Bump elastic stack version to 8.13.0-toucn398 (elastic#12325)
  docs: fix incorrect filenames in a document for Windows (elastic#12343)
  chore: Update to elastic/beats@6f192c01ef19 (elastic#12337)
  build(deps): bump golang.org/x/crypto from 0.14.0 to 0.17.0 (elastic#12237)
  Update NOTICE.txt year (elastic#12333)
  build(deps): bump the github-actions group with 1 update (elastic#12322)
  [updatecli] Bump elastic stack version to 8.13.0-4f8l51qr (elastic#12315)
  docs: Update known issues as fix was released (elastic#12196)
  feat: use latest apm-data to set success `event.outcome` when otel span.Status is Unset (elastic#12199)
  [updatecli] Bump elastic stack version to 8.13.0-4aavtlfc (elastic#12304)
  chore: rename apm-mutating-webhook to apm-k8s-attacher (elastic#12222)
  ...
  • Loading branch information
v1v committed Jan 10, 2024
2 parents 7e48a6c + ffac3af commit 82de42a
Show file tree
Hide file tree
Showing 296 changed files with 19,716 additions and 25,847 deletions.
4 changes: 2 additions & 2 deletions .buildkite/hooks/pre-command
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ if command -v docker &>/dev/null; then
DOCKER_USERNAME_SECRET=$(retry 5 vault kv get -field username "${DOCKER_REGISTRY_SECRET_PATH}")
DOCKER_PASSWORD_SECRET=$(retry 5 vault kv get -field password "${DOCKER_REGISTRY_SECRET_PATH}")
DOCKER_REGISTRY_SECRET=$(retry 5 vault kv get -field registry "${DOCKER_REGISTRY_SECRET_PATH}")
docker login -u "${DOCKER_USERNAME_SECRET}" -p "${DOCKER_PASSWORD_SECRET}" "${DOCKER_REGISTRY_SECRET}"
retry 4 docker login -u "${DOCKER_USERNAME_SECRET}" -p "${DOCKER_PASSWORD_SECRET}" "${DOCKER_REGISTRY_SECRET}"
unset DOCKER_USERNAME_SECRET DOCKER_PASSWORD_SECRET
export DOCKER_REGISTRY_SECRET
retry 4 docker pull --quiet docker.elastic.co/infra/release-manager:latest
Expand All @@ -80,7 +80,7 @@ if command -v docker &>/dev/null; then
DOCKER_USERNAME_SECRET=$(retry 5 vault kv get -field username "${DOCKER_REGISTRY_SECRET_PATH}")
DOCKER_PASSWORD_SECRET=$(retry 5 vault kv get -field password "${DOCKER_REGISTRY_SECRET_PATH}")
DOCKERHUB_REGISTRY_SECRET=$(retry 5 vault kv get -field registry "${DOCKER_REGISTRY_SECRET_PATH}")
docker login -u "${DOCKER_USERNAME_SECRET}" -p "${DOCKER_PASSWORD_SECRET}" "${DOCKERHUB_REGISTRY_SECRET}"
retry 4 docker login -u "${DOCKER_USERNAME_SECRET}" -p "${DOCKER_PASSWORD_SECRET}" "${DOCKERHUB_REGISTRY_SECRET}"
unset DOCKER_USERNAME_SECRET DOCKER_PASSWORD_SECRET
fi

Expand Down
10 changes: 4 additions & 6 deletions .ci/update-beats.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,14 @@ sources:
captureindex: 1

conditions:
is:
is-already-updated:
name: Is version 'github.com/elastic/beats@{{ source "beats" }}' not updated in 'go.mod'?
kind: file
kind: shell
disablesourceinput: true
scmid: default
spec:
file: go.mod
matchpattern: 'github\.com/elastic/beats.*-{{ source "beats" }}'
failwhen: true
command: grep {{ source "beats" }} go.mod && exit 1 || exit 0
failwhen: false

targets:
beats:
Expand All @@ -64,5 +63,4 @@ targets:
command: .ci/scripts/update-beats.sh
environments:
- name: PATH
- name: GOPATH
- name: HOME
42 changes: 42 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
version: 2
updates:

# GitHub actions
- package-ecosystem: "github-actions"
directory: "/"
reviewers:
- "elastic/observablt-ci"
schedule:
interval: "weekly"
day: "sunday"
time: "22:00"
groups:
github-actions:
patterns:
- "*"

# GitHub composite actions
- package-ecosystem: "github-actions"
directory: "/.github/workflows/generate-smoke-tests-list"
schedule:
interval: "weekly"
day: "sunday"
time: "22:00"
reviewers:
- "elastic/observablt-ci"
groups:
github-actions:
patterns:
- "*"
- package-ecosystem: "github-actions"
directory: "/.github/workflows/setup-cluster-env"
schedule:
interval: "weekly"
day: "sunday"
time: "22:00"
reviewers:
- "elastic/observablt-ci"
groups:
github-actions:
patterns:
- "*"
18 changes: 9 additions & 9 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ jobs:
TF_VAR_REPO: ${{ github.repository }}
GOBENCH_TAGS: branch=${{ github.head_ref || github.ref }},commit=${{ github.sha }},target_branch=${{ github.base_ref }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-go@v4
- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'

- uses: rlespinasse/github-slug-action@d1ca8ffbce40ea2371e35bca356db0acacf567d2
- uses: rlespinasse/github-slug-action@5ee5b39fa5c99792f9d15268f75694c7746408e5

- name: Set up env
run: |
Expand All @@ -67,7 +67,7 @@ jobs:
echo "BENCHMARK_RUN=${{ inputs.benchmarkRun }}" >> "$GITHUB_ENV"
fi
- uses: hashicorp/vault-action@v2.6.0
- uses: hashicorp/vault-action@v2.7.4
env:
AWS_CREDENTIALS_PATH: secret/observability-team/ci/elastic-observability-aws-account-auth
BENCHMARK_CLOUD_CREDENTIALS_PATH: secret/observability-team/ci/benchmark-cloud
Expand Down Expand Up @@ -97,7 +97,7 @@ jobs:
url: ${{ secrets.VAULT_ADDR }}
roleId: ${{ secrets.VAULT_ROLE_ID }}
secretId: ${{ secrets.VAULT_SECRET_ID }}
- uses: hashicorp/setup-terraform@v2
- uses: hashicorp/setup-terraform@v3
with:
terraform_version: 1.3.7
terraform_wrapper: false
Expand Down Expand Up @@ -134,7 +134,7 @@ jobs:
$PNG_REPORT_FILE
- name: Upload PNG
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: kibana-png-report
path: ${{ env.WORKING_DIRECTORY }}/${{ env.PNG_REPORT_FILE }}
Expand All @@ -150,7 +150,7 @@ jobs:
echo "png_report_url=https://elastic-apm-server-benchmark-reports.s3.amazonaws.com/${DEST_NAME}" >> "$GITHUB_OUTPUT"
- name: Upload benchmark result
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always()
with:
name: benchmark-result
Expand All @@ -166,7 +166,7 @@ jobs:
uses: elastic/apm-pipeline-library/.github/actions/notify-build-status@current
with:
message: |
Nightly benchmarks failed! SDH Duty assignee, please have a look and follow this <https://github.com/elastic/observability-dev/blob/main/docs/apm/apm-server/runbooks/benchmarks.md|Runbook>!
Nightly APM Server benchmarks failed! SDH Duty assignee, please have a look and follow this <https://github.com/elastic/observability-dev/blob/main/docs/apm/apm-server/runbooks/benchmarks.md|Runbook>!
vaultUrl: ${{ secrets.VAULT_ADDR }}
vaultRoleId: ${{ secrets.VAULT_ROLE_ID }}
vaultSecretId: ${{ secrets.VAULT_SECRET_ID }}
Expand All @@ -187,7 +187,7 @@ jobs:
"type": "section",
"text": {
"type": "mrkdwn",
"text": "${{ github.event_name == 'schedule' && 'Nightly succesfully executed!' || 'Benchmarks succesfully executed!' }}"
"text": "${{ github.event_name == 'schedule' && 'Nightly' || '' }} APM Server benchmarks succesfully executed!"
},
"accessory": {
"type": "button",
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/bump-elastic-stack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
fail-fast: false
matrix: ${{ fromJson(needs.filter.outputs.matrix) }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ matrix.branch }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/bump-golang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:

- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: elastic/apm-pipeline-library/.github/actions/updatecli@current
with:
vaultUrl: ${{ secrets.VAULT_ADDR }}
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
Expand All @@ -45,8 +45,8 @@ jobs:
os: ['macos-latest', 'ubuntu-latest', 'windows-latest']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
Expand All @@ -57,8 +57,8 @@ jobs:
system-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: systemtest/go.mod
cache: true
Expand All @@ -71,7 +71,7 @@ jobs:
go run -modfile=tools/go.mod gotest.tools/gotestsum \
--no-color -f standard-quiet --jsonfile "$OUTPUT_JSON_FILE" --junitfile "$OUTPUT_JUNIT_FILE" \
--raw-command -- make system-test
- uses: actions/upload-artifact@v3 # upload test results
- uses: actions/upload-artifact@v4 # upload test results
if: ${{ always() }} # run this step even if previous step failed
with:
name: test-results
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/generate-smoke-tests-list/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ runs:
- id: generate
name: Generate matrix and date
run: |
echo "tests=$(make smoketest/discover)" >> "${GITHUB_OUTPUT}"
# remove the full path and use a relative path instead to be github runner agnostic
echo "tests=$(make smoketest/discover | sed "s#${GITHUB_WORKSPACE}/#./#g")" >> "${GITHUB_OUTPUT}"
echo "date=$(date +%s)" >> "${GITHUB_OUTPUT}"
shell: 'bash'
6 changes: 5 additions & 1 deletion .github/workflows/opentelemetry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,17 @@ name: OpenTelemetry Export Trace
on:
workflow_run:
workflows:
- benchmarks
- bump-elastic-stack-snapshot
- bump-golang
- ci
- microbenchmark
- system-test-reporter
- run-minor-release
- run-patch-release
- smoke-tests
- smoke-tests-os
- smoke-tests-ess
- system-test-reporter
- Terraform Format
- update-beats
types: [completed]
Expand Down
109 changes: 109 additions & 0 deletions .github/workflows/prepare-release/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
---
name: prepare-release
description: Common tasks for preparing minor and patch releases

inputs:
type:
description: 'Release type (minor or patch)'
required: true
version:
description: 'The version'
required: true
vault-url:
description: 'Vault URL'
required: true
vault-role-id:
description: 'Vault role ID'
required: true
vault-secret-id:
description: 'Vault secret ID'
required: true

outputs:
release-branch:
description: "Release branch (relevant for minor releases)"
value: ${{ steps.generate.outputs.release-branch }}
release-version:
description: "Release version"
value: ${{ steps.generate.outputs.release-version }}
slack-thread:
description: "Slack thread id"
value: ${{ steps.slack-thread.outputs.threadTimestamp }}

runs:
using: "composite"
steps:
- name: Send slack message when started
id: slack-thread
uses: elastic/apm-pipeline-library/.github/actions/slack-message@current
with:
url: ${{ inputs.vault-url }}
roleId: ${{ inputs.vault-role-id }}
secretId: ${{ inputs.vault-secret-id }}
channel: ${{ env.SLACK_CHANNEL }}
message: ":wave: This is the thread for the ${{ inputs.type }} release `${{ github.repository }}@${{ env.VERSION }}`. (<${{ env.JOB_URL }}|workflow run>)"
env:
VERSION: ${{ inputs.version }}
JOB_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}

- id: generate
run: |-
echo "release-branch=${VERSION%.*}" >> "${GITHUB_OUTPUT}"
echo "release-version=${VERSION}" >> "${GITHUB_OUTPUT}"
env:
VERSION: ${{ inputs.version }}
shell: 'bash'

- name: validate version format (minor only)
if: ${{ inputs.type == 'minor' && ! endsWith(inputs.version, '0') }}
run: |-
FAILURE_MESSAGE='version is not a minor one but a patch (only support for <major>.<minor>.0)'
echo "FAILURE_MESSAGE=${FAILURE_MESSAGE}" >> "$GITHUB_ENV"
echo "::error::${FAILURE_MESSAGE}" ; exit 1
shell: 'bash'

- name: validate version format (patch only)
if: ${{ inputs.type == 'patch' && endsWith(inputs.version, '0') }}
run: |-
FAILURE_MESSAGE='version is not a patch one but a minor (only support for <major>.<minor>.[1-9]+[0-9]*)'
echo "FAILURE_MESSAGE=${FAILURE_MESSAGE}" >> "$GITHUB_ENV"
echo "::error::${FAILURE_MESSAGE}" ; exit 1
shell: 'bash'

- name: validate if branch already exists (minor only)
if: ${{ inputs.type == 'minor' }}
run: |-
if git ls-remote --exit-code --heads https://github.com/${{ github.repository }}.git "$BRANCH" > /dev/null ; then
FAILURE_MESSAGE='Branch already exists. This is not a minor release.'
echo "FAILURE_MESSAGE=${FAILURE_MESSAGE}" >> "$GITHUB_ENV"
echo "::error::${FAILURE_MESSAGE}" ; exit 1
fi
shell: 'bash'
env:
BRANCH: ${{ steps.generate.outputs.release-branch }}

- name: validate if tag already exists
run: |-
if git ls-remote --exit-code https://github.com/${{ github.repository }}.git "$TAG" > /dev/null ; then
FAILURE_MESSAGE='Tag already exists.'
echo "FAILURE_MESSAGE=${FAILURE_MESSAGE}" >> "$GITHUB_ENV"
echo "::error::${FAILURE_MESSAGE}" ; exit 1
fi
shell: 'bash'
env:
TAG: 'refs/tags/v${{ steps.generate.outputs.release-version }}'

- uses: elastic/apm-pipeline-library/.github/actions/slack-message@current
if: failure()
with:
url: ${{ inputs.vault-url }}
roleId: ${{ inputs.vault-role-id }}
secretId: ${{ inputs.vault-secret-id }}
channel: ${{ env.SLACK_CHANNEL }}
threadTimestamp: ${{ steps.slack-thread.outputs.threadTimestamp || '' }}
message: |-
:fire: Something went wrong with the ${{ inputs.type }} release preparation. It failed with the below error message:
`${{ env.FAILURE_MESSAGE }}`.
See <${{ env.JOB_URL }}|logs>.
env:
JOB_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
Loading

0 comments on commit 82de42a

Please sign in to comment.