diff options
author | Arnstein Ressem <aressem@verizonmedia.com> | 2020-12-18 14:37:15 +0100 |
---|---|---|
committer | Arnstein Ressem <aressem@verizonmedia.com> | 2020-12-18 14:37:15 +0100 |
commit | 2760386b4e986d8f1f4217a3dc120db4b23245ca (patch) | |
tree | 8b1d6f11a8922ef609a1ce896f6025d760b7aa1f /travis | |
parent | f6eb76ea7290b66a6e2d83fbb20413603b04a543 (diff) |
Forward required TRAVIS_* variables inside container.
Diffstat (limited to 'travis')
-rwxr-xr-x | travis/detect-what-to-build.sh | 4 | ||||
-rwxr-xr-x | travis/travis.sh | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/travis/detect-what-to-build.sh b/travis/detect-what-to-build.sh index 3119e01ef61..4387b6e4334 100755 --- a/travis/detect-what-to-build.sh +++ b/travis/detect-what-to-build.sh @@ -16,9 +16,9 @@ FILES=$(for C in $COMMITS; do JSON=$(curl -sLf https://api.github.com/repos/$TRA if [[ -z $FILES ]]; then SHOULD_BUILD=all -elif ! grep -v -E "(.h|.hh|.hxx|.c|.cpp|.cxx)$" <<< "$FILES"; then +elif ! grep -v -E "(.h|.hh|.hxx|.c|.cpp|.cxx)$" <<< "$FILES" &> /dev/null; then SHOULD_BUILD=cpp -elif ! grep -v -E "(.java)$" <<< "$FILES"; then +elif ! grep -v -E "(.java)$" <<< "$FILES" &> /dev/null; then SHOULD_BUILD=java else SHOULD_BUILD=all diff --git a/travis/travis.sh b/travis/travis.sh index 3ed81d1864b..1ea4d43dd66 100755 --- a/travis/travis.sh +++ b/travis/travis.sh @@ -14,5 +14,6 @@ DOCKER_IMAGE=vespaengine/vespa-build-centos7:latest bell & docker run --rm -v ${HOME}/.m2:/root/.m2 -v ${HOME}/.ccache:/root/.ccache -v $(pwd):/source \ - --entrypoint /source/travis/travis-build.sh ${DOCKER_IMAGE} + -e TRAVIS_REPO_SLUG=$TRAVIS_REPO_SLUG -e TRAVIS_PULL_REQUEST=$TRAVIS_PULL_REQUEST \ + --entrypoint /source/travis/travis-build.sh ${DOCKER_IMAGE} exit $? |