Skip to content

Conversation

v1v
Copy link
Member

@v1v v1v commented Feb 2, 2022

What

Add elastic prefix in the layer name, version as suffix. Additionally, it adds the arch as suffix too.

Implementation details

CI is setting the env variable ELASTIC_LAYER_NAME dynamically if a new tag release is created.

Issue

Closes #110

Test

image

@github-actions github-actions bot added the aws-λ-extension AWS Lambda Extension label Feb 2, 2022
@ghost
Copy link

ghost commented Feb 2, 2022

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Reason: null

  • Start Time: 2022-02-03T10:55:05.762+0000

  • Duration: 2 min 17 sec

  • Commit: d6ff712

Test stats 🧪

Test Results
Failed 0
Passed 84
Skipped 0
Total 84

🤖 GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@v1v v1v self-assigned this Feb 2, 2022
@AlexanderWert
Copy link
Member

@v1v I think we also need the architecture key as a suffix in the layer name, otherwise the ARNs will be identical for the two different architectures (which is not possible --> so would result just in two different layer versions, which is confusing)

deleteDir()
gitCheckout(basedir: "${BASE_DIR}")
stash allowEmpty: true, name: 'source', useDefaultExcludes: false
setEnvVar('ELASTIC_LAYER_NAME', "elastic-apm-extension${getVersion()}")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to include a suffix for the architecture, otherwise the ARNs for x86_64 and arm64 are indistinguishable.

v1v added 2 commits February 3, 2022 10:54
…ambda into feature/publishing-changes

* 'feature/publishing-changes' of github.com:v1v/apm-aws-lambda:
  ci: add info traces to help with debugging (elastic#114)
  ci: notify when a release tag has been created and published (elastic#113)
  Update .ci/Jenkinsfile
  Update .ci/Jenkinsfile
  Update apm-lambda-extension/cli/build-and-publish.js
@v1v
Copy link
Member Author

v1v commented Feb 3, 2022

68bc2b6 should do that trick, adding the suffix ARCH to the extension layer name within the Makefile

Therefore, if running locally then the extension layer is elastic-elastic-apm-extension-x86_64 or elastic-elastic-apm-extension-arm64. While running in the CI with a TAG release (v1.0.0), then elastic-elastic-apm-extension-ver-1-0-0-x86_64 or elastic-elastic-apm-extension-ver-1-0-0-arm64

@v1v v1v requested a review from estolfo February 3, 2022 10:57
--output json \
publish-layer-version \
--layer-name "${ELASTIC_LAYER_NAME}" \
--layer-name "$(ELASTIC_LAYER_NAME)-$(ARCHITECTURE)" \
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The make goal publish is the one in charge to apply the layer-name with the architecture since the Makefile is in charge to transform the GOARCH in the expected format.

Copy link
Contributor

@astorm astorm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clearing my review queue -- a light reading of what's here looks good but I'll leave final review to @estolfo and others.

@v1v v1v merged commit 6baa401 into elastic:main Feb 4, 2022
@v1v v1v deleted the feature/publishing-changes branch February 4, 2022 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

aws-λ-extension AWS Lambda Extension

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Published ARN Names should Include Release Version and "Elastic"

5 participants