Skip to content

[Deprecated] Deploying and Releasing Knetminer with Travis

Marco Brandizi edited this page Jun 5, 2021 · 1 revision

Deprecated!

We migrated from Travis to GitHubActions. See here

Deploying Knetminer

TODO, also mention the Jenkins part

Releasing

The Travis scripts are also able to manage the publication of a new release. Essentially, this runs the steps:

  1. Set a new version for the Knetminer Maven project
  2. 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
  3. Build new Docker images, tag them with the new version and push the result to DockerHub
  4. Tag the codebase (referring to the new release) with a git tag corresponding to the new version, push it to our github repository
  5. 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:

  1. 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
  2. Once all of the above is set, open the Travis page for Knetminer, Select More Option -> Trigger build on the top-right corner
  3. 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:
    env:
      - NEW_RELEASE_VER='4.0' NEW_SNAPSHOT_VER='4.0.1-SNAPSHOT'
    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.
    • 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
  4. 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.