-
Notifications
You must be signed in to change notification settings - Fork 326
ci: support arn automation within release pipeline #2453
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
ci: support arn automation within release pipeline #2453
Conversation
.ci/release/Jenkinsfile
Outdated
| } | ||
| steps { | ||
| setEnvVar('ELASTIC_LAYER_NAME', "elastic-apm-java${env.RELEASE_AWS_LAMBDA_VERSION}") | ||
| withAWSEnv(secret: 'secret/observability-team/ci/service-account/apm-aws-lambda', forceInstallation: true, version: '2.4.10') { |
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.
probably this requires the role_vault and so on....
.ci/release/Jenkinsfile
Outdated
| env.RELEASE_ID = ret['id'] | ||
| env.RELEASE_NOTES_URL = finalUrl | ||
| } | ||
| sh(label: 'make upload-lambda-asset', script: 'make -C .ci upload-lambda-asset') |
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.
this required to exclude if publish_aws_lambda is false
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.
We don't need this for this iteration
.ci/release/Jenkinsfile
Outdated
| fingerprintArtifacts: true, | ||
| flatten: true, | ||
| projectName: 'elastic+apm-agent-java+release', | ||
| selector: lastSuccessful() |
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.
Enable the UI parameter to use in this selector.
| selector: lastSuccessful() | ||
| ) | ||
| sh(label: 'make publish-in-all-aws-regions', script: 'make -C .ci publish-in-all-aws-regions') | ||
| sh(label: 'make create-arn-file', script: 'make -C .ci create-arn-file') |
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.
Archive the file to see the look%feel
|
/test |
Co-authored-by: Alexander Wert <AlexanderWert@users.noreply.github.com>
.ci/release/Jenkinsfile
Outdated
| // NOTE: copy the file from the last successful build. Therefore, this is a hard requirement | ||
| copyArtifacts( | ||
| filter: "src/github.com/elastic/apm-agent-java/elastic-apm-agent/target/${SOURCE_AWS_FILE}", | ||
| target: 'elastic-apm-agent/target', | ||
| fingerprintArtifacts: true, | ||
| flatten: true, | ||
| projectName: 'elastic+apm-agent-java+release', | ||
| selector: specific(params.release_build) | ||
| ) |
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.
| dir ('elastic-apm-agent/target') { | ||
| // TODO: copy file from a google bucket | ||
| sh(label: 'fetch AWS lambda file', script: "wget https://github.com/elastic/apm-agent-java/releases/download/v${RELEASE_VERSION}/${SOURCE_AWS_FILE} -O ${SOURCE_AWS_FILE}") | ||
| } |
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.
This should be changed!
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.
We agreed to manually provide the build number, but this can also work, no objection 🙂
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.
We agreed to manually provide the build number
It does not work, unfortunately, the internal controller does not allow to copy artifacts between different jobs.
I think we are now forced to merge the release pipeline with the post-release one. I'll poke you in the internal issue that contains further detials
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.
.ci/release/Jenkinsfile
Outdated
| RELEASE_AWS_LAMBDA_VERSION = '-ver-1-29-0' | ||
| RELEASE_VERSION = '1.29.0' |
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.
Reminder - don't forget to remove when restoring all release steps
| dir ('elastic-apm-agent/target') { | ||
| // TODO: copy file from a google bucket | ||
| sh(label: 'fetch AWS lambda file', script: "wget https://github.com/elastic/apm-agent-java/releases/download/v${RELEASE_VERSION}/${SOURCE_AWS_FILE} -O ${SOURCE_AWS_FILE}") | ||
| } |
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.
We agreed to manually provide the build number, but this can also work, no objection 🙂
Co-authored-by: Alexander Wert <AlexanderWert@users.noreply.github.com>
| echo "|${f}|${LAYER_VERSION_ARN}|" >> "${ARN_FILE}" | ||
| done | ||
|
|
||
| echo '' >> "${ARN_FILE}" |
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.
A trap here so this cleanup always runs, perhaps?
|
In order to test this we need to merge it, and these changes are not validated in the apm-ci as they are not executed as part of the main pipeline. I'll proceed and merge to be able to move forward with the release |

What does this PR do?
Follow ups
aws-lambdazip file in the GiHub release, so far disabled but we can revisitIssues
Superseedes #2452
Test