Skip to content

Commit

Permalink
Only decrypt secrets.tar.enc on travis release builds
Browse files Browse the repository at this point in the history
  • Loading branch information
trevorsibanda committed May 26, 2017
1 parent 89c938b commit 72116ad
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 2 additions & 4 deletions .travis.yml
Expand Up @@ -8,8 +8,6 @@ before_install:
- docker version
- sh -v travis/runcontainer.sh oracle db2
- docker ps
- openssl aes-256-cbc -K $encrypted_c3c0a1170361_key -iv $encrypted_c3c0a1170361_iv
-in secrets.tar.enc -out secrets.tar -d
jdk:
- oraclejdk8
notifications:
Expand All @@ -31,5 +29,5 @@ script:
- admin/build.sh
cache:
directories:
- $HOME/.sbt
- $HOME/.ivy2
- "$HOME/.sbt"
- "$HOME/.ivy2"
6 changes: 4 additions & 2 deletions admin/build.sh
Expand Up @@ -3,8 +3,9 @@
# Setup:
# - Copy keys to admin/secring.asc, admin/pubring.asc
# - Use a new key pair per repository
# - Copy deploykey and deploykey.pub to admin/
# - ssh-keygen -t rsa -b 4096 -C "<github-user-email>"
# - ssh-keygen -t rsa -b 4096 -C "<github-user-email>" #save as deploykey
# - Setup github deploy keys using generated keys, keep a copy of generated keys
# - cp deploykey deploykey.pub admin/
# - openssl rsa -in admin/deploykey -outform pem > admin/deploykey.pem
# - chmod 400 admin/deploykey.pem
# - cp ~/.sbt/sonatype.sbt ./
Expand All @@ -16,6 +17,7 @@ set -e

if [[ "$TRAVIS_TAG" =~ ^v[0-9]+\.[0-9]+(\.[0-9]+)?(-[A-Za-z0-9-]+)? ]]; then
echo "Going to release from tag $TRAVIS_TAG!"
openssl aes-256-cbc -K $encrypted_c3c0a1170361_key -iv $encrypted_c3c0a1170361_iv -in secrets.tar.enc -out secrets.tar -d
myVer=$(echo $TRAVIS_TAG | sed -e s/^v//)
publishVersion='set every version := "'$myVer'"'
extraTarget="+publishSigned +makeSite"
Expand Down

0 comments on commit 72116ad

Please sign in to comment.