Skip to content

Commit

Permalink
fix #359, Allow travis to auto publish signed artifacts to nexus sona…
Browse files Browse the repository at this point in the history
…type for snapshot and release builds
  • Loading branch information
clockfly committed Jan 27, 2015
1 parent 771a6b1 commit 5c0db7c
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 13 deletions.
11 changes: 2 additions & 9 deletions .travis.yml
Expand Up @@ -2,7 +2,6 @@ language:
- java
- scala
before_install:
- if [[ $TRAVIS_PULL_REQUEST == "false" ]]; then openssl aes-256-cbc -K $encrypted_6014e4216d04_key -iv $encrypted_6014e4216d04_iv -in secring.asc.enc -out /home/travis/build/intel-hadoop/gearpump/secring.asc -d;ls -l /home/travis/build/intel-hadoop/gearpump/secring.asc;fi
- sudo pip install codecov
script: sbt clean coverage test
jdk:
Expand All @@ -15,17 +14,11 @@ cache:
- $HOME/.ivy2
git:
depth: 1
env:
global:
- secure: HLEt1PMZ8gIv1jmM7t+El8EP2I04ojPPMsjMYOfE9HxvpZ9d+xqF5M6vh43o96nq0dPLDMggZLR2WZ8DA1SSidE3+4dVGMl621kKX9wBFzenliiO8NmYpT7MisTjjSS1HLgQhCGXf77WVZVpziit1PXFR3+hSzekE8t+ZWtBvjQ=
- secure: VyJnDR7aPtqzWmy6GX17KYI5YYGvve7kCzfng8s5/m0scIC9RhlSBv6rya7r8BFPq0OXWzZhamm44MOF+Z5Ct30vg7IpHOX6H+KwECfMoj3vV6un+OAsk+hfy5uDxGMFqMHa71W8s0URcv3p+xntjzDSGAydQsH98PMEvQ8KqG8=
- secure: hD/jcQkh1TTa+DxSoU7fXuJ6LT59GHPo9jFQjAIzW1WR+C8MSoFAJ26Kr3PlsuvGTt/lY827sXKATa9K/A1MP3v71AujWPs/kxusAMC66XJtV3hauT7hn2XlHKnr9FW3GTgJrkzLdPvMrvgYTk2WVKnk6SlxfUVokWPPICUatb0=
after_success:
- codecov
- if [[ $TRAVIS_BRANCH == "master" && $TRAVIS_PULL_REQUEST == "false" && $TRAVIS_TAG
== "" ]];then sbt clean publish-signed sonatypeRelease; fi
- if [[ $TRAVIS_TAG != "" && $TRAVIS_PULL_REQUEST == "false" ]];then sbt clean publish-signed
sonatypeRelease; fi
== "" ]];then sbt clean publish; fi
- if [[ $TRAVIS_TAG != "" && $TRAVIS_PULL_REQUEST == "false" ]];then openssl aes-256-cbc -K $encrypted_3d8d53d5fdbf_key -iv $encrypted_3d8d53d5fdbf_iv -in secring.asc.enc -out secring.asc -d; sbt clean publishSigned sonatypeRelease; fi
before_deploy:
- sbt clean assembly packArchive travis_deploy
deploy:
Expand Down
9 changes: 5 additions & 4 deletions project/Build.scala
Expand Up @@ -31,7 +31,7 @@ object Build extends sbt.Build {
val commonsLoggingVersion = "1.1.3"
val commonsIOVersion = "2.4"
val findbugsVersion = "2.0.1"
val gearPumpVersion = "0.2.3-SNAPSHOT"
val gearPumpVersion = "0.2.3"
val guavaVersion = "15.0"
val dataReplicationVersion = "0.7"
val hadoopVersion = "2.5.1"
Expand Down Expand Up @@ -69,12 +69,13 @@ object Build extends sbt.Build {
organization := "com.github.intel-hadoop",
parallelExecution in Test := false,
parallelExecution in ThisBuild := false,
useGpg := true,
usePgpKeyHex("FEEA9B39"),
pgpSecretRing := file("/home/travis/build/intel-hadoop/gearpump/secring.asc"),
useGpg := false,
pgpSecretRing := file("./secring.asc"),
pgpPublicRing := file("./pubring.asc"),
scalacOptions ++= Seq("-Yclosure-elim","-Yinline"),
publishMavenStyle := true,

pgpPassphrase := Option(System.getenv().get("PASSPHRASE")).map(_.toArray),
credentials += Credentials(
"Sonatype Nexus Repository Manager",
"oss.sonatype.org",
Expand Down
18 changes: 18 additions & 0 deletions pubring.asc
@@ -0,0 +1,18 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: BCPG v1.51

mQENBFTHlRsBCACqoycQnFu2DMHAFcC5phvnotj6vFVAhRiXXjDJozVp+hqMAwRJ
uVyZCFgPOfkXvhrNvFH34KYmYMjw1mfnje1NCq22FLANrc8PJggM9wwzapSGR0ZF
JRSlXBq3e2bmdWjJVZNsziBW4X7c6s3twPYAzsVXO2pKlt/rUttryI7zaBORXaOo
Bp/pbhNMfN8rjjaKQ8A7eJ3fcmWNITFoPocHO5rUrttWgeoAnF69p/oZb4kNtQ2M
FbmSabo/h3Wq7O4zk4TqAOyLbtirUFObcBkEmPzk4tMfvDti30o1c2ia8nZKKNMx
biRZdSG2bfBvrdWJyju5UQmbIiDMTlvNzRitABEBAAG0HWdlYXJwdW1wIDxjbG9j
a2ZseUBnbWFpbC5jb20+iQEcBBMBAgAGBQJUx5UbAAoJEG3cCZ/NqbT0/80H/3VY
n/seqRH/qrdvvO0H4kNdnOFUMMZGF6hm5igphxnx5XWKyIxMdi3X1Tss48cbSe+0
ZkuLIg2S7n91CgtIcUgpALScGpFGPWs98uW07w6hw9F4RXzwW74zC1QcQZX4kc+j
RS9IWQdf+Cbk8/47ySTNlv5pIkogDCS2/yygDJl5kh2xIapSewdzdGgyJvaHAfHV
upitD1MNSuBol92sgxbL/vGa/HjGUZuMLlL0vicB+LdLhlXFuxlOutAxqTc8AVt+
CDbmicyJvBnAtMJc9i590m9+XzYHthGS86oInh0uS7OywEbbfOg8FwBFhV+XqHe5
Qkofj4/Uj1r76AD3gA8=
=hzQJ
-----END PGP PUBLIC KEY BLOCK-----
Binary file modified secring.asc.enc
Binary file not shown.

0 comments on commit 5c0db7c

Please sign in to comment.