diff --git a/.gitignore b/.gitignore index d10cdf4f5..e02a71942 100644 --- a/.gitignore +++ b/.gitignore @@ -69,3 +69,6 @@ atlassian-ide-plugin.xml # NetBeans specific files/directories .nbattrs + +# publishing secrets +secrets/signing-key diff --git a/.travis.yml b/.travis.yml index bc7f5145f..86a18f0f5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,14 +3,16 @@ dist: xenial language: java jdk: - openjdk8 -install: ./installViaTravis.sh -script: ./buildViaTravis.sh +install: "./installViaTravis.sh" +script: "./buildViaTravis.sh" env: global: - - secure: H5Gre2D7TjPp0UzMgWAlH6m/MifDk0JEQPTLU1Qr+Dm6fBSfozjYs1y29hk9beM936IDGdihYPRon6t1ZNWX1vQKGrmva2ynMwXs12y/F6GEEgjLRVLpX+JAfANZzVDcnIhdWEb8mWQ4ESh0+i2mOMJFwWFhGy2WQuobHCkrn3E= - - secure: eFCW3J9zX0eNMk1PCHGy4EXFGp5PiozIyvO6SB2kna0Jt6CdY3UA/STgpRtReT1iTW/C/lyYb+h6H8FISvTkJhVKITDoVcOpwUXCYxQdXEvhL633z9LYQcKexricKzP2hpePcmEGmNcVNxn9mrIRdo28ds4XOT7dpU54+ZmLTpU= - - secure: T3ROxa73aSSYdwjPJUzjqkMjxHV+g4scdI5pJzTIsQ3fwaoZ3cPubLPOy2pYx59a4MhpdNuT1or/yr/khToPYHxHgj9pGZ8JHLRYjzEEmfDj2WyhVWeYC88Q+4Ncc2JSMT5lHKS/j+N3R9pZf/Cuy9keyvLEKQlXBOBPBf7MWcc= - - secure: fIXSx1SIXJF8//Qo9zmLWKn+APW1sYxw8V1U47kfQTw3Ks2RTg8J7z7gdP4YObWrrrMjZgtCJOWolCNdCPJd8bxypv8o4YAw4w/nDrs/m7p0HcIirZypEGWYuju3g1JkZzQkvCIXIYMfHL0jlYMvjsY9Pjn5rgpFGqEW6lloOCE= + - secure: Hnx5B8Ubo+Of0wzXY9Vv8Bna7dk+CJaMUswYIvbEG26DCGXCNvNa61YoOzCg+hQGyqC90PFnCwwvtqyjk/meePZMd268p5vQIm0v8dcl3xYaSAr4WyGhbfqfTv7kZ1pmw1Ukn+JRqt9fV5CbPJ7zh6NtX59GTL8zMIqh8JwLpgg= + - secure: TaYL6JWsvbza6Q0dhxdmkil8cJpjG0CTmjdU5lJloscNhYTtZefhl9BMWyUjab5qQ9/lO6EG1cwzRehjhPanVz7HF0MDzIvVUKPwvzXkU/tyz4o6Bn5N1mVgjOGEQ9lLdi+0eRppnmIMRgkAmg/R3aHOsEQMQGVB6ztGEs7qSlI= + - secure: jUB1UJO55I8UR39JsbH1gWX7/hpFa8giVyrCJaXeIephNPtP0pd/erMYUjbNxbU2uub5VLuSzHVKUFbg32dG/x+du5LiKbpoZt0FqOjkbZAXLb8S8DP1AW28cigvtubzRQVvBu29bJKthRRr0l9oIqbH5yY329AOGdV/eHTt5c4= + - secure: QU9AWwz8lH+Ciexj9Ebie7XByaByJzYtzYrAu/A08sd6jAWs++e6jTuPQOITNxVmTEsUaQGkD69qIfq9P+bXiQiKNaXEaRUeW3FxjZB51rZ46yo2gc+ES4ehmjF0KcLUF6/jg/r2aMaDwWCFG717KE01cbki4qHrJR8EbhMBtak= + - secure: Xw3pQwFujSwwQGmFPKpQCuBo/KQirZlcQCO4VNEBYfEFgEQ5oIQDix/WJvcTHuVtRzg7oyiYT62TmSxQxEeuq4QtsHfx4XWhnhHhB1yVPq1UCxcjsLoI0ZPjf68GaidAj7WAAwI+UE8jNsl250AITLqVtPD4igG8pihXjs4Kb1k= + - secure: qVEHVj3cCoJwSYZDRON/9KjgmzjYgLgEYdJT2cfTOVw/KILCJ2XRwUBAWaAovi6CGzu36zXbsgkE2ZIZEkdIelQv9kzNVslXekeFrOPWl59IqW6sIxeKtXW8BPdaUQSghmtwezq6Z4Qg0ZdVnljpg/OkhlXKXL3Iy6MFrEw5HzY= cache: directories: - - $HOME/.gradle/caches + - "$HOME/.gradle/caches" diff --git a/build.gradle b/build.gradle index 7ea5b18ba..6fc828159 100644 --- a/build.gradle +++ b/build.gradle @@ -7,7 +7,7 @@ buildscript { } plugins { - id 'nebula.netflixoss' version '8.8.1' + id 'nebula.netflixoss' version '9.1.0' id 'org.gretty' version '2.1.0' } diff --git a/buildViaTravis.sh b/buildViaTravis.sh index 28518353a..36b9f97b3 100755 --- a/buildViaTravis.sh +++ b/buildViaTravis.sh @@ -6,18 +6,20 @@ if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then ./gradlew build elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" == "" ]; then echo -e 'Build Branch with Snapshot => Branch ['$TRAVIS_BRANCH']' - ./gradlew -Prelease.travisci=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" build snapshot + ./gradlew -Prelease.travisci=true -PnetflixOss.username="$NETFLIX_OSS_REPO_USERNAME" -PnetflixOss.password="$NETFLIX_OSS_REPO_PASSWORD" -Psonatype.signingPassword="$NETFLIX_OSS_SIGNING_PASSWORD" build snapshot elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" != "" ]; then echo -e 'Build Branch for Release => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG']' case "$TRAVIS_TAG" in *-rc\.*) - ./gradlew -Prelease.travisci=true -Prelease.useLastTag=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" -PnetflixossAltCandidateRepo=true candidate + ./gradlew -Prelease.travisci=true -PnetflixOss.username="$NETFLIX_OSS_REPO_USERNAME" -PnetflixOss.password="$NETFLIX_OSS_REPO_PASSWORD" -Psonatype.signingPassword="$NETFLIX_OSS_SIGNING_PASSWORD" -Prelease.useLastTag=true candidate ;; *) - ./gradlew -Prelease.travisci=true -Prelease.useLastTag=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" final + ./gradlew -Prelease.travisci=true -PnetflixOss.username="$NETFLIX_OSS_REPO_USERNAME" -PnetflixOss.password="$NETFLIX_OSS_REPO_PASSWORD" -Psonatype.username="$NETFLIX_OSS_SONATYPE_USERNAME" -Psonatype.password="$NETFLIX_OSS_SONATYPE_PASSWORD" -Psonatype.signingPassword="$NETFLIX_OSS_SIGNING_PASSWORD" -Prelease.useLastTag=true final ;; esac else echo -e 'WARN: Should not be here => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG'] Pull Request ['$TRAVIS_PULL_REQUEST']' ./gradlew build fi + + diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 731f8f369..58bd5dd0b 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip diff --git a/installViaTravis.sh b/installViaTravis.sh index 68e45a05f..82cf1b880 100755 --- a/installViaTravis.sh +++ b/installViaTravis.sh @@ -1,16 +1,7 @@ #!/bin/bash # This script will build the project. -if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then - echo -e "Assemble Pull Request #$TRAVIS_PULL_REQUEST => Branch [$TRAVIS_BRANCH]" - ./gradlew assemble -elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" == "" ]; then - echo -e 'Assemble Branch with Snapshot => Branch ['$TRAVIS_BRANCH']' - ./gradlew -Prelease.travisci=true assemble -elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" != "" ]; then - echo -e 'Assemble Branch for Release => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG']' - ./gradlew -Prelease.travisci=true -Prelease.useLastTag=true assemble -else - echo -e 'WARN: Should not be here => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG'] Pull Request ['$TRAVIS_PULL_REQUEST']' - ./gradlew assemble +if [ "$TRAVIS_SECURE_ENV_VARS" = "true" ]; then + echo "Decrypting publishing credentials" + openssl aes-256-cbc -k "$NETFLIX_OSS_SIGNING_FILE_PASSWORD" -in secrets/signing-key.enc -out secrets/signing-key -d fi diff --git a/secrets/signing-key.enc b/secrets/signing-key.enc new file mode 100644 index 000000000..4930271a6 Binary files /dev/null and b/secrets/signing-key.enc differ