Skip to content

Commit

Permalink
Minor Travis releases changes (#778)
Browse files Browse the repository at this point in the history
* Add scm id and replace ssh git urls with https

* Change Maven settings used by Travis to work with GitHub https protocol

* [WIP] Start changing travis config to perform releases

* Fix typo
  • Loading branch information
chris-j-h authored and melowe committed Jun 4, 2019
1 parent 025f1e7 commit 36ec657
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
11 changes: 7 additions & 4 deletions .maven.xml
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
<settings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/SETTINGS/1.0.0" xsi:schemalocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<servers>
<!-- Maven Central deployment -->
<server>
<!-- Maven Central Deployment -->
<id>ossrh</id>
<username>${env.SONATYPE_USERNAME}</username>
<password>${env.SONATYPE_PASSWORD}</password>
</server>


<!-- GitHub tag/release -->
<server>
<id>github</id>
<password>${env.CI_USER_TOKEN}</password>
<username>${env.GITHUB_USERNAME}</username>
<password>${env.GITHUB_TOKEN}</password>
</server>

</servers>

<profiles>
<!-- Signing for Maven Central deployment -->
<profile>
<id>ossrh</id>
<activation>
Expand Down
9 changes: 5 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,24 +72,25 @@ matrix:
- mvn deploy --settings .maven.xml -P release -q || travis_terminate 1
- if: type = api
name: "Perform release"
before_script:
- echo -e "Host github.com\n\tHostName github.com\n\tUser git\n\tIdentityFile ~/.ssh/id_rsa\n" >> ~/.ssh/config
jdk: oraclejdk8
# before_script:
# - echo -e "Host github.com\n\tHostName github.com\n\tUser git\n\tIdentityFile ~/.ssh/id_rsa\n" >> ~/.ssh/config
script:
- echo $GPG_SECRET_KEYS | base64 --decode | gpg --import
- echo $GPG_OWNERTRUST | base64 --decode | gpg --import-ownertrust
- release_version=`mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec`
- branch_name="release-${release_version}"
- git checkout -b $branch_name || travis_terminate 1
# make batch/offline i.e. provide version, tag, next dev version as CLI args etc.
- mvn --settings .maven.xml -B -DpushChanges=true release:prepare || travis_terminate 1
- mvn --settings .maven.xml -B -DpushChanges=true release:perform || travis_terminate 1
- echo "TODO: The release branch $branch_name must be manually merged back to master."
jdk: oraclejdk8
# - if: branch = travis_changes AND type = push
# name: "Deploy site"
# jdk: oraclejdk8
# before_install:
# - echo -e "machine github.com\n login $CI_USER_TOKEN" > ~/.netrc
# script:
# script:
# - mvn site-deploy
# install: echo "install"

Expand Down

0 comments on commit 36ec657

Please sign in to comment.