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

feat: allow templating of registry and name #56

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions lib/docker/image.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,17 @@ class Image {
return string.template(template)(vars)
}).filter(Boolean)

const registry = string.template(opts.registry)(vars);
const name = string.template(opts.name)(vars)

const image = new(this)({
registry: opts.registry
registry
, project: opts.project
, name: opts.name
, name
, dockerfile: opts.dockerfile
, build_id: opts.build
, cwd: context.cwd
, tags: tags
, tags
Comment on lines +81 to +87
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: would you mind keeping the longhand style consistent? name: name

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you mind adding something in the tests that illustrates that this works?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 sure thing ill get on it as soon as i have a moment!

, context: opts.context
, network: opts.network
, quiet: opts.quiet
Expand Down
Loading