-
Notifications
You must be signed in to change notification settings - Fork 398
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 tagging of remote repo. #903
Conversation
@@ -18,6 +18,10 @@ | |||
promptText="Enter a deploy branch (defaults to [current branch]-build)" | |||
promptCharacter=":" | |||
defaultValue="${branch.current}-build"/> | |||
<propertyprompt propertyName="deploy.tag" useExistingValue="true" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to split this into two prompts:
- Add a prompt to the deploy target which asks Would you like to create a tag?.
- If yes, prompt for tag name "Enter the name of the tag to create:" and use input to set the value of deploy.tag property.
Otherwise, this will always create a tag.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
refactoring now.
<if> | ||
<isset property="deploy.tag"/> | ||
<then> | ||
<exec command="echo ${deploy.remote} | openssl md5 | cut -d' ' -f 2" outputProperty="remoteName"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remoteName should already be set here, so I think this line can be removed.
|
||
<target name="deploy:tag" description="Tag repository."> | ||
<!-- Add -build to tag. --> | ||
<exec command="git tag -a ${deploy.tag}-build -m '${deploy.commitMsg}'" dir="${deploy.dir}" logoutput="true" level="${blt.exec_level}" passthru="true"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This tags the "build" repo, but not the source repo, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
correct
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we want to also tag the source repo? @geerlingguy
It's failing on the Drupal VM test ( |
@geerlingguy it looks like 8.x branch itself is failing. I agree, this seems unrelated to this PR. |
@grasmash - I think I noticed a note about tagging the source repo... basically this should only create a tag in the artifact repo if the build is being run on a tag already created in the source repo (I think, right?). |
Fixes #830.
Changes proposed:
Todos:
Note: I incorporated this into my project's .travis.yml by adding:
Using this in travisCI will force a tag on the master branch. TRAVIS_BRANCH variable is set to the same as TRAVIS_TAG when travis is building based on a tag.