This repository has been archived by the owner on Oct 8, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bd8bcb3
commit cdcb6d5
Showing
3 changed files
with
27 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,27 @@ | ||
#!/bin/bash | ||
# This script will build the project. | ||
|
||
GRADLE="./gradlew -I gradle/init-publish.gradle" | ||
|
||
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then | ||
echo -e "Build Pull Request #$TRAVIS_PULL_REQUEST => Branch [$TRAVIS_BRANCH]" | ||
./gradlew -Prelease.useLastTag=true build | ||
$GRADLE -Prelease.useLastTag=true 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}" build snapshot --stacktrace | ||
$GRADLE -Prelease.travisci=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -x test build snapshot --stacktrace | ||
elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" != "" ]; then | ||
echo -e 'Build Branch for Release => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG']' | ||
case "$TRAVIS_TAG" in | ||
version-*) | ||
;; # Ignore Spinnaker product release tags. | ||
*-rc\.*) | ||
./gradlew -Prelease.travisci=true -Prelease.useLastTag=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" candidate --stacktrace | ||
$GRADLE -Prelease.travisci=true -Prelease.useLastTag=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -x test candidate --stacktrace | ||
;; | ||
*) | ||
./gradlew -Prelease.travisci=true -Prelease.useLastTag=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" final --stacktrace | ||
$GRADLE -Prelease.travisci=true -Prelease.useLastTag=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -x test final --stacktrace | ||
;; | ||
esac | ||
else | ||
echo -e 'WARN: Should not be here => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG'] Pull Request ['$TRAVIS_PULL_REQUEST']' | ||
./gradlew -Prelease.useLastTag=true build | ||
$GRADLE -Prelease.useLastTag=true build | ||
fi | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
initscript { | ||
repositories { | ||
mavenLocal() | ||
jcenter() | ||
maven { url 'https://dl.bintray.com/spinnaker/gradle/' } | ||
maven { url "https://plugins.gradle.org/m2/" } | ||
} | ||
dependencies { | ||
classpath 'com.netflix.spinnaker.gradle:spinnaker-gradle-project:5.2.1' | ||
} | ||
} | ||
|
||
// Can't use the plugin ID (spinnaker.project) on init scripts for some reason. | ||
apply plugin: com.netflix.spinnaker.gradle.project.SpinnakerProjectPlugin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,18 @@ | ||
#!/bin/bash | ||
# This script will build the project. | ||
|
||
GRADLE="./gradlew -I gradle/init-publish.gradle" | ||
|
||
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then | ||
echo -e "Assemble Pull Request #$TRAVIS_PULL_REQUEST => Branch [$TRAVIS_BRANCH]" | ||
./gradlew assemble | ||
$GRADLE -Pskip.loadtest=true assemble | ||
elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" == "" ]; then | ||
echo -e 'Assemble Branch with Snapshot => Branch ['$TRAVIS_BRANCH']' | ||
./gradlew -Prelease.travisci=true assemble | ||
$GRADLE -Prelease.travisci=true -Pskip.loadtest=true -x test 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 | ||
$GRADLE -Prelease.travisci=true -Prelease.useLastTag=true -Pskip.loadtest=true -x test assemble | ||
else | ||
echo -e 'WARN: Should not be here => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG'] Pull Request ['$TRAVIS_PULL_REQUEST']' | ||
./gradlew assemble | ||
$GRADLE -Pskip.loadtest=true assemble | ||
fi | ||
|