-
Notifications
You must be signed in to change notification settings - Fork 712
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
Make sure we generate a proper docker tag #1675
Conversation
This is similar to #1655 And probably failing for the same reason. |
Hi @krnowak; can you rebase this on top of master? It should pass now. |
d2c57bc
to
b162921
Compare
b162921
to
e8e5837
Compare
Updated, lint seems to fail with some typos. For lint fixes please see #1751. |
@@ -8,5 +8,10 @@ WORKING_SUFFIX=$(if ! git diff --exit-code --quiet HEAD >&2; \ | |||
then echo "-WIP"; \ | |||
else echo ""; \ | |||
fi) | |||
BRANCH_PREFIX=$(git rev-parse --abbrev-ref HEAD) | |||
echo "${BRANCH_PREFIX//\//-}-$(git rev-parse --short HEAD)$WORKING_SUFFIX" |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
e8e5837
to
559c62e
Compare
This commit replaces all sequences of invalid chars with a single dash and makes sure that the tag name never exceeds the 127 chars limit.
559c62e
to
a677da2
Compare
Updated, so we can be sure that tag names in circleCI are also valid. |
Up to you, really. But now I guess this PR would need to be split in two - one for image-tag to be filed in build-tools repository and one for scope importing the new build-tools version and modifying circle.yml. My issue was the same as the one @alban had - I had / in my branch name and docker did not like it. I just made extra sure that the tag we generate based on a branch name is always valid (no invalid chars and shorter than 128 chars). |
Already an image-tag in build-tools: https://github.com/weaveworks/build-tools/blob/master/image-tag |
I have a branch named like /, which becomes a part of
the tag name. Docker complains about it, because / is not a valid
character in the tag.
This commit replaces all sequences of invalid chars with a single dash
and makes sure that the tag name never exceeds the 127 chars limit.