Skip to content

Instantly share code, notes, and snippets.

@npiper
Last active April 25, 2018 23:46
Show Gist options
  • Save npiper/7766fa3708956026acd1e3c2bdf5c833 to your computer and use it in GitHub Desktop.
Save npiper/7766fa3708956026acd1e3c2bdf5c833 to your computer and use it in GitHub Desktop.
How to get Travis-CI to push snapshot builds to an S3 Snapshot Repo

Goals

Pre-Requisites

  • 2 AWS S3 Buckets for repo storage
  • AWS Access Key, Secret key for a limited access account (Write / Read access to those buckets)
  • Travis-ci account
  • Github maven project
  • 'Parent Pom' - set your usual Maven snapshot & Release Repo's are set
  • travis cli on your local machine (Encrypt your Authentication assets)

For every project you want to link to the Deploy process for your repo

  • Create a .travis.yml
  • Encrypt your Auth keys into the .travis.yml file
  • Overwrite a conditional build / deploy step in .travis.yml like mvn clean test install deploy

References

https://docs.travis-ci.com/user/customizing-the-build/#Customizing-the-Build-Step

https://github.com/jcaddel/maven-s3-wagon/wiki/Authentication

https://blog.travis-ci.com/2017-03-30-deploy-maven-travis-ci-packagecloud/

https://docs.travis-ci.com/user/languages/java#Projects-Using-Maven

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment