Skip to content

Name the final stage explicitly, move scripts, other minor refactoring#91

Merged
victorlin merged 5 commits intomasterfrom
victorlin/refactor
Oct 13, 2022
Merged

Name the final stage explicitly, move scripts, other minor refactoring#91
victorlin merged 5 commits intomasterfrom
victorlin/refactor

Conversation

@victorlin
Copy link
Copy Markdown
Member

@victorlin victorlin commented Oct 7, 2022

Description of proposed changes

See individual commits.

Related issue(s)

N/A

Testing

  • Checks pass

@victorlin victorlin requested a review from a team October 7, 2022 21:40
@victorlin victorlin self-assigned this Oct 7, 2022
@victorlin victorlin changed the title Name the final stage explicitly, minor refactoring Name the final stage explicitly, move scripts, other minor refactoring Oct 10, 2022
Comment thread devel/build Outdated
Comment thread .github/workflows/ci.yml Outdated
@victorlin victorlin force-pushed the victorlin/refactor branch 4 times, most recently from 51e6c92 to ae92599 Compare October 13, 2022 23:02
@victorlin victorlin requested a review from tsibley October 13, 2022 23:03
Comment thread devel/build
Copy link
Copy Markdown
Contributor

@tsibley tsibley left a comment

Choose a reason for hiding this comment

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

My review comments here are minor, so merge when you feel this is ready.

For (1) consistency and (2) defense against any future meta-chars in
substituted variable values. Remove quotes around strings without
parameter expansions
Without a name, this stage is currently named `stage-1` in the logs and
is the `docker build` target default. Add a name to make things more
self-descriptive.

This also allows us to simplify the variable name from
BASE_BUILDER_IMAGE to BUILDER_IMAGE.
The builder and final image are referenced in different orders,
which is a bit inconsistent. Make it consistent by always referencing
builder before final, to mirror the sequential order in the Dockerfile.
Previously, there were two distinct types of scripts in devel/:

1. Scripts that interface with the Docker CLI (build/push/tag)
2. Scripts used in the Dockerfile's builder stage

Intents and interactions are more clear if these scripts live in
separate folders. Choosing to keep (1) in devel/ and move (2) to a new
folder builder-scripts/.
@victorlin
Copy link
Copy Markdown
Member Author

Will merge once CI passes.

@victorlin victorlin merged commit 3de02d1 into master Oct 13, 2022
@victorlin victorlin deleted the victorlin/refactor branch October 13, 2022 23:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects

Development

Successfully merging this pull request may close these issues.

2 participants