[Deprecated] Deploying and Releasing Knetminer with Travis - Rothamsted/knetminer Wiki
We migrated from Travis to GitHubActions. See here
TODO, also mention the Jenkins part
The Travis scripts are also able to manage the publication of a new release. Essentially, this runs the steps:
- Set a new version for the Knetminer Maven project
- Maven-deploy with the project having the new version, which, as above, causes artifacts with the new release to be published on our Maven artifactory repository
- Build new Docker images, tag them with the new version and push the result to DockerHub
- Tag the codebase (referring to the new release) with a git tag corresponding to the new version, push it to our github repository
- Changes the Maven project version again, with a new snapshot version. Push the result to github
The above process is managed by the same travis-build.sh script that we mentioned above, which changes its behaviour when it receives environment variables defining the new release version and the new snapshot version that you want apply. To do that, run the steps:
- Before proceeding:
- Regarding Knetminer dependencies on projects controlled by us (eg, Ondex, knetminer-backend), where possible, update the Knetminer POM with links to stable versions of those projects. In case of problems with a running release, this makes it easier to find which dependant we are using
- Ensure you updated github with last changes from all developers, including branches and pull request merges.
- Ensure you've updated the revision history file and pushed it to github
- Ensure the last snapshot version built correctly and our test Docker instances are running it fine
- Do all of the above for the master branch
- Once all of the above is set, open the Travis page for Knetminer, Select More Option -> Trigger build on the top-right corner
- Launch a new build with the parameters:
- Branch: master (always release from it)
- Custom commit message: give a significant message, eg, 'Releasing 1.0'
- Custom Config: give a Travis fragment like this:
This will send the corresponding environment variables to our build script. You don't need to repeat the entire .travis.yml, since the custom config extends the existing one.
env: - NEW_RELEASE_VER='4.0' NEW_SNAPSHOT_VER='4.0.1-SNAPSHOT'
- Note that you need the two variables above defined in the same line, for Travis interprets
multiple lines in the
env:section as parameters for multiple builds.
- For further customisations, refer to the Knetminer Travis configuration file
- Click Trigger Custom Build and hope for the best! At the end, you should have github, dockerhub and our test servers updated, as explained above.