-
Notifications
You must be signed in to change notification settings - Fork 33
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
Propagate environment #1358 #1392
Conversation
🦋 Changeset detectedLatest commit: 10ddc21 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
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.
Great find. Looks like a straightforward port of the Docker plugin implementation buildkite-plugins/docker-compose-buildkite-plugin#344 so I'm not seeing any additional risks.
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 should add a changeset for this
this would be a minor right @72636c ? |
@ajain58 Great question, we have an informal & impure 🙃 practice of filing template updates as |
That reminds me that we should update https://github.com/seek-oss/skuba/blob/master/CONTRIBUTING.md#creating-a-changeset |
environment: | ||
- ENVIRONMENT | ||
- GITHUB_API_TOKEN | ||
- VERSION |
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.
Any ideas where VERSION
comes from? @72636c. I can see ENVIRONMENT
in the UI so it will get propagated successfully by the propagate-environment
setting.
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.
VERSION: ${BUILDKITE_COMMIT:0:7}.${BUILDKITE_BUILD_NUMBER} |
Is this template meant to have this line?
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.
Ah yes, I think that's right re: VERSION
. Maybe we should extend the CDK template to use the version variable too
CDK
skuba/template/lambda-sqs-worker-cdk/src/app.ts
Lines 4 to 6 in 454710c
const logger = createLogger({ | |
name: '<%- serviceName %>', | |
}); |
Serverless
version: Env.string('VERSION'), |
skuba/template/lambda-sqs-worker/src/framework/logging.ts
Lines 14 to 17 in 454710c
base: { | |
environment: config.environment, | |
version: config.version, | |
}, |
39e4481
to
1451c3c
Compare
I did a quick test and pipeline variables which are defined within steps and/or on the pipeline at upload time also get passed to the container via the |
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.
Thanks a bunch for this 🙌
Adds
propagate-environment: true
to all pipeline templates and removes the environment definition from docker compose filesCloses #1358