-
Notifications
You must be signed in to change notification settings - Fork 227
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update for v4.5.4 release.
- Loading branch information
Showing
18 changed files
with
603 additions
and
305 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,14 +4,20 @@ on: | |
push: | ||
tags: | ||
- v*.*.* | ||
branches: | ||
- main | ||
|
||
permissions: | ||
attestations: write | ||
contents: write | ||
id-token: write | ||
pull-requests: read | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
env: | ||
DOCKER_IMAGE_NAME: docker.elastic.co/observability/apm-agent-nodejs | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
|
@@ -33,7 +39,41 @@ jobs: | |
|
||
- run: make -C .ci dist | ||
|
||
- run: make -C .ci push-docker | ||
- name: Attest Lambda layer zip | ||
uses: github-early-access/generate-build-provenance@main | ||
with: | ||
subject-path: "${{ github.workspace }}/build/aws/elastic-apm-node-lambda-layer-*.zip" | ||
|
||
- name: Extract metadata (tags, labels) | ||
id: docker-meta | ||
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5.5.1 | ||
with: | ||
images: ${{ env.DOCKER_IMAGE_NAME }} | ||
flavor: | | ||
latest=auto | ||
tags: | | ||
# "1.2.3" and "latest" Docker tags on push of git tag "v1.2.3" | ||
type=semver,pattern={{version}} | ||
# "edge" Docker tag on git push to default branch | ||
type=edge | ||
- name: Build and Push Docker Image | ||
id: docker-push | ||
uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 # v5.3.0 | ||
with: | ||
context: . | ||
push: true | ||
tags: ${{ steps.docker-meta.outputs.tags }} | ||
labels: ${{ steps.docker-meta.outputs.labels }} | ||
build-args: | | ||
AGENT_DIR=/build/dist/nodejs | ||
- name: Attest Docker image | ||
uses: github-early-access/generate-build-provenance@main | ||
with: | ||
subject-name: "${{ env.DOCKER_IMAGE_NAME }}" | ||
subject-digest: ${{ steps.docker-push.outputs.digest }} | ||
push-to-registry: true | ||
|
||
- name: Read AWS vault secrets | ||
uses: hashicorp/[email protected] | ||
|
@@ -46,12 +86,15 @@ jobs: | |
secret/observability-team/ci/service-account/apm-aws-lambda access_key_id | AWS_ACCESS_KEY_ID ; | ||
secret/observability-team/ci/service-account/apm-aws-lambda secret_access_key | AWS_SECRET_ACCESS_KEY | ||
- name: Publish AWS lambda | ||
- name: Publish AWS lambda (only for tag release) | ||
if: startsWith(github.ref, 'refs/tags') | ||
run: make -C .ci publish-in-all-aws-regions create-arn-file | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
|
||
- run: make -C .ci github-release | ||
- name: create github release (only for tag release) | ||
run: make -C .ci github-release | ||
if: startsWith(github.ref, 'refs/tags') | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
|
||
|
@@ -66,12 +109,13 @@ jobs: | |
secret/jenkins-ci/npmjs/elasticmachine token | NPMJS_TOKEN ; | ||
totp/code/npmjs-elasticmachine code | TOTP_CODE | ||
- name: npm publish | ||
- name: npm publish (only for tag release) | ||
if: startsWith(github.ref, 'refs/tags') | ||
run: |- | ||
echo "//registry.npmjs.org/:_authToken=${{ env.NPMJS_TOKEN }}" > .npmrc | ||
npm publish --otp=${{ env.TOTP_CODE }} | ||
npm publish --otp=${{ env.TOTP_CODE }} --provenance | ||
- if: always() | ||
- if: ${{ always() && startsWith(github.ref, 'refs/tags') }} | ||
uses: elastic/apm-pipeline-library/.github/actions/notify-build-status@current | ||
with: | ||
vaultUrl: ${{ secrets.VAULT_ADDR }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.