Skip to content
This repository was archived by the owner on Oct 24, 2022. It is now read-only.

Add a verifier to check if generated Dockerfiles are up-to-date. #262

Merged
merged 1 commit into from
Nov 19, 2016

Conversation

jkinkead
Copy link
Contributor

This is slightly more complicated than I'd like, due to some code duplication. Due to how sbt handles task dependencies, I don't think there's a cleaner way.


val verifyDockerfileOnBuild: SettingKey[Boolean] = Def.settingKey[Boolean](
"If true, `dockerBuild` will depend on `verifyDockerfile`, and will not build if the " +
"Dockerfile is not up-to-date. Defaults to false."
Copy link
Contributor

Choose a reason for hiding this comment

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

Why default to false? It seems like this is generally the desired behavior, given how easy it is to fall out of sync.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it's more correct to have this as a CI check, not a build-time check. I think it'll cause a lot of annoyances if it's happening on all builds.

Having a warning on all builds by default is good, but I was getting lazy and didn't want to add a third option . . .

Copy link
Contributor

Choose a reason for hiding this comment

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

That makes sense. I think the warning would be a nice-to-have, but I wouldn't block this on it. 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK! I'm adding, it's fairly easy.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I take that back - it's easy, but not very useful, since the warning gets swallowed in the rest of the build output.

I think forcing this to error is probably a better solution.

@jkinkead jkinkead merged commit deae909 into allenai:master Nov 19, 2016
@jkinkead jkinkead deleted the dockerfile_verify branch November 19, 2016 00:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants