Skip to content

Commit

Permalink
Merge b0a0dc8 into 43f9011
Browse files Browse the repository at this point in the history
  • Loading branch information
mprimi committed Nov 20, 2017
2 parents 43f9011 + b0a0dc8 commit f2b5088
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 20 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Expand Up @@ -17,7 +17,7 @@ buildscript {
plugins {
id "com.github.kt3k.coveralls" version "2.8.1"
id "io.spring.dependency-management" version "1.0.3.RELEASE"
id "nebula.netflixoss" version "4.0.0"
id "nebula.netflixoss" version "4.1.0"
id "org.ajoberstar.github-pages" version "1.7.2"
}

Expand Down
Expand Up @@ -278,7 +278,7 @@ private void cleanupProcesses(final String jobId) {
});
}
} catch (final GenieException ge) {
log.error("Unable to cleanup process for job due to exception. {}", jobId, ge);
log.error("Unable to cleanup process for job {} due to exception.", jobId, ge);
incrementErrorCounter("JOB_CLEANUP_FAILURE", ge);
} catch (Throwable t) {
incrementErrorCounter("JOB_PROCESS_CLEANUP_FAILURE", t);
Expand Down Expand Up @@ -531,19 +531,22 @@ private boolean processJobDir(final Job job) throws GenieException, IOException
} else {
commandLine = new CommandLine("tar");
}
commandLine.addArgument("-c");
commandLine.addArgument("-z");
commandLine.addArgument("-f");
commandLine.addArgument(localArchiveFile.getCanonicalPath());
commandLine.addArgument("./");
commandLine
.addArgument("-c")
.addArgument("-z")
.addArgument("-f")
.addArgument(localArchiveFile.getCanonicalPath())
.addArgument("--exclude")
.addArgument(localArchiveFile.getName())
.addArgument("./");

this.executor.setWorkingDirectory(jobDir);

log.debug("Archive command : {}", commandLine);
try {
this.executor.execute(commandLine);
} catch (Throwable t) {
log.warn("Failed to created archive of job files", t);
log.warn("Failed to created archive of job files for job: {}", jobId, t);
incrementErrorCounter("JOB_ARCHIVAL_FAILURE", t);
throw t;
}
Expand All @@ -557,10 +560,10 @@ private boolean processJobDir(final Job job) throws GenieException, IOException
log.debug("Deleting archive file");
try {
if (this.runAsUserEnabled) {
final CommandLine deleteCommand = new CommandLine("sudo");
deleteCommand.addArgument("rm");
deleteCommand.addArgument("-f");
deleteCommand.addArgument(localArchiveFile.getCanonicalPath());
final CommandLine deleteCommand = new CommandLine("sudo")
.addArgument("rm")
.addArgument("-f")
.addArgument(localArchiveFile.getCanonicalPath());

this.executor.setWorkingDirectory(jobDir);
log.debug("Delete command: {}", deleteCommand);
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Expand Up @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.3.1-bin.zip
14 changes: 7 additions & 7 deletions travis/buildViaTravis.sh
Expand Up @@ -6,25 +6,25 @@ set -e

if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
echo -e "Build Pull Request #$TRAVIS_PULL_REQUEST => Branch [$TRAVIS_BRANCH]"
./gradlew build asciidoc coveralls dockerBuildAllImages
./gradlew --no-daemon build asciidoc coveralls dockerBuildAllImages
# Re-run genie-web integration tests with MySQL...
INTEGRATION_TEST_DB=mysql ./gradlew genie-web:integrationTests
INTEGRATION_TEST_DB=mysql ./gradlew --no-daemon genie-web:integrationTests
# ... and PostgreSQL
INTEGRATION_TEST_DB=postgresql ./gradlew genie-web:integrationTests
INTEGRATION_TEST_DB=postgresql ./gradlew --no-daemon genie-web:integrationTests
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}" snapshot coveralls publishGhPages dockerPush
./gradlew --no-daemon -Prelease.travisBranch=$TRAVIS_BRANCH -Prelease.travisci=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" snapshot coveralls publishGhPages dockerPush
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}" candidate coveralls publishGhPages dockerPush
./gradlew --no-daemon -Prelease.travisci=true -Prelease.useLastTag=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" candidate coveralls publishGhPages dockerPush
;;
*)
./gradlew -Prelease.travisci=true -Prelease.useLastTag=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" final coveralls publishGhPages dockerPush
./gradlew --no-daemon -Prelease.travisci=true -Prelease.useLastTag=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" final coveralls publishGhPages dockerPush
;;
esac
else
echo -e 'WARN: Should not be here => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG'] Pull Request ['$TRAVIS_PULL_REQUEST']'
./gradlew build coveralls
./gradlew --no-daemon build coveralls
fi

0 comments on commit f2b5088

Please sign in to comment.