1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Jenkinsfile: set APT_MIRROR globally

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2019-08-02 17:49:51 +02:00
parent 61fd8b7384
commit a28f2a2338
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C

15
Jenkinsfile vendored
View file

@ -17,6 +17,9 @@ pipeline {
booleanParam(name: 'windowsRS1', defaultValue: false, description: 'Windows 2016 (RS1) Build/Test') booleanParam(name: 'windowsRS1', defaultValue: false, description: 'Windows 2016 (RS1) Build/Test')
booleanParam(name: 'windowsRS5', defaultValue: false, description: 'Windows 2019 (RS5) Build/Test') booleanParam(name: 'windowsRS5', defaultValue: false, description: 'Windows 2019 (RS5) Build/Test')
} }
environment {
APT_MIRROR = 'cdn-fastly.deb.debian.org'
}
stages { stages {
stage('Build') { stage('Build') {
parallel { parallel {
@ -34,7 +37,7 @@ pipeline {
sudo modprobe ip_vs sudo modprobe ip_vs
GITCOMMIT=$(git rev-parse --short HEAD) GITCOMMIT=$(git rev-parse --short HEAD)
docker build --force-rm --build-arg APT_MIRROR=cdn-fastly.deb.debian.org -t docker:$GITCOMMIT . docker build --force-rm --build-arg APT_MIRROR -t docker:$GITCOMMIT .
docker run --rm -t --privileged \ docker run --rm -t --privileged \
-v "$WORKSPACE/bundles:/go/src/github.com/docker/docker/bundles" \ -v "$WORKSPACE/bundles:/go/src/github.com/docker/docker/bundles" \
@ -78,7 +81,7 @@ pipeline {
sudo modprobe ip_vs sudo modprobe ip_vs
GITCOMMIT=$(git rev-parse --short HEAD) GITCOMMIT=$(git rev-parse --short HEAD)
docker build --force-rm --build-arg APT_MIRROR=cdn-fastly.deb.debian.org -t docker:$GITCOMMIT . docker build --force-rm --build-arg APT_MIRROR -t docker:$GITCOMMIT .
docker run --rm -t --privileged \ docker run --rm -t --privileged \
-v "$WORKSPACE/bundles:/go/src/github.com/docker/docker/bundles" \ -v "$WORKSPACE/bundles:/go/src/github.com/docker/docker/bundles" \
@ -124,7 +127,7 @@ pipeline {
steps { steps {
sh ''' sh '''
GITCOMMIT=$(git rev-parse --short HEAD) GITCOMMIT=$(git rev-parse --short HEAD)
docker build --force-rm --build-arg APT_MIRROR=cdn-fastly.deb.debian.org -t docker:${GITCOMMIT}-exp . docker build --force-rm --build-arg APT_MIRROR -t docker:${GITCOMMIT}-exp .
docker run --rm -t --privileged \ docker run --rm -t --privileged \
-v "$WORKSPACE/bundles:/go/src/github.com/docker/docker/bundles" \ -v "$WORKSPACE/bundles:/go/src/github.com/docker/docker/bundles" \
@ -167,7 +170,7 @@ pipeline {
sh ''' sh '''
GITCOMMIT=$(git rev-parse --short HEAD) GITCOMMIT=$(git rev-parse --short HEAD)
docker build --force-rm --build-arg APT_MIRROR=cdn-fastly.deb.debian.org -t docker-s390x:$GITCOMMIT -f Dockerfile . docker build --force-rm --build-arg APT_MIRROR -t docker-s390x:$GITCOMMIT -f Dockerfile .
docker run --rm -t --privileged \ docker run --rm -t --privileged \
-v "$WORKSPACE/bundles:/go/src/github.com/docker/docker/bundles" \ -v "$WORKSPACE/bundles:/go/src/github.com/docker/docker/bundles" \
@ -207,7 +210,7 @@ pipeline {
sh ''' sh '''
GITCOMMIT=$(git rev-parse --short HEAD) GITCOMMIT=$(git rev-parse --short HEAD)
docker build --force-rm --build-arg APT_MIRROR=cdn-fastly.deb.debian.org -t docker-powerpc:$GITCOMMIT -f Dockerfile . docker build --force-rm --build-arg APT_MIRROR -t docker-powerpc:$GITCOMMIT -f Dockerfile .
docker run --rm -t --privileged \ docker run --rm -t --privileged \
-v "$WORKSPACE/bundles:/go/src/github.com/docker/docker/bundles" \ -v "$WORKSPACE/bundles:/go/src/github.com/docker/docker/bundles" \
@ -248,7 +251,7 @@ pipeline {
sh ''' sh '''
GITCOMMIT=$(git rev-parse --short HEAD) GITCOMMIT=$(git rev-parse --short HEAD)
docker build --force-rm --build-arg APT_MIRROR=cdn-fastly.deb.debian.org -t dockerven:$GITCOMMIT . docker build --force-rm --build-arg APT_MIRROR -t dockerven:$GITCOMMIT .
docker run --rm -t --privileged \ docker run --rm -t --privileged \
--name dockerven-pr$BUILD_NUMBER \ --name dockerven-pr$BUILD_NUMBER \