summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnstein Ressem <aressem@verizonmedia.com>2020-12-18 15:07:48 +0100
committerGitHub <noreply@github.com>2020-12-18 15:07:48 +0100
commitb5cb754381e467ab8286526ab058c1abfe2e0afe (patch)
treefd26df601c4b3bff941e9c70ed0a2ab9ccf1fc95
parentf6eb76ea7290b66a6e2d83fbb20413603b04a543 (diff)
parentf5733a9b676e9bd73178e893193ee71e3739dbfd (diff)
Merge pull request #15847 from vespa-engine/aressem/expose-travis-env-inside-container
Forward required TRAVIS_* variables inside container.
-rwxr-xr-xtravis/detect-what-to-build.sh4
-rwxr-xr-xtravis/travis.sh3
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..42aaec3a43b 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 $?