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 condition to not publish for forks #21

Merged
merged 2 commits into from
Mar 8, 2018
Merged

Conversation

impactmass
Copy link
Contributor

Part of #15

  • Adds check to not publish on PRs from forks.

@impactmass impactmass requested a review from ticean March 8, 2018 00:52
"$DOCKER_REPOSITORY:%"
else
echo "No tagging for forks"
fi
Copy link
Member

Choose a reason for hiding this comment

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

@impactmass did you have a particular reason for adding the condition on the tagging step? I don't see any harm with the tags being present if we don't push. The tags would only exist in the local build. I'd prefer to keep conditionals to a single location if possible.

Copy link
Contributor Author

@impactmass impactmass Mar 8, 2018

Choose a reason for hiding this comment

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

My thought was that since they aren't getting pushed the tagging can be skipped. If it's okay to have them in the local builds, I can enable. There'll be a slight modification to the tagging (because docker tagging fails tags with the / character).

.circleci/bin/docker-tags "$CIRCLE_SHA1" "$CIRCLE_BRANCH" | sed 's/\//-/g' | xargs -t -I % \
    > docker-cache/docker-tags.txt

Copy link
Member

Choose a reason for hiding this comment

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

Yep, good find! You found a bug that the acceptable branch name chars and Docker tag chars aren't the same set. Sound OK to handle that as a separate issue?

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, sounds good to put that separate. I'll update this to remove the condition around tagging.

@impactmass impactmass merged commit 8abd2a5 into master Mar 8, 2018
@impactmass impactmass deleted the docker-publish-update branch March 8, 2018 18:57
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.

2 participants