Skip to content

Commit

Permalink
ci: adds code-signing for snapshots using CI-only key
Browse files Browse the repository at this point in the history
  • Loading branch information
harningt committed Mar 11, 2015
1 parent d67a788 commit 7e60633
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
5 changes: 2 additions & 3 deletions .travis.yml
Expand Up @@ -10,13 +10,12 @@ cache:
- $HOME/.m2

before_install:
- mkdir -p ~/.gradle
- test ${TRAVIS_PULL_REQUEST} = false && openssl aes-256-cbc -K $encrypted_c48085a6192b_key -iv $encrypted_c48085a6192b_iv -in gradle/gradle.properties.travis-enc -out ~/.gradle/gradle.properties -d || true
- test ${TRAVIS_SECURE_ENV_VARS} == true && openssl aes-256-cbc -K $encrypted_c48085a6192b_key -iv $encrypted_c48085a6192b_iv -in gradle/private.tar.gz.travis-enc -d | tar -xz || true
install: ''
script:
- TERM=dumb ./gradlew clean check
after_success: |
test ${TRAVIS_SECURE_ENV_VARS} == true && test ${TRAVIS_BRANCH} = develop && test ${TRAVIS_PULL_REQUEST} = false && ./gradlew -P release.stage=SNAPSHOT uploadArchives || false
test ${TRAVIS_SECURE_ENV_VARS} == true && test ${TRAVIS_BRANCH} = develop && test ${TRAVIS_PULL_REQUEST} = false && ./gradlew -P release.stage=SNAPSHOT -P sign=TRUE uploadArchives || false
notifications:
webhooks:
Expand Down
1 change: 0 additions & 1 deletion gradle/gradle.properties.travis-enc

This file was deleted.

3 changes: 3 additions & 0 deletions gradle/maven-publish.gradle
Expand Up @@ -9,6 +9,9 @@ configurations.archives.artifacts.removeAll({
def isRelease = !version.toString().endsWith("SNAPSHOT")
def isSigning = isRelease
def isSigningAllowed = hasProperty('sign') && getProperty('sign') == 'TRUE'
if (isSigningAllowed) {
isSigning = true;
}

def repo = !isRelease ? 'oss-snapshot-local' : 'oss-release-local'
def artifactory_password = hasProperty("artifactory_password") ? getProperty("artifactory_password") : null
Expand Down
Binary file added gradle/private.tar.gz.travis-enc
Binary file not shown.

0 comments on commit 7e60633

Please sign in to comment.