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

Restore the custom naming based on config location #44

Merged
merged 1 commit into from
Jan 15, 2019

Conversation

jocgir
Copy link
Contributor

@jocgir jocgir commented Jan 15, 2019

The initial goal was to easily identify custom images instead of just having an anonymous hash to identify them. We then added a hash to ensure that we rebuild the image if the custom DockerFile or the custom build folder content changed and finally, we removed the name, thus loosing the identification of the custom image and returning to an anonymous image as we did originally.

It is still important to not rebuild the custom image if there is no change and rebuild it if there is a change. So, I simply added the hash into a label and instead putting the hash into the name, we simply check if the label has changed to determine if the image should be rebuilt.

Copy link
Contributor

@julienduchesne julienduchesne left a comment

Choose a reason for hiding this comment

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

Fix the failing test. I verify the image name. Should be back to the directory name instead of the hash.

The initial goal was to easily identify custom images instead of just having an anonymous hash to identify them. We then added a hash to ensure that we rebuild the image if the custom DockerFile or the custom build folder content changed and finally, we removed the name, thus  loosing the identification of the custom image and returning to an anonymous image as we did originally.

It is still important to not rebuild the custom image if there is no change and rebuild it if there is a change. So, I simply added the hash into a label and instead putting the hash into the name, we simply check if the label has changed to determine if the image should be rebuilt.
@coveralls
Copy link

Pull Request Test Coverage Report for Build 694

  • 1 of 20 (5.0%) changed or added relevant lines in 2 files are covered.
  • 10 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-1.4%) to 15.47%

Changes Missing Coverage Covered Lines Changed/Added Lines %
docker.go 0 19 0.0%
Files with Coverage Reduction New Missed Lines %
config.go 10 46.55%
Totals Coverage Status
Change from base Build 689: -1.4%
Covered Lines: 140
Relevant Lines: 905

💛 - Coveralls

@jocgir jocgir merged commit 75f77cf into master Jan 15, 2019
@jocgir jocgir deleted the restore-basic-custom-name branch January 15, 2019 19:44
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

Successfully merging this pull request may close these issues.

3 participants