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

Remove potentially bad characters from docker tags #45

Merged
merged 1 commit into from
Jan 31, 2019

Conversation

julienduchesne
Copy link
Contributor

@julienduchesne julienduchesne commented Jan 30, 2019

When creating a custom docker image. TGF sets the image tag as the directory name. If the directory has special characters in its name, it crashes due to docker not accepting the tag

@coveralls
Copy link

Pull Request Test Coverage Report for Build 699

  • 4 of 4 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.2%) to 15.656%

Totals Coverage Status
Change from base Build 697: 0.2%
Covered Lines: 142
Relevant Lines: 907

💛 - Coveralls

}
return filepath.Base(filepath.Dir(cb.source))
Copy link
Contributor

Choose a reason for hiding this comment

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

You're not catering any more for the case where cb.Tag is empty

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, tag := filepath.Base(filepath.Dir(cb.source)), it is by default the dir name and it is overwritten by cb.Tag when it is not empty

Copy link
Contributor

Choose a reason for hiding this comment

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

oh yes I didn't notice that you moved the line to the top 😄

@julienduchesne julienduchesne merged commit d983b66 into master Jan 31, 2019
@julienduchesne julienduchesne deleted the remove-bad-characters-from-tags branch January 31, 2019 17:03
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.

4 participants