-
Notifications
You must be signed in to change notification settings - Fork 147
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
Add service label build options #429
Add service label build options #429
Conversation
Signed-off-by: Jared Quick <jared.quick@salesforce.com>
Signed-off-by: Jared Quick <jared.quick@salesforce.com>
Signed-off-by: Jared Quick <jared.quick@salesforce.com>
301cba9
to
862bde3
Compare
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.
The recommendations on shared.bash
are mostly style and not functionality, but the schema one does pose a question on the implementation: if both build
and run
are used in a single step the labels would be the same and I don't think that is something useful. Thus, I would suggest splitting the option into two: build-labels
(for build
) and labels
(for run
).
While we are at it I would also suggest adding a test for the override function with labels, target and cache-from for completeness' sake (and I just noticed there is no test with just a target 😨)
Signed-off-by: Jared Quick <jared.quick@salesforce.com>
Signed-off-by: Jared Quick <jared.quick@salesforce.com>
Signed-off-by: Jared Quick <jared.quick@salesforce.com>
Signed-off-by: Jared Quick <jared.quick@salesforce.com>
Thanks @toote! I really appreciate your feedback and help. I think I have addressed the style issues and ran a few builds on the new logic and it looks to work as expected. Since we are splitting out run/build I think having |
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.
👏 as long as the pipeline passes, I believe this can be merged. Thanks a lot for the work and improvement!
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 @jquick! We'll probably do the release at the end of the week
It would be really handy to be able to add service labels in the pipeline. This change allows labels to be defined for build or run.
This will add any defined labels to the compose override and those will be merged accordingly. Small example:
docker-compose.yml
pipeline.yml
image labels after build:
Testing
I've done some basic Buldkite builds with different combinations of
labels
andcache_from
.Use Case
Our users setup their own compose files. As owners we want to ensure that every image is built with specific labels.