diff options
Diffstat (limited to 'docker')
-rw-r--r-- | docker/.gitignore | 1 | ||||
-rw-r--r-- | docker/Dockerfile.ci | 3 | ||||
-rwxr-xr-x | docker/vespa-ci-internal.sh | 1 | ||||
-rwxr-xr-x | docker/vespa-ci.sh | 5 |
4 files changed, 9 insertions, 1 deletions
diff --git a/docker/.gitignore b/docker/.gitignore index d8d0fbf70f1..05fe7c1eef8 100644 --- a/docker/.gitignore +++ b/docker/.gitignore @@ -1,2 +1,3 @@ *.rpm vespa-ci-*.log +tmp/ diff --git a/docker/Dockerfile.ci b/docker/Dockerfile.ci index 39a5317fe14..6407c2b3d16 100644 --- a/docker/Dockerfile.ci +++ b/docker/Dockerfile.ci @@ -1,6 +1,9 @@ FROM vespabuild COPY vespa-ci-internal.sh /vespa-ci-internal.sh +COPY tmp/vespa.spec /vespa.spec + +RUN yum-builddep -y /vespa.spec # Build using non-root user 'vespabuilder' RUN useradd --create-home -s /bin/bash vespabuilder diff --git a/docker/vespa-ci-internal.sh b/docker/vespa-ci-internal.sh index 40df09c40d2..90dffb45d70 100755 --- a/docker/vespa-ci-internal.sh +++ b/docker/vespa-ci-internal.sh @@ -20,7 +20,6 @@ mkdir "${BUILD_DIR}" git clone --no-checkout --local --no-hardlinks file:///vespa "${SOURCE_DIR}" cd "${SOURCE_DIR}" git checkout --detach ${GIT_COMMIT} -yum-builddep -y ./dist/vespa.spec source /opt/rh/devtoolset-6/enable || true sh ./bootstrap.sh full MAVEN_OPTS="-Xms512m -Xmx512m" mvn install diff --git a/docker/vespa-ci.sh b/docker/vespa-ci.sh index bdb5dc8cd2f..d3d213fa87b 100755 --- a/docker/vespa-ci.sh +++ b/docker/vespa-ci.sh @@ -16,6 +16,11 @@ BUILD_DOCKER_IMAGE="vespabuild" CI_DOCKER_IMAGE="vespaci" docker build -t "$BUILD_DOCKER_IMAGE" -f Dockerfile.build . + +# Create a temporarily copy of the rpm spec file inside docker directory so it can be referenced by the Dockerfile +rm -rf tmp; mkdir tmp +cp -p ../dist/vespa.spec tmp/vespa.spec + docker build -t "$CI_DOCKER_IMAGE" -f Dockerfile.ci . docker run --rm -v $(pwd)/..:/vespa --entrypoint /vespa-ci-internal.sh "$CI_DOCKER_IMAGE" "$GIT_COMMIT" \ 2>&1 | tee vespa-ci-${GIT_COMMIT}-$(date +%Y-%m-%dT%H:%M:%S%z).log |