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

Add check for build args #522

Open
marohrdanz opened this issue Oct 24, 2023 · 0 comments
Open

Add check for build args #522

marohrdanz opened this issue Oct 24, 2023 · 0 comments

Comments

@marohrdanz
Copy link
Contributor

As of 2.24.2, we are using docker's build arguments to set the GIT_COMMIT and GIT_LATEST_TAG to be used by the ant build in the Dockerfile.

Since it's very easy to forget to set these, and end up with "${env.GIT_COMMIT}" and "${env.GIT_LATEST_TAG}" in the build artifacts, add a check in the Dockerfile to error if these build arguments are not set.

E.g.

RUN test -n "${GIT_COMMIT}" || (echo "Build argument GIT_COMMIT must be set" && false) 
RUN test -n "${GIT_LATEST_TAG}" || (echo "Build argument GIT_LATEST_TAG must be set" && false) 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant