Make travis upload PR artifacts to different directory
@@ -5,7 +5,8 @@ env:
- MAVEN_OPTS="-Xmx512M -XX:+ExitOnOutOfMemoryError"
- MAVEN_SKIP_CHECKS_AND_DOCS="-Dair.check.skip-all=true -Dmaven.javadoc.skip=true"
- MAVEN_FAST_INSTALL="-DskipTests $MAVEN_SKIP_CHECKS_AND_DOCS -B -q -T C1"
- - ARTIFACTS_UPLOAD_PATH=travis_build_artifacts/${TRAVIS_REPO_SLUG}/${TRAVIS_BRANCH}/${TRAVIS_BUILD_NUMBER}
+ - ARTIFACTS_UPLOAD_PATH_BRANCH=travis_build_artifacts/${TRAVIS_REPO_SLUG}/${TRAVIS_BRANCH}/${TRAVIS_BUILD_NUMBER}
+ - ARTIFACTS_UPLOAD_PATH_PR=travis_build_artifacts_pr/${TRAVIS_REPO_SLUG}/${TRAVIS_BRANCH}/${TRAVIS_BUILD_NUMBER}
- TEST_FLAGS=""
matrix:
- MAVEN_CHECKS=true
@@ -54,6 +55,13 @@ install:
./mvnw install $MAVEN_FAST_INSTALL -pl presto-hive-hadoop2 -am
fi
+before_script:
+ - |
+ export ARTIFACTS_UPLOAD_PATH=${ARTIFACTS_UPLOAD_PATH_BRANCH}
+ if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
+ export ARTIFACTS_UPLOAD_PATH=${ARTIFACTS_UPLOAD_PATH_PR}
+ fi
+
script:
- |
if [[ -v MAVEN_CHECKS ]]; then
