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

Travis release automation #606

Closed
melowe opened this issue Jan 21, 2019 · 1 comment · Fixed by #620
Closed

Travis release automation #606

melowe opened this issue Jan 21, 2019 · 1 comment · Fixed by #620
Assignees
Labels
enhancement Non-user code enhancements

Comments

@melowe
Copy link
Contributor

melowe commented Jan 21, 2019

  1. Deploy snapshot after merging to master
  2. Add/define process to invoke release:prepare/perform remotely.
@melowe melowe self-assigned this Jan 21, 2019
@melowe
Copy link
Contributor Author

melowe commented Jan 28, 2019

Having added a placeholder script deploy.sh to capture all the variables required to decide whether its a release build or a deploy snapshot (merge to master). there is also the following that ca be used for executing remote releases .

travis login --org
travis token --org

curl -s -X POST \
   -H "Content-Type: application/json" \
   -H "Accept: application/json" \
   -H "Travis-API-Version: 3" \
   -H "Authorization: token [THE TOKEN]" \
   -d "{\"request\": {\"branch\":\"master\",\"config\":{\"name\":\"release\"}}}" \
   https://api.travis-ci.org/repo/jpmorganchase%2Ftessera/requests

The deploy.sh script needs to do the following.

if TRAVIS_EVENT_TYPE equals api and TRAVIS_JOB_NAME equals 'release'
mvn -B -DpushChanges=false release:prepare release:perform etc . With the push changes being suppressed a second set of git commands to create a PR to merge to master will also need to be automated. The other option is to create a non master branch at the start, push changes and then create the PR that way.

if TRAVIS_BRANCH equals master and TRAVIS_EVENT_TYPE = push
then run mvn deploy -P release (Deploy snapshot release to central)

There are existing conditions like the GPG variables being present for the build to work. These need to be maintained although how we handles these conditions can vary. For example if we assume for a release or deploy that these are present then we need to create an appropriate error etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Non-user code enhancements
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants