forked from apereo/cas
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
41 changed files
with
296 additions
and
85 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
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,15 @@ | ||
#!/bin/bash | ||
|
||
# while sleep 9m; do echo -e '\n=====[ Gradle build is still running ]====='; done & | ||
|
||
echo "Running Oracle docker image..." | ||
docker run -d -p 1521:1521 --name oracle-db store/oracle/database-enterprise:12.2.0.1-slim | ||
echo "Waiting for Oracle image to prepare..." | ||
sleep 30 | ||
docker ps | grep "oracle-db" | ||
echo "Waiting for Oracle server to come online..." | ||
until curl --output /dev/null --silent --fail telnet://127.0.0.1:1521; do | ||
printf '.' | ||
sleep 2 | ||
done | ||
echo "Oracle docker image is running." |
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,77 @@ | ||
#!/bin/bash | ||
source ./ci/functions.sh | ||
|
||
runBuild=false | ||
echo "Reviewing changes that might affect the Gradle build..." | ||
currentChangeSetAffectsTests | ||
retval=$? | ||
if [ "$retval" == 0 ] | ||
then | ||
echo "Found changes that require the build to run test cases." | ||
runBuild=true | ||
else | ||
echo "Changes do NOT affect project test cases." | ||
runBuild=false | ||
fi | ||
|
||
if [ "$runBuild" = false ]; then | ||
exit 0 | ||
fi | ||
|
||
prepCommand="echo 'Running command...'; " | ||
gradle="./gradlew $@" | ||
gradleBuild="" | ||
gradleBuildOptions="--stacktrace --build-cache --configure-on-demand --no-daemon -DtestCategoryType=ORACLE " | ||
|
||
echo -e "***********************************************" | ||
echo -e "Gradle build started at `date`" | ||
echo -e "***********************************************" | ||
|
||
./ci/tests/oracle/run-oracle-server.sh | ||
|
||
gradleBuild="$gradleBuild testOracle jacocoRootReport -x test -x javadoc -x check \ | ||
-DskipGradleLint=true--parallel \ | ||
-DskipNestedConfigMetadataGen=true " | ||
|
||
if [[ "${TRAVIS_COMMIT_MESSAGE}" == *"[show streams]"* ]]; then | ||
gradleBuild="$gradleBuild -DshowStandardStreams=true " | ||
fi | ||
|
||
if [[ "${TRAVIS_COMMIT_MESSAGE}" == *"[rerun tasks]"* ]]; then | ||
gradleBuild="$gradleBuild --rerun-tasks " | ||
fi | ||
|
||
if [[ "${TRAVIS_COMMIT_MESSAGE}" == *"[refresh dependencies]"* ]]; then | ||
gradleBuild="$gradleBuild --refresh-dependencies " | ||
fi | ||
|
||
if [ -z "$gradleBuild" ]; then | ||
echo "Gradle build will be ignored since no commands are specified to run." | ||
else | ||
tasks="$gradle $gradleBuildOptions $gradleBuild" | ||
echo -e "***************************************************************************************" | ||
echo $prepCommand | ||
echo $tasks | ||
echo -e "***************************************************************************************" | ||
|
||
waitloop="while sleep 9m; do echo -e '\n=====[ Gradle build is still running ]====='; done &" | ||
eval $waitloop | ||
waitRetVal=$? | ||
|
||
eval $prepCommand | ||
eval $tasks | ||
retVal=$? | ||
|
||
echo -e "***************************************************************************************" | ||
echo -e "Gradle build finished at `date` with exit code $retVal" | ||
echo -e "***************************************************************************************" | ||
|
||
if [ $retVal == 0 ]; then | ||
echo "Uploading test coverage results..." | ||
bash <(curl -s https://codecov.io/bash) | ||
echo "Gradle build finished successfully." | ||
else | ||
echo "Gradle build did NOT finish successfully." | ||
exit $retVal | ||
fi | ||
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
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
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.