Skip to content
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

Expose Docker Image labels as Project Variables #5773

Closed
zentron opened this issue Aug 13, 2019 · 1 comment
Closed

Expose Docker Image labels as Project Variables #5773

zentron opened this issue Aug 13, 2019 · 1 comment
Assignees
Labels
kind/enhancement This issue represents an enhancement we are committed to adding to Octopus as some time
Milestone

Comments

@zentron
Copy link

zentron commented Aug 13, 2019

Unlike standard "package" deployments, were we can extract, access and transform configuration files contained within them, docker images are presented as much more of a black-box artefact.

One approach that can be leveraged however is the label metadata that can be applied to images at build time. With this mechanism a user can embed some configuration or values required by octopus at deployment time, which will then be added to the docker project variable dictionary indexed via the image packageId.
so If we add a label at build time with

LABEL com.acme.foo="bar"

And we use this image named as Acme in a script step, then at deploy time a variable will be available at the location
Octopus.Action.Package[Acme].Image.Labels[ com.acme.foo] with the value bar. Since this value is added to the variable dictionary, it means that the value itself can make use of the standard Octopus variable substitution syntax.

The labels com.octopus.* and Octopus.* should be avoided and are reserved for future Octopus functionality.

@zentron zentron added the kind/enhancement This issue represents an enhancement we are committed to adding to Octopus as some time label Aug 13, 2019
@zentron zentron self-assigned this Aug 13, 2019
@zentron zentron modified the milestones: 2019.7.8, 2.7.9 Aug 13, 2019
@zentron zentron closed this as completed Aug 13, 2019
@zentron zentron changed the title Expose DockerImage labels as ProjectVariables Expose Docker Image labels as Project Variables Aug 13, 2019
@OctopusDeploy OctopusDeploy deleted a comment from octoreleasebot Aug 13, 2019
@NickJosevski NickJosevski modified the milestones: 2.7.9, 2019.7.9 Aug 14, 2019
@lock
Copy link

lock bot commented Nov 12, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. If you think you've found a related issue, please contact our support team so we can triage your issue, and make sure it's handled appropriately.

@lock lock bot locked as resolved and limited conversation to collaborators Nov 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/enhancement This issue represents an enhancement we are committed to adding to Octopus as some time
Projects
None yet
Development

No branches or pull requests

2 participants