Skip to content

Commit

Permalink
Merge branch 'main' into otlp-apis
Browse files Browse the repository at this point in the history
  • Loading branch information
lcawl authored May 29, 2024
2 parents 397acaa + c06abe0 commit c7be1d5
Show file tree
Hide file tree
Showing 71 changed files with 3,920 additions and 1,940 deletions.
1 change: 1 addition & 0 deletions .buildkite/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ notify:
env:
IMAGE_UBUNTU_X86_64: "family/core-ubuntu-2004"
IMAGE_UBUNTU_ARM_64: "core-ubuntu-2004-aarch64"
GENERATE_CHAINGUARD_IMAGES: true

steps:
- group: "Package"
Expand Down
43 changes: 34 additions & 9 deletions .buildkite/scripts/dra.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
##
## It downloads the generated artifacts and run the DRA only if the branch is an active
## branch, based on the Unified Release policy. Otherwise, it won't run the DRA but print
## some traces.
## some traces and fail unless it's a feature branch then it will list the DRA artifacts.
##

set -eo pipefail
Expand All @@ -28,6 +28,10 @@ if [[ "${BUILDKITE_PULL_REQUEST:-false}" == "true" ]]; then
exit 0
fi

# by default it uses the buildkite branch
DRA_BRANCH="$BUILDKITE_BRANCH"
# by default it publishes the DRA artifacts, for such it uses the collect command.
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
Expand All @@ -37,30 +41,51 @@ if ! grep -q "\"$BUILDKITE_BRANCH\"" active-branches.json ; then
echo "VERSION=$VERSION"
echo "Supported branches:"
cat active-branches.json
buildkite-agent annotate "${BUILDKITE_BRANCH} is not supported yet. Look for the supported branches in ${BRANCHES_URL}" --style 'warning' --context 'ctx-warn'
exit 1
if [[ $BUILDKITE_BRANCH =~ "feature/" ]]; then
buildkite-agent annotate "${BUILDKITE_BRANCH} will list DRA artifacts. Feature branches are not supported. Look for the supported branches in ${BRANCHES_URL}" --style 'info' --context 'ctx-info'
dra_command=list

# use a different branch since DRA does not support feature branches but main/release branches
# for such we will use the VERSION and https://storage.googleapis.com/artifacts-api/snapshots/<major.minor>.json
# to know if the branch was branched out from main or the release branches.
MAJOR_MINOR=${VERSION%.*}
if curl -s "https://storage.googleapis.com/artifacts-api/snapshots/main.json" | grep -q "$VERSION" ; then
DRA_BRANCH=main
else
if curl -s "https://storage.googleapis.com/artifacts-api/snapshots/$MAJOR_MINOR.json" | grep -q "$VERSION" ; then
DRA_BRANCH="$MAJOR_MINOR"
else
buildkite-agent annotate "It was not possible to know the original base branch for ${BUILDKITE_BRANCH}. This won't fail - this is a feature branch." --style 'info' --context 'ctx-info-feature-branch'
exit 0
fi
fi
else
buildkite-agent annotate "${BUILDKITE_BRANCH} is not supported yet. Look for the supported branches in ${BRANCHES_URL}" --style 'warning' --context 'ctx-warn'
exit 1
fi
fi

dra() {
local workflow=$1
echo "--- Run release manager $workflow"
local command=$2
echo "--- Run release manager $workflow (DRA command: $command)"
docker run --rm \
--name release-manager \
-e VAULT_ADDR="${VAULT_ADDR_SECRET}" \
-e VAULT_ROLE_ID="${VAULT_ROLE_ID_SECRET}" \
-e VAULT_SECRET_ID="${VAULT_SECRET}" \
--mount type=bind,readonly=false,src=$(pwd),target=/artifacts \
docker.elastic.co/infra/release-manager:latest \
cli collect \
cli "$command" \
--project apm-server \
--branch $BUILDKITE_BRANCH \
--branch $DRA_BRANCH \
--commit $BUILDKITE_COMMIT \
--workflow $workflow \
--artifact-set main \
--version $VERSION
}

dra "snapshot"
if [[ "${BUILDKITE_BRANCH}" != "main" ]]; then
dra "staging"
dra "snapshot" "$dra_command"
if [[ "${DRA_BRANCH}" != "main" ]]; then
dra "staging" "$dra_command"
fi
2 changes: 1 addition & 1 deletion .ci/bump-golang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ sources:
owner: golang
repository: go
token: '{{ requiredEnv "GITHUB_TOKEN" }}'
username: '{{ requiredEnv "GIT_USER" }}'
username: '{{ requiredEnv "GITHUB_ACTOR" }}'
versionfilter:
kind: regex
pattern: go1\.{{ source "minor" }}\.\d*$
Expand Down
16 changes: 10 additions & 6 deletions .github/workflows/bump-elastic-stack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,16 @@ jobs:
with:
ref: ${{ matrix.branch }}

- uses: elastic/apm-pipeline-library/.github/actions/updatecli@current
- uses: elastic/oblt-actions/updatecli/[email protected]
with:
vaultUrl: ${{ secrets.VAULT_ADDR }}
vaultRoleId: ${{ secrets.VAULT_ROLE_ID }}
vaultSecretId: ${{ secrets.VAULT_SECRET_ID }}
pipeline: ./.ci/bump-elastic-stack-snapshot.yml
command: '--experimental apply'
command: --experimental apply --config .ci/bump-elastic-stack-snapshot.yml
env:
BRANCH: ${{ matrix.branch }}
GITHUB_TOKEN: ${{ secrets.UPDATECLI_GH_TOKEN }}

- if: ${{ failure() }}
uses: elastic/oblt-actions/slack/[email protected]
with:
channel-id: '#apm-server'
message: ":traffic_cone: updatecli failed for `${{ github.repository }}@${{ github.ref_name }}`, @robots-ci please look what's going on <https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}|here>"
bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
18 changes: 12 additions & 6 deletions .github/workflows/bump-golang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,16 @@ jobs:
steps:

- uses: actions/checkout@v4
- uses: elastic/apm-pipeline-library/.github/actions/updatecli@current

- uses: elastic/oblt-actions/updatecli/[email protected]
with:
command: --experimental apply --config .ci/bump-golang.yml
env:
GITHUB_TOKEN: ${{ secrets.UPDATECLI_GH_TOKEN }}

- if: ${{ failure() }}
uses: elastic/oblt-actions/slack/[email protected]
with:
vaultUrl: ${{ secrets.VAULT_ADDR }}
vaultRoleId: ${{ secrets.VAULT_ROLE_ID }}
vaultSecretId: ${{ secrets.VAULT_SECRET_ID }}
pipeline: ./.ci/bump-golang.yml
command: '--experimental apply'
bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
channel-id: "#apm-server"
message: ":traffic_cone: updatecli failed for `${{ github.repository }}@${{ github.ref_name }}`, @robots-ci please look what's going on <https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}|here>"
25 changes: 25 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,28 @@ jobs:
go-version-file: go.mod
cache: false
- run: make package-snapshot
env:
GH_TOKEN: ${{ github.token }}

test-package-and-push:
runs-on: ubuntu-latest
if: github.event_name != 'pull_request' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false)
env:
GENERATE_CHAINGUARD_IMAGES: true
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: false
- uses: elastic/apm-pipeline-library/.github/actions/docker-login@current
with:
registry: docker.elastic.co
secret: secret/observability-team/ci/docker-registry/prod
url: ${{ secrets.VAULT_ADDR }}
roleId: ${{ secrets.VAULT_ROLE_ID }}
secretId: ${{ secrets.VAULT_SECRET_ID }}
- run: make package-snapshot
env:
GH_TOKEN: ${{ github.token }}
- run: make publish-docker-images
25 changes: 12 additions & 13 deletions .github/workflows/update-beats.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,21 @@ jobs:
- uses: actions/checkout@v4
with:
ref: ${{ matrix.branch }}

- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- uses: elastic/apm-pipeline-library/.github/actions/updatecli@current

- uses: elastic/oblt-actions/updatecli/[email protected]
with:
command: --experimental apply --config .ci/update-beats.yml
env:
BRANCH_NAME: ${{ matrix.branch }}
GITHUB_TOKEN: ${{ secrets.UPDATECLI_GH_TOKEN }}

- if: ${{ failure() }}
uses: elastic/oblt-actions/slack/[email protected]
with:
vaultUrl: ${{ secrets.VAULT_ADDR }}
vaultRoleId: ${{ secrets.VAULT_ROLE_ID }}
vaultSecretId: ${{ secrets.VAULT_SECRET_ID }}
pipeline: ./.ci/update-beats.yml
command: '--experimental apply'
- if: failure()
uses: elastic/apm-pipeline-library/.github/actions/notify-build-status@current
with:
vaultUrl: ${{ secrets.VAULT_ADDR }}
vaultRoleId: ${{ secrets.VAULT_ROLE_ID }}
vaultSecretId: ${{ secrets.VAULT_SECRET_ID }}
slackChannel: "#apm-server"
channel-id: '#apm-server'
message: ":traffic_cone: updatecli failed for `${{ github.repository }}@${{ github.ref_name }}`, @robots-ci please look what's going on <https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}|here>"
bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
52 changes: 26 additions & 26 deletions NOTICE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -573,11 +573,11 @@ Contents of probable licence file $GOMODCACHE/github.com/elastic/[email protected]

--------------------------------------------------------------------------------
Dependency : github.com/elastic/beats/v7
Version: v7.0.0-alpha2.0.20240521131913-d8072923498c
Version: v7.0.0-alpha2.0.20240528110759-f411b0624c17
Licence type (autodetected): Elastic
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/github.com/elastic/beats/[email protected].20240521131913-d8072923498c/LICENSE.txt:
Contents of probable licence file $GOMODCACHE/github.com/elastic/beats/[email protected].20240528110759-f411b0624c17/LICENSE.txt:

Source code in this repository is variously licensed under the Apache License
Version 2.0, an Apache compatible license, or the Elastic License. Outside of
Expand Down Expand Up @@ -3672,11 +3672,11 @@ Contents of probable licence file $GOMODCACHE/github.com/modern-go/[email protected]

--------------------------------------------------------------------------------
Dependency : github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger
Version: v0.100.0
Version: v0.101.0
Licence type (autodetected): Apache-2.0
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger@v0.100.0/LICENSE:
Contents of probable licence file $GOMODCACHE/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger@v0.101.0/LICENSE:

Apache License
Version 2.0, January 2004
Expand Down Expand Up @@ -5497,11 +5497,11 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI

--------------------------------------------------------------------------------
Dependency : go.opentelemetry.io/collector/consumer
Version: v0.100.0
Version: v0.101.0
Licence type (autodetected): Apache-2.0
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/go.opentelemetry.io/collector/consumer@v0.100.0/LICENSE:
Contents of probable licence file $GOMODCACHE/go.opentelemetry.io/collector/consumer@v0.101.0/LICENSE:


Apache License
Expand Down Expand Up @@ -5709,11 +5709,11 @@ Contents of probable licence file $GOMODCACHE/go.opentelemetry.io/collector/cons

--------------------------------------------------------------------------------
Dependency : go.opentelemetry.io/collector/pdata
Version: v1.7.0
Version: v1.8.0
Licence type (autodetected): Apache-2.0
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/go.opentelemetry.io/collector/pdata@v1.7.0/LICENSE:
Contents of probable licence file $GOMODCACHE/go.opentelemetry.io/collector/pdata@v1.8.0/LICENSE:


Apache License
Expand Down Expand Up @@ -5921,11 +5921,11 @@ Contents of probable licence file $GOMODCACHE/go.opentelemetry.io/collector/pdat

--------------------------------------------------------------------------------
Dependency : go.opentelemetry.io/otel
Version: v1.26.0
Version: v1.27.0
Licence type (autodetected): Apache-2.0
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/go.opentelemetry.io/otel@v1.26.0/LICENSE:
Contents of probable licence file $GOMODCACHE/go.opentelemetry.io/otel@v1.27.0/LICENSE:

Apache License
Version 2.0, January 2004
Expand Down Expand Up @@ -6132,11 +6132,11 @@ Contents of probable licence file $GOMODCACHE/go.opentelemetry.io/[email protected]/L

--------------------------------------------------------------------------------
Dependency : go.opentelemetry.io/otel/metric
Version: v1.26.0
Version: v1.27.0
Licence type (autodetected): Apache-2.0
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/go.opentelemetry.io/otel/metric@v1.26.0/LICENSE:
Contents of probable licence file $GOMODCACHE/go.opentelemetry.io/otel/metric@v1.27.0/LICENSE:

Apache License
Version 2.0, January 2004
Expand Down Expand Up @@ -6343,11 +6343,11 @@ Contents of probable licence file $GOMODCACHE/go.opentelemetry.io/otel/metric@v1

--------------------------------------------------------------------------------
Dependency : go.opentelemetry.io/otel/sdk/metric
Version: v1.26.0
Version: v1.27.0
Licence type (autodetected): Apache-2.0
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/go.opentelemetry.io/otel/sdk/metric@v1.26.0/LICENSE:
Contents of probable licence file $GOMODCACHE/go.opentelemetry.io/otel/sdk/metric@v1.27.0/LICENSE:

Apache License
Version 2.0, January 2004
Expand Down Expand Up @@ -13802,11 +13802,11 @@ Contents of probable licence file $GOMODCACHE/github.com/modern-go/concurrent@v0

--------------------------------------------------------------------------------
Dependency : github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal
Version: v0.100.0
Version: v0.101.0
Licence type (autodetected): Apache-2.0
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal@v0.100.0/LICENSE:
Contents of probable licence file $GOMODCACHE/github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal@v0.101.0/LICENSE:

Apache License
Version 2.0, January 2004
Expand Down Expand Up @@ -14089,11 +14089,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

--------------------------------------------------------------------------------
Dependency : github.com/prometheus/client_golang
Version: v1.19.0
Version: v1.19.1
Licence type (autodetected): Apache-2.0
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/github.com/prometheus/[email protected].0/LICENSE:
Contents of probable licence file $GOMODCACHE/github.com/prometheus/[email protected].1/LICENSE:

Apache License
Version 2.0, January 2004
Expand Down Expand Up @@ -15079,11 +15079,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

--------------------------------------------------------------------------------
Dependency : github.com/shirou/gopsutil/v3
Version: v3.24.3
Version: v3.24.4
Licence type (autodetected): BSD-3-Clause
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/github.com/shirou/gopsutil/[email protected].3/LICENSE:
Contents of probable licence file $GOMODCACHE/github.com/shirou/gopsutil/[email protected].4/LICENSE:

gopsutil is distributed under BSD license reproduced below.

Expand Down Expand Up @@ -16595,11 +16595,11 @@ Contents of probable licence file $GOMODCACHE/go.elastic.co/[email protected]/LICENS

--------------------------------------------------------------------------------
Dependency : go.opentelemetry.io/collector/semconv
Version: v0.100.0
Version: v0.101.0
Licence type (autodetected): Apache-2.0
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/go.opentelemetry.io/collector/semconv@v0.100.0/LICENSE:
Contents of probable licence file $GOMODCACHE/go.opentelemetry.io/collector/semconv@v0.101.0/LICENSE:


Apache License
Expand Down Expand Up @@ -16807,11 +16807,11 @@ Contents of probable licence file $GOMODCACHE/go.opentelemetry.io/collector/semc

--------------------------------------------------------------------------------
Dependency : go.opentelemetry.io/otel/sdk
Version: v1.26.0
Version: v1.27.0
Licence type (autodetected): Apache-2.0
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/go.opentelemetry.io/otel/sdk@v1.26.0/LICENSE:
Contents of probable licence file $GOMODCACHE/go.opentelemetry.io/otel/sdk@v1.27.0/LICENSE:

Apache License
Version 2.0, January 2004
Expand Down Expand Up @@ -17018,11 +17018,11 @@ Contents of probable licence file $GOMODCACHE/go.opentelemetry.io/otel/[email protected]

--------------------------------------------------------------------------------
Dependency : go.opentelemetry.io/otel/trace
Version: v1.26.0
Version: v1.27.0
Licence type (autodetected): Apache-2.0
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/go.opentelemetry.io/otel/trace@v1.26.0/LICENSE:
Contents of probable licence file $GOMODCACHE/go.opentelemetry.io/otel/trace@v1.27.0/LICENSE:

Apache License
Version 2.0, January 2004
Expand Down
Loading

0 comments on commit c7be1d5

Please sign in to comment.