Skip to content

Explore automating maven releases #153

Closed

Description

@ajkannan

Right now, releases to maven are done manually, and it would be nice to do this within a script triggered by Travis. This may be a bit tricky because deploying requires signing the bits.

Activity

  1. mziccard commented on Sep 14, 2015

    @mziccard
    Contributor

    This would be super cool. You are also right, it might be tricky and there's a bit of a lack of information on how to do it. If I remember correctly we should add a <profile> element in settings.xml to tell the gpg maven plugin where to look for the gpg keys:

    <properties>
      <gpg.homedir>${TRAVIS_BUILD_DIR}/target/travis</gpg.homedir>
      <gpg.keyname>KEYNAME</gpg.keyname>
      <gpg.passphrase>PASSPHRASE</gpg.passphrase>
    </properties>

    The pgp keys must then be signed (using either travis file-encrypt or openssl directly) and put in the repository (travis branch), lets call them secring.gpg.enc and pubring.gpg.enc. We must then add the decryption commands to the before_install phase in .travis.yml. If we use travis file-encrypt to encrypt the files the command should also output the code to decrypt them. We must only change the path to the encrypted files (as they will be in /target/travis), something like:

    before-install:
    - openssl aes-256-cbc -K $encrypted_0a6446eb3ae3_key -iv $encrypted_0a6446eb3ae3_key -in secring.gpg.enc -out local.secring.gpg -d
    - openssl aes-256-cbc -K $encrypted_0z6656gf43dc_key -iv $encrypted_0z6656gf43dc_key -in pubring.gpg.enc -out local.pubring.gpg -d

    Once this is set up mvn clean deploy should do the job.
    We could then trigger mvn clean deploy when tags are pushed (TRAVIS_TAG variable would be set with the tag name).

  2. self-assigned this
    on Sep 30, 2015
  3. added a commit that references this issue on Jan 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

🚨 criticalP0 critical issue. Requires immediate fixtriage meI really want to be triaged.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    Sponsor
    SponsoredKunjungi sekarang
    Promo