-
Notifications
You must be signed in to change notification settings - Fork 35
publish: add elastic prefix in the layer name and version as suffix #115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
f835c09
publish: add elastic prefix in the layer name
v1v ce260da
ci: use tag versioning if a tag release
v1v a8d3a13
fix: use double escape:
v1v 7525b4c
Update apm-lambda-extension/cli/build-and-publish.js
v1v 87452ce
Update .ci/Jenkinsfile
v1v d0232b8
Update .ci/Jenkinsfile
v1v 0606992
Merge branch 'main' into feature/publishing-changes
v1v 68bc2b6
Enable arch in the extension layer name
v1v d6ff712
Merge branch 'feature/publishing-changes' of github.com:v1v/apm-aws-l…
v1v File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -9,7 +9,6 @@ pipeline { | |
| BASE_DIR = "src/github.com/elastic/${env.REPO}" | ||
| PIPELINE_LOG_LEVEL = 'INFO' | ||
| SUFFIX_ARN_FILE = 'arn-file.md' | ||
| ELASTIC_LAYER_NAME = 'apm-lambda-extension' | ||
| RELEASE_URL_MESSAGE = "(<https://github.com/elastic/${env.REPO}/releases/tag/${env.TAG_NAME}|${env.TAG_NAME}>)" | ||
| SLACK_CHANNEL = '#apm-serverless' | ||
| NOTIFY_TO = '[email protected]' | ||
|
|
@@ -36,6 +35,7 @@ pipeline { | |
| deleteDir() | ||
| gitCheckout(basedir: "${BASE_DIR}") | ||
| stash allowEmpty: true, name: 'source', useDefaultExcludes: false | ||
| setEnvVar('ELASTIC_LAYER_NAME', "elastic-apm-extension${getVersion()}") | ||
| } | ||
| } | ||
| stage('Lint'){ | ||
|
|
@@ -191,6 +191,18 @@ pipeline { | |
| } | ||
| } | ||
|
|
||
| /** | ||
| * Transform TAG releases from v{major}.{minor}.{patch} to | ||
| * ver-{major}-{minor}-{patch}. f.i: given v1.2.3 then | ||
| * -ver-1-2-3. | ||
| */ | ||
| def getVersion() { | ||
| if (env.BRANCH_NAME?.trim() && env.BRANCH_NAME.startsWith('v')) { | ||
| return env.BRANCH_NAME.replaceAll('v', '-ver').replaceAll('\\.', '-') | ||
| } | ||
| return '' | ||
| } | ||
|
|
||
| def notifyStatus(def args = [:]) { | ||
| releaseNotification(slackChannel: "${env.SLACK_CHANNEL}", | ||
| slackColor: args.slackStatus, | ||
|
|
||
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -51,7 +51,7 @@ get-all-aws-regions: | |
| publish-in-all-aws-regions: validate-layer-name get-all-aws-regions | ||
| @mkdir -p $(AWS_FOLDER) | ||
| @while read AWS_DEFAULT_REGION; do \ | ||
| echo "publish '$(ELASTIC_LAYER_NAME)' in $${AWS_DEFAULT_REGION}"; \ | ||
| echo "publish '$(ELASTIC_LAYER_NAME)-$(ARCHITECTURE)' in $${AWS_DEFAULT_REGION}"; \ | ||
| AWS_DEFAULT_REGION="$${AWS_DEFAULT_REGION}" ELASTIC_LAYER_NAME=$(ELASTIC_LAYER_NAME) $(MAKE) publish > $(AWS_FOLDER)/$${AWS_DEFAULT_REGION}; \ | ||
| done <.regions | ||
|
|
||
|
|
@@ -60,7 +60,7 @@ publish: validate-layer-name validate-aws-default-region | |
| @aws lambda \ | ||
| --output json \ | ||
| publish-layer-version \ | ||
| --layer-name "${ELASTIC_LAYER_NAME}" \ | ||
| --layer-name "$(ELASTIC_LAYER_NAME)-$(ARCHITECTURE)" \ | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The make goal |
||
| --description "AWS Lambda Extension Layer for Elastic APM $(ARCHITECTURE)" \ | ||
| --license "Apache-2.0" \ | ||
| --zip-file "fileb://./bin/extension.zip" | ||
|
|
||
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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.