2019-07-30 20:07:30 -04:00
|
|
|
#!groovy
|
2019-01-10 15:08:10 -05:00
|
|
|
pipeline {
|
2019-08-02 11:34:38 -04:00
|
|
|
agent none
|
2019-07-22 17:19:35 -04:00
|
|
|
|
2019-08-02 11:34:38 -04:00
|
|
|
options {
|
|
|
|
buildDiscarder(logRotator(daysToKeepStr: '30'))
|
2019-08-08 22:08:21 -04:00
|
|
|
timeout(time: 2, unit: 'HOURS')
|
2019-08-02 11:34:38 -04:00
|
|
|
timestamps()
|
|
|
|
}
|
|
|
|
parameters {
|
2019-09-10 03:46:19 -04:00
|
|
|
booleanParam(name: 'unit_validate', defaultValue: true, description: 'amd64 (x86_64) unit tests and vendor check')
|
|
|
|
booleanParam(name: 'amd64', defaultValue: true, description: 'amd64 (x86_64) Build/Test')
|
|
|
|
booleanParam(name: 's390x', defaultValue: true, description: 'IBM Z (s390x) Build/Test')
|
|
|
|
booleanParam(name: 'ppc64le', defaultValue: true, description: 'PowerPC (ppc64le) Build/Test')
|
2019-09-10 19:37:09 -04:00
|
|
|
booleanParam(name: 'windowsRS1', defaultValue: false, description: 'Windows 2016 (RS1) Build/Test')
|
2019-08-14 17:26:34 -04:00
|
|
|
booleanParam(name: 'windowsRS5', defaultValue: true, description: 'Windows 2019 (RS5) Build/Test')
|
2019-08-11 11:26:26 -04:00
|
|
|
booleanParam(name: 'skip_dco', defaultValue: false, description: 'Skip the DCO check')
|
2019-08-02 11:34:38 -04:00
|
|
|
}
|
2019-08-02 11:49:51 -04:00
|
|
|
environment {
|
2019-08-03 10:58:46 -04:00
|
|
|
DOCKER_BUILDKIT = '1'
|
2019-08-09 12:12:29 -04:00
|
|
|
DOCKER_EXPERIMENTAL = '1'
|
2019-08-03 11:10:51 -04:00
|
|
|
DOCKER_GRAPHDRIVER = 'overlay2'
|
2019-08-03 10:58:46 -04:00
|
|
|
APT_MIRROR = 'cdn-fastly.deb.debian.org'
|
|
|
|
CHECK_CONFIG_COMMIT = '78405559cfe5987174aa2cb6463b9b2c1b917255'
|
2019-08-23 15:46:55 -04:00
|
|
|
TESTDEBUG = '0'
|
2019-08-08 22:08:21 -04:00
|
|
|
TIMEOUT = '120m'
|
2019-08-02 11:49:51 -04:00
|
|
|
}
|
2019-08-02 11:34:38 -04:00
|
|
|
stages {
|
2019-09-03 15:26:21 -04:00
|
|
|
stage('pr-hack') {
|
|
|
|
when { changeRequest() }
|
|
|
|
steps {
|
|
|
|
script {
|
|
|
|
echo "Workaround for PR auto-cancel feature. Borrowed from https://issues.jenkins-ci.org/browse/JENKINS-43353"
|
|
|
|
def buildNumber = env.BUILD_NUMBER as int
|
|
|
|
if (buildNumber > 1) milestone(buildNumber - 1)
|
|
|
|
milestone(buildNumber)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-08-11 11:26:26 -04:00
|
|
|
stage('DCO-check') {
|
|
|
|
when {
|
|
|
|
beforeAgent true
|
|
|
|
expression { !params.skip_dco }
|
|
|
|
}
|
2019-09-03 15:26:21 -04:00
|
|
|
agent { label 'amd64 && ubuntu-1804 && overlay2' }
|
2019-08-11 11:26:26 -04:00
|
|
|
steps {
|
|
|
|
sh '''
|
|
|
|
docker run --rm \
|
|
|
|
-v "$WORKSPACE:/workspace" \
|
|
|
|
alpine sh -c 'apk add --no-cache -q git bash && cd /workspace && hack/validate/dco'
|
|
|
|
'''
|
|
|
|
}
|
|
|
|
}
|
2019-08-02 11:34:38 -04:00
|
|
|
stage('Build') {
|
|
|
|
parallel {
|
2019-08-03 10:46:20 -04:00
|
|
|
stage('unit-validate') {
|
2019-08-02 11:34:38 -04:00
|
|
|
when {
|
|
|
|
beforeAgent true
|
2019-08-03 10:46:20 -04:00
|
|
|
expression { params.unit_validate }
|
2019-08-02 11:34:38 -04:00
|
|
|
}
|
|
|
|
agent { label 'amd64 && ubuntu-1804 && overlay2' }
|
2019-01-10 15:08:10 -05:00
|
|
|
|
2019-08-02 12:37:58 -04:00
|
|
|
stages {
|
2019-08-02 14:20:22 -04:00
|
|
|
stage("Print info") {
|
|
|
|
steps {
|
|
|
|
sh 'docker version'
|
|
|
|
sh 'docker info'
|
2019-08-03 10:58:46 -04:00
|
|
|
sh '''
|
|
|
|
echo "check-config.sh version: ${CHECK_CONFIG_COMMIT}"
|
|
|
|
curl -fsSL -o ${WORKSPACE}/check-config.sh "https://raw.githubusercontent.com/moby/moby/${CHECK_CONFIG_COMMIT}/contrib/check-config.sh" \
|
|
|
|
&& bash ${WORKSPACE}/check-config.sh || true
|
|
|
|
'''
|
2019-08-02 14:20:22 -04:00
|
|
|
}
|
|
|
|
}
|
2019-08-02 12:37:58 -04:00
|
|
|
stage("Build dev image") {
|
|
|
|
steps {
|
2019-08-03 10:50:49 -04:00
|
|
|
sh 'docker build --force-rm --build-arg APT_MIRROR -t docker:${GIT_COMMIT} .'
|
2019-08-02 12:37:58 -04:00
|
|
|
}
|
|
|
|
}
|
2019-08-03 13:41:00 -04:00
|
|
|
stage("Validate") {
|
|
|
|
steps {
|
|
|
|
sh '''
|
|
|
|
docker run --rm -t --privileged \
|
|
|
|
-v "$WORKSPACE/bundles:/go/src/github.com/docker/docker/bundles" \
|
|
|
|
-v "$WORKSPACE/.git:/go/src/github.com/docker/docker/.git" \
|
|
|
|
--name docker-pr$BUILD_NUMBER \
|
2019-08-09 12:12:29 -04:00
|
|
|
-e DOCKER_EXPERIMENTAL \
|
2019-08-03 13:41:00 -04:00
|
|
|
-e DOCKER_GITCOMMIT=${GIT_COMMIT} \
|
|
|
|
-e DOCKER_GRAPHDRIVER \
|
|
|
|
docker:${GIT_COMMIT} \
|
|
|
|
hack/validate/default
|
|
|
|
'''
|
|
|
|
}
|
|
|
|
}
|
2019-08-03 14:13:17 -04:00
|
|
|
stage("Docker-py") {
|
|
|
|
steps {
|
|
|
|
sh '''
|
|
|
|
docker run --rm -t --privileged \
|
|
|
|
-v "$WORKSPACE/bundles:/go/src/github.com/docker/docker/bundles" \
|
|
|
|
--name docker-pr$BUILD_NUMBER \
|
2019-08-09 12:12:29 -04:00
|
|
|
-e DOCKER_EXPERIMENTAL \
|
2019-08-03 14:13:17 -04:00
|
|
|
-e DOCKER_GITCOMMIT=${GIT_COMMIT} \
|
|
|
|
-e DOCKER_GRAPHDRIVER \
|
|
|
|
docker:${GIT_COMMIT} \
|
|
|
|
hack/make.sh \
|
2019-08-10 16:56:04 -04:00
|
|
|
dynbinary-daemon \
|
2019-08-03 14:13:17 -04:00
|
|
|
test-docker-py
|
|
|
|
'''
|
|
|
|
}
|
2019-08-10 16:41:18 -04:00
|
|
|
post {
|
|
|
|
always {
|
|
|
|
junit testResults: 'bundles/test-docker-py/junit-report.xml', allowEmptyResults: true
|
2019-08-10 16:58:17 -04:00
|
|
|
|
|
|
|
sh '''
|
|
|
|
echo "Ensuring container killed."
|
|
|
|
docker rm -vf docker-pr$BUILD_NUMBER || true
|
|
|
|
'''
|
|
|
|
|
|
|
|
sh '''
|
|
|
|
echo 'Chowning /workspace to jenkins user'
|
|
|
|
docker run --rm -v "$WORKSPACE:/workspace" busybox chown -R "$(id -u):$(id -g)" /workspace
|
|
|
|
'''
|
|
|
|
|
2019-08-24 08:14:56 -04:00
|
|
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE', message: 'Failed to create bundles.tar.gz') {
|
|
|
|
sh '''
|
|
|
|
bundleName=docker-py
|
|
|
|
echo "Creating ${bundleName}-bundles.tar.gz"
|
|
|
|
tar -czf ${bundleName}-bundles.tar.gz bundles/test-docker-py/*.xml bundles/test-docker-py/*.log
|
|
|
|
'''
|
|
|
|
|
|
|
|
archiveArtifacts artifacts: '*-bundles.tar.gz', allowEmptyArchive: true
|
|
|
|
}
|
2019-08-10 16:41:18 -04:00
|
|
|
}
|
|
|
|
}
|
2019-08-03 14:13:17 -04:00
|
|
|
}
|
2019-08-07 13:57:52 -04:00
|
|
|
stage("Static") {
|
2019-08-05 16:47:08 -04:00
|
|
|
steps {
|
|
|
|
sh '''
|
|
|
|
docker run --rm -t --privileged \
|
|
|
|
-v "$WORKSPACE/bundles:/go/src/github.com/docker/docker/bundles" \
|
|
|
|
--name docker-pr$BUILD_NUMBER \
|
|
|
|
-e DOCKER_GITCOMMIT=${GIT_COMMIT} \
|
|
|
|
-e DOCKER_GRAPHDRIVER \
|
|
|
|
docker:${GIT_COMMIT} \
|
|
|
|
hack/make.sh binary-daemon
|
|
|
|
'''
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage("Cross") {
|
|
|
|
steps {
|
|
|
|
sh '''
|
|
|
|
docker run --rm -t --privileged \
|
|
|
|
-v "$WORKSPACE/bundles:/go/src/github.com/docker/docker/bundles" \
|
|
|
|
--name docker-pr$BUILD_NUMBER \
|
|
|
|
-e DOCKER_GITCOMMIT=${GIT_COMMIT} \
|
|
|
|
-e DOCKER_GRAPHDRIVER \
|
|
|
|
docker:${GIT_COMMIT} \
|
|
|
|
hack/make.sh cross
|
|
|
|
'''
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// needs to be last stage that calls make.sh for the junit report to work
|
2019-08-03 10:46:20 -04:00
|
|
|
stage("Unit tests") {
|
2019-08-02 12:37:58 -04:00
|
|
|
steps {
|
|
|
|
sh '''
|
|
|
|
docker run --rm -t --privileged \
|
|
|
|
-v "$WORKSPACE/bundles:/go/src/github.com/docker/docker/bundles" \
|
|
|
|
--name docker-pr$BUILD_NUMBER \
|
2019-08-09 12:12:29 -04:00
|
|
|
-e DOCKER_EXPERIMENTAL \
|
2019-08-03 10:13:39 -04:00
|
|
|
-e DOCKER_GITCOMMIT=${GIT_COMMIT} \
|
2019-08-03 11:10:51 -04:00
|
|
|
-e DOCKER_GRAPHDRIVER \
|
2019-08-03 10:13:39 -04:00
|
|
|
docker:${GIT_COMMIT} \
|
2019-08-02 12:37:58 -04:00
|
|
|
hack/test/unit
|
|
|
|
'''
|
|
|
|
}
|
2019-08-11 09:12:59 -04:00
|
|
|
post {
|
|
|
|
always {
|
|
|
|
junit testResults: 'bundles/junit-report.xml', allowEmptyResults: true
|
|
|
|
}
|
|
|
|
}
|
2019-08-02 12:37:58 -04:00
|
|
|
}
|
2019-08-03 10:46:20 -04:00
|
|
|
stage("Validate vendor") {
|
|
|
|
steps {
|
|
|
|
sh '''
|
|
|
|
docker run --rm -t --privileged \
|
|
|
|
-v "$WORKSPACE/.git:/go/src/github.com/docker/docker/.git" \
|
2019-08-03 14:05:12 -04:00
|
|
|
--name docker-pr$BUILD_NUMBER \
|
2019-08-09 12:12:29 -04:00
|
|
|
-e DOCKER_EXPERIMENTAL \
|
2019-08-03 10:46:20 -04:00
|
|
|
-e DOCKER_GITCOMMIT=${GIT_COMMIT} \
|
2019-08-03 11:10:51 -04:00
|
|
|
-e DOCKER_GRAPHDRIVER \
|
2019-08-03 10:46:20 -04:00
|
|
|
docker:${GIT_COMMIT} \
|
|
|
|
hack/validate/vendor
|
|
|
|
'''
|
|
|
|
}
|
|
|
|
}
|
2019-08-03 11:24:31 -04:00
|
|
|
stage("Build e2e image") {
|
|
|
|
steps {
|
|
|
|
sh '''
|
|
|
|
echo "Building e2e image"
|
|
|
|
docker build --build-arg DOCKER_GITCOMMIT=${GIT_COMMIT} -t moby-e2e-test -f Dockerfile.e2e .
|
|
|
|
'''
|
|
|
|
}
|
|
|
|
}
|
2019-08-02 11:34:38 -04:00
|
|
|
}
|
2019-08-02 12:37:58 -04:00
|
|
|
|
2019-08-02 11:34:38 -04:00
|
|
|
post {
|
|
|
|
always {
|
|
|
|
sh '''
|
|
|
|
echo 'Ensuring container killed.'
|
|
|
|
docker rm -vf docker-pr$BUILD_NUMBER || true
|
2019-08-02 12:51:51 -04:00
|
|
|
'''
|
|
|
|
|
|
|
|
sh '''
|
2019-08-02 11:34:38 -04:00
|
|
|
echo 'Chowning /workspace to jenkins user'
|
|
|
|
docker run --rm -v "$WORKSPACE:/workspace" busybox chown -R "$(id -u):$(id -g)" /workspace
|
2019-08-02 12:37:58 -04:00
|
|
|
'''
|
|
|
|
|
2019-08-24 08:14:56 -04:00
|
|
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE', message: 'Failed to create bundles.tar.gz') {
|
|
|
|
sh '''
|
|
|
|
bundleName=unit
|
|
|
|
echo "Creating ${bundleName}-bundles.tar.gz"
|
|
|
|
tar -czvf ${bundleName}-bundles.tar.gz bundles/junit-report.xml bundles/go-test-report.json bundles/profile.out
|
|
|
|
'''
|
2019-08-02 12:41:50 -04:00
|
|
|
|
2019-08-24 08:14:56 -04:00
|
|
|
archiveArtifacts artifacts: '*-bundles.tar.gz', allowEmptyArchive: true
|
|
|
|
}
|
2019-08-02 12:41:50 -04:00
|
|
|
}
|
|
|
|
cleanup {
|
|
|
|
sh 'make clean'
|
2019-08-02 11:34:38 -04:00
|
|
|
deleteDir()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-09-10 03:46:19 -04:00
|
|
|
stage('amd64') {
|
2019-08-02 11:34:38 -04:00
|
|
|
when {
|
|
|
|
beforeAgent true
|
2019-09-10 03:46:19 -04:00
|
|
|
expression { params.amd64 }
|
2019-08-02 11:34:38 -04:00
|
|
|
}
|
|
|
|
agent { label 'amd64 && ubuntu-1804 && overlay2' }
|
2019-01-10 15:08:10 -05:00
|
|
|
|
2019-08-02 12:37:58 -04:00
|
|
|
stages {
|
2019-08-02 14:20:22 -04:00
|
|
|
stage("Print info") {
|
|
|
|
steps {
|
|
|
|
sh 'docker version'
|
|
|
|
sh 'docker info'
|
2019-08-03 10:58:46 -04:00
|
|
|
sh '''
|
|
|
|
echo "check-config.sh version: ${CHECK_CONFIG_COMMIT}"
|
|
|
|
curl -fsSL -o ${WORKSPACE}/check-config.sh "https://raw.githubusercontent.com/moby/moby/${CHECK_CONFIG_COMMIT}/contrib/check-config.sh" \
|
|
|
|
&& bash ${WORKSPACE}/check-config.sh || true
|
|
|
|
'''
|
2019-08-02 14:20:22 -04:00
|
|
|
}
|
|
|
|
}
|
2019-08-02 12:37:58 -04:00
|
|
|
stage("Build dev image") {
|
|
|
|
steps {
|
|
|
|
sh '''
|
|
|
|
# todo: include ip_vs in base image
|
|
|
|
sudo modprobe ip_vs
|
|
|
|
|
2019-08-03 10:13:39 -04:00
|
|
|
docker build --force-rm --build-arg APT_MIRROR -t docker:${GIT_COMMIT} .
|
2019-08-02 12:37:58 -04:00
|
|
|
'''
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage("Run tests") {
|
|
|
|
steps {
|
2019-08-07 13:57:52 -04:00
|
|
|
sh '''#!/bin/bash
|
|
|
|
# bash is needed so 'jobs -p' works properly
|
|
|
|
# it also accepts setting inline envvars for functions without explicitly exporting
|
|
|
|
|
|
|
|
run_tests() {
|
|
|
|
[ -n "$TESTDEBUG" ] && rm= || rm=--rm;
|
|
|
|
docker run $rm -t --privileged \
|
2019-08-23 18:24:03 -04:00
|
|
|
-v "$WORKSPACE/bundles/${TEST_INTEGRATION_DEST}:/go/src/github.com/docker/docker/bundles" \
|
|
|
|
-v "$WORKSPACE/bundles/dynbinary-daemon:/go/src/github.com/docker/docker/bundles/dynbinary-daemon" \
|
2019-08-07 13:57:52 -04:00
|
|
|
-v "$WORKSPACE/.git:/go/src/github.com/docker/docker/.git" \
|
|
|
|
--name "$CONTAINER_NAME" \
|
|
|
|
-e KEEPBUNDLE=1 \
|
|
|
|
-e TESTDEBUG \
|
|
|
|
-e TESTFLAGS \
|
|
|
|
-e TEST_SKIP_INTEGRATION \
|
|
|
|
-e TEST_SKIP_INTEGRATION_CLI \
|
|
|
|
-e DOCKER_GITCOMMIT=${GIT_COMMIT} \
|
|
|
|
-e DOCKER_GRAPHDRIVER \
|
2019-08-08 22:08:21 -04:00
|
|
|
-e TIMEOUT \
|
2019-08-07 13:57:52 -04:00
|
|
|
docker:${GIT_COMMIT} \
|
|
|
|
hack/make.sh \
|
|
|
|
"$1" \
|
|
|
|
test-integration
|
|
|
|
}
|
|
|
|
|
|
|
|
trap "exit" INT TERM
|
|
|
|
trap 'pids=$(jobs -p); echo "Remaining pids to kill: [$pids]"; [ -z "$pids" ] || kill $pids' EXIT
|
|
|
|
|
|
|
|
CONTAINER_NAME=docker-pr$BUILD_NUMBER
|
|
|
|
|
2019-08-02 12:37:58 -04:00
|
|
|
docker run --rm -t --privileged \
|
|
|
|
-v "$WORKSPACE/bundles:/go/src/github.com/docker/docker/bundles" \
|
|
|
|
-v "$WORKSPACE/.git:/go/src/github.com/docker/docker/.git" \
|
2019-08-07 13:57:52 -04:00
|
|
|
--name ${CONTAINER_NAME}-build \
|
2019-08-09 12:12:29 -04:00
|
|
|
-e DOCKER_EXPERIMENTAL \
|
2019-08-03 10:13:39 -04:00
|
|
|
-e DOCKER_GITCOMMIT=${GIT_COMMIT} \
|
2019-08-03 11:10:51 -04:00
|
|
|
-e DOCKER_GRAPHDRIVER \
|
2019-08-03 10:13:39 -04:00
|
|
|
docker:${GIT_COMMIT} \
|
2019-08-03 13:41:00 -04:00
|
|
|
hack/make.sh \
|
2019-08-07 13:57:52 -04:00
|
|
|
dynbinary-daemon
|
|
|
|
|
|
|
|
# flaky + integration
|
|
|
|
TEST_INTEGRATION_DEST=1 CONTAINER_NAME=${CONTAINER_NAME}-1 TEST_SKIP_INTEGRATION_CLI=1 run_tests test-integration-flaky &
|
|
|
|
|
|
|
|
# integration-cli first set
|
2019-09-12 14:05:18 -04:00
|
|
|
TEST_INTEGRATION_DEST=2 CONTAINER_NAME=${CONTAINER_NAME}-2 TEST_SKIP_INTEGRATION=1 TESTFLAGS="-test.run Test(DockerSuite|DockerNetworkSuite|DockerHubPullSuite|DockerRegistrySuite|DockerSchema1RegistrySuite|DockerRegistryAuthTokenSuite|DockerRegistryAuthHtpasswdSuite)/" run_tests &
|
2019-08-07 13:57:52 -04:00
|
|
|
|
|
|
|
# integration-cli second set
|
2019-09-12 14:05:18 -04:00
|
|
|
TEST_INTEGRATION_DEST=3 CONTAINER_NAME=${CONTAINER_NAME}-3 TEST_SKIP_INTEGRATION=1 TESTFLAGS="-test.run Test(DockerSwarmSuite|DockerDaemonSuite|DockerExternalVolumeSuite)/" run_tests &
|
2019-08-07 13:57:52 -04:00
|
|
|
|
|
|
|
set +x
|
|
|
|
c=0
|
|
|
|
for job in $(jobs -p); do
|
|
|
|
wait ${job} || c=$?
|
|
|
|
done
|
|
|
|
exit $c
|
2019-08-02 12:37:58 -04:00
|
|
|
'''
|
|
|
|
}
|
2019-08-11 14:32:49 -04:00
|
|
|
post {
|
|
|
|
always {
|
|
|
|
junit testResults: 'bundles/**/*-report.xml', allowEmptyResults: true
|
|
|
|
}
|
|
|
|
}
|
2019-08-02 12:37:58 -04:00
|
|
|
}
|
2019-08-02 11:34:38 -04:00
|
|
|
}
|
2019-08-02 12:37:58 -04:00
|
|
|
|
2019-08-02 11:34:38 -04:00
|
|
|
post {
|
|
|
|
always {
|
|
|
|
sh '''
|
|
|
|
echo "Ensuring container killed."
|
|
|
|
docker rm -vf docker-pr$BUILD_NUMBER || true
|
2019-08-02 12:51:51 -04:00
|
|
|
'''
|
|
|
|
|
|
|
|
sh '''
|
2019-08-02 11:34:38 -04:00
|
|
|
echo "Chowning /workspace to jenkins user"
|
|
|
|
docker run --rm -v "$WORKSPACE:/workspace" busybox chown -R "$(id -u):$(id -g)" /workspace
|
|
|
|
'''
|
2019-08-02 12:37:58 -04:00
|
|
|
|
2019-08-24 08:14:56 -04:00
|
|
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE', message: 'Failed to create bundles.tar.gz') {
|
|
|
|
sh '''
|
2019-09-10 03:46:19 -04:00
|
|
|
bundleName=amd64
|
2019-08-24 08:14:56 -04:00
|
|
|
echo "Creating ${bundleName}-bundles.tar.gz"
|
|
|
|
# exclude overlay2 directories
|
2019-08-11 14:32:49 -04:00
|
|
|
find bundles -path '*/root/*overlay2' -prune -o -type f \\( -name '*-report.json' -o -name '*.log' -o -name '*.prof' -o -name '*-report.xml' \\) -print | xargs tar -czf ${bundleName}-bundles.tar.gz
|
2019-08-24 08:14:56 -04:00
|
|
|
'''
|
2019-08-02 12:41:50 -04:00
|
|
|
|
2019-08-24 08:14:56 -04:00
|
|
|
archiveArtifacts artifacts: '*-bundles.tar.gz', allowEmptyArchive: true
|
|
|
|
}
|
2019-08-02 12:41:50 -04:00
|
|
|
}
|
|
|
|
cleanup {
|
|
|
|
sh 'make clean'
|
2019-08-02 11:34:38 -04:00
|
|
|
deleteDir()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-09-10 03:46:19 -04:00
|
|
|
stage('s390x') {
|
2019-08-02 11:34:38 -04:00
|
|
|
when {
|
|
|
|
beforeAgent true
|
2019-09-10 03:46:19 -04:00
|
|
|
expression { params.s390x }
|
2019-08-02 11:34:38 -04:00
|
|
|
}
|
|
|
|
agent { label 's390x-ubuntu-1604' }
|
2019-08-02 14:31:38 -04:00
|
|
|
// s390x machines run on Docker 18.06, and buildkit has some bugs on that version
|
|
|
|
environment { DOCKER_BUILDKIT = '0' }
|
2019-08-02 12:37:58 -04:00
|
|
|
|
|
|
|
stages {
|
2019-08-02 14:20:22 -04:00
|
|
|
stage("Print info") {
|
|
|
|
steps {
|
|
|
|
sh 'docker version'
|
|
|
|
sh 'docker info'
|
2019-08-03 10:58:46 -04:00
|
|
|
sh '''
|
|
|
|
echo "check-config.sh version: ${CHECK_CONFIG_COMMIT}"
|
|
|
|
curl -fsSL -o ${WORKSPACE}/check-config.sh "https://raw.githubusercontent.com/moby/moby/${CHECK_CONFIG_COMMIT}/contrib/check-config.sh" \
|
|
|
|
&& bash ${WORKSPACE}/check-config.sh || true
|
|
|
|
'''
|
2019-08-02 14:20:22 -04:00
|
|
|
}
|
|
|
|
}
|
2019-08-02 12:37:58 -04:00
|
|
|
stage("Build dev image") {
|
|
|
|
steps {
|
|
|
|
sh '''
|
2019-09-13 18:54:52 -04:00
|
|
|
docker build --force-rm --build-arg APT_MIRROR -t docker:${GIT_COMMIT} .
|
2019-08-02 12:37:58 -04:00
|
|
|
'''
|
|
|
|
}
|
|
|
|
}
|
2019-08-03 13:57:50 -04:00
|
|
|
stage("Unit tests") {
|
|
|
|
steps {
|
|
|
|
sh '''
|
|
|
|
docker run --rm -t --privileged \
|
|
|
|
-v "$WORKSPACE/bundles:/go/src/github.com/docker/docker/bundles" \
|
|
|
|
--name docker-pr$BUILD_NUMBER \
|
2019-08-09 12:12:29 -04:00
|
|
|
-e DOCKER_EXPERIMENTAL \
|
2019-08-03 13:57:50 -04:00
|
|
|
-e DOCKER_GITCOMMIT=${GIT_COMMIT} \
|
|
|
|
-e DOCKER_GRAPHDRIVER \
|
|
|
|
docker:${GIT_COMMIT} \
|
|
|
|
hack/test/unit
|
|
|
|
'''
|
|
|
|
}
|
2019-08-11 09:15:55 -04:00
|
|
|
post {
|
|
|
|
always {
|
|
|
|
junit testResults: 'bundles/junit-report.xml', allowEmptyResults: true
|
|
|
|
}
|
|
|
|
}
|
2019-08-03 13:57:50 -04:00
|
|
|
}
|
|
|
|
stage("Integration tests") {
|
2019-08-09 19:02:43 -04:00
|
|
|
environment { TEST_SKIP_INTEGRATION_CLI = '1' }
|
2019-08-02 12:37:58 -04:00
|
|
|
steps {
|
|
|
|
sh '''
|
|
|
|
docker run --rm -t --privileged \
|
|
|
|
-v "$WORKSPACE/bundles:/go/src/github.com/docker/docker/bundles" \
|
2019-08-03 13:08:06 -04:00
|
|
|
--name docker-pr$BUILD_NUMBER \
|
2019-08-09 12:12:29 -04:00
|
|
|
-e DOCKER_EXPERIMENTAL \
|
2019-08-03 13:08:06 -04:00
|
|
|
-e DOCKER_GITCOMMIT=${GIT_COMMIT} \
|
|
|
|
-e DOCKER_GRAPHDRIVER \
|
2019-08-23 15:46:55 -04:00
|
|
|
-e TESTDEBUG \
|
2019-08-09 19:02:43 -04:00
|
|
|
-e TEST_SKIP_INTEGRATION_CLI \
|
2019-08-08 22:08:21 -04:00
|
|
|
-e TIMEOUT \
|
2019-08-03 13:08:06 -04:00
|
|
|
docker:${GIT_COMMIT} \
|
2019-08-03 13:57:50 -04:00
|
|
|
hack/make.sh \
|
|
|
|
dynbinary \
|
|
|
|
test-integration
|
2019-08-02 12:37:58 -04:00
|
|
|
'''
|
|
|
|
}
|
2019-08-11 14:32:49 -04:00
|
|
|
post {
|
|
|
|
always {
|
|
|
|
junit testResults: 'bundles/**/*-report.xml', allowEmptyResults: true
|
|
|
|
}
|
|
|
|
}
|
2019-08-02 12:37:58 -04:00
|
|
|
}
|
2019-08-02 11:34:38 -04:00
|
|
|
}
|
2019-08-02 12:37:58 -04:00
|
|
|
|
2019-08-02 11:34:38 -04:00
|
|
|
post {
|
|
|
|
always {
|
|
|
|
sh '''
|
|
|
|
echo "Ensuring container killed."
|
2019-08-03 14:05:12 -04:00
|
|
|
docker rm -vf docker-pr$BUILD_NUMBER || true
|
2019-08-02 12:51:51 -04:00
|
|
|
'''
|
|
|
|
|
|
|
|
sh '''
|
2019-08-02 11:34:38 -04:00
|
|
|
echo "Chowning /workspace to jenkins user"
|
2019-08-02 12:49:33 -04:00
|
|
|
docker run --rm -v "$WORKSPACE:/workspace" busybox chown -R "$(id -u):$(id -g)" /workspace
|
2019-08-02 11:34:38 -04:00
|
|
|
'''
|
2019-08-02 12:37:58 -04:00
|
|
|
|
2019-08-24 08:14:56 -04:00
|
|
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE', message: 'Failed to create bundles.tar.gz') {
|
|
|
|
sh '''
|
|
|
|
bundleName=s390x-integration
|
|
|
|
echo "Creating ${bundleName}-bundles.tar.gz"
|
|
|
|
# exclude overlay2 directories
|
2019-08-11 14:32:49 -04:00
|
|
|
find bundles -path '*/root/*overlay2' -prune -o -type f \\( -name '*-report.json' -o -name '*.log' -o -name '*.prof' -o -name '*-report.xml' \\) -print | xargs tar -czf ${bundleName}-bundles.tar.gz
|
2019-08-24 08:14:56 -04:00
|
|
|
'''
|
2019-08-02 12:41:50 -04:00
|
|
|
|
2019-08-24 08:14:56 -04:00
|
|
|
archiveArtifacts artifacts: '*-bundles.tar.gz', allowEmptyArchive: true
|
|
|
|
}
|
2019-08-02 12:41:50 -04:00
|
|
|
}
|
|
|
|
cleanup {
|
|
|
|
sh 'make clean'
|
2019-08-02 11:34:38 -04:00
|
|
|
deleteDir()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-09-10 03:46:19 -04:00
|
|
|
stage('s390x integration-cli') {
|
2019-08-08 22:00:57 -04:00
|
|
|
when {
|
|
|
|
beforeAgent true
|
2019-09-12 19:50:33 -04:00
|
|
|
not { changeRequest() }
|
2019-09-10 03:46:19 -04:00
|
|
|
expression { params.s390x }
|
2019-08-08 22:00:57 -04:00
|
|
|
}
|
|
|
|
agent { label 's390x-ubuntu-1604' }
|
|
|
|
// s390x machines run on Docker 18.06, and buildkit has some bugs on that version
|
|
|
|
environment { DOCKER_BUILDKIT = '0' }
|
|
|
|
|
|
|
|
stages {
|
|
|
|
stage("Print info") {
|
|
|
|
steps {
|
|
|
|
sh 'docker version'
|
|
|
|
sh 'docker info'
|
|
|
|
sh '''
|
|
|
|
echo "check-config.sh version: ${CHECK_CONFIG_COMMIT}"
|
|
|
|
curl -fsSL -o ${WORKSPACE}/check-config.sh "https://raw.githubusercontent.com/moby/moby/${CHECK_CONFIG_COMMIT}/contrib/check-config.sh" \
|
|
|
|
&& bash ${WORKSPACE}/check-config.sh || true
|
|
|
|
'''
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage("Build dev image") {
|
|
|
|
steps {
|
|
|
|
sh '''
|
2019-09-13 18:54:52 -04:00
|
|
|
docker build --force-rm --build-arg APT_MIRROR -t docker:${GIT_COMMIT} .
|
2019-08-08 22:00:57 -04:00
|
|
|
'''
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage("Integration-cli tests") {
|
2019-08-09 19:02:43 -04:00
|
|
|
environment { TEST_SKIP_INTEGRATION = '1' }
|
2019-08-08 22:00:57 -04:00
|
|
|
steps {
|
|
|
|
sh '''
|
|
|
|
docker run --rm -t --privileged \
|
|
|
|
-v "$WORKSPACE/bundles:/go/src/github.com/docker/docker/bundles" \
|
|
|
|
--name docker-pr$BUILD_NUMBER \
|
|
|
|
-e DOCKER_GITCOMMIT=${GIT_COMMIT} \
|
|
|
|
-e DOCKER_GRAPHDRIVER \
|
2019-08-09 19:02:43 -04:00
|
|
|
-e TEST_SKIP_INTEGRATION \
|
2019-08-08 22:08:21 -04:00
|
|
|
-e TIMEOUT \
|
2019-08-08 22:00:57 -04:00
|
|
|
docker:${GIT_COMMIT} \
|
|
|
|
hack/make.sh \
|
|
|
|
dynbinary \
|
|
|
|
test-integration
|
|
|
|
'''
|
|
|
|
}
|
2019-08-11 14:32:49 -04:00
|
|
|
post {
|
|
|
|
always {
|
|
|
|
junit testResults: 'bundles/**/*-report.xml', allowEmptyResults: true
|
|
|
|
}
|
|
|
|
}
|
2019-08-08 22:00:57 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
post {
|
|
|
|
always {
|
|
|
|
sh '''
|
|
|
|
echo "Ensuring container killed."
|
|
|
|
docker rm -vf docker-pr$BUILD_NUMBER || true
|
|
|
|
'''
|
|
|
|
|
|
|
|
sh '''
|
|
|
|
echo "Chowning /workspace to jenkins user"
|
|
|
|
docker run --rm -v "$WORKSPACE:/workspace" busybox chown -R "$(id -u):$(id -g)" /workspace
|
|
|
|
'''
|
|
|
|
|
2019-08-24 08:14:56 -04:00
|
|
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE', message: 'Failed to create bundles.tar.gz') {
|
|
|
|
sh '''
|
|
|
|
bundleName=s390x-integration-cli
|
|
|
|
echo "Creating ${bundleName}-bundles.tar.gz"
|
|
|
|
# exclude overlay2 directories
|
2019-08-11 14:32:49 -04:00
|
|
|
find bundles -path '*/root/*overlay2' -prune -o -type f \\( -name '*-report.json' -o -name '*.log' -o -name '*.prof' -o -name '*-report.xml' \\) -print | xargs tar -czf ${bundleName}-bundles.tar.gz
|
2019-08-24 08:14:56 -04:00
|
|
|
'''
|
2019-08-08 22:00:57 -04:00
|
|
|
|
2019-08-24 08:14:56 -04:00
|
|
|
archiveArtifacts artifacts: '*-bundles.tar.gz', allowEmptyArchive: true
|
|
|
|
}
|
2019-08-08 22:00:57 -04:00
|
|
|
}
|
|
|
|
cleanup {
|
|
|
|
sh 'make clean'
|
|
|
|
deleteDir()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-09-10 03:46:19 -04:00
|
|
|
stage('ppc64le') {
|
2019-08-02 11:34:38 -04:00
|
|
|
when {
|
|
|
|
beforeAgent true
|
2019-09-10 03:46:19 -04:00
|
|
|
expression { params.ppc64le }
|
2019-08-02 11:34:38 -04:00
|
|
|
}
|
|
|
|
agent { label 'ppc64le-ubuntu-1604' }
|
2019-09-10 03:46:19 -04:00
|
|
|
// ppc64le machines run on Docker 18.06, and buildkit has some bugs on that version
|
2019-08-02 14:31:38 -04:00
|
|
|
environment { DOCKER_BUILDKIT = '0' }
|
2019-08-02 12:37:58 -04:00
|
|
|
|
|
|
|
stages {
|
2019-08-02 14:20:22 -04:00
|
|
|
stage("Print info") {
|
|
|
|
steps {
|
|
|
|
sh 'docker version'
|
|
|
|
sh 'docker info'
|
2019-08-03 10:58:46 -04:00
|
|
|
sh '''
|
|
|
|
echo "check-config.sh version: ${CHECK_CONFIG_COMMIT}"
|
|
|
|
curl -fsSL -o ${WORKSPACE}/check-config.sh "https://raw.githubusercontent.com/moby/moby/${CHECK_CONFIG_COMMIT}/contrib/check-config.sh" \
|
|
|
|
&& bash ${WORKSPACE}/check-config.sh || true
|
|
|
|
'''
|
2019-08-02 14:20:22 -04:00
|
|
|
}
|
|
|
|
}
|
2019-08-02 12:37:58 -04:00
|
|
|
stage("Build dev image") {
|
|
|
|
steps {
|
2019-09-13 18:54:52 -04:00
|
|
|
sh 'docker build --force-rm --build-arg APT_MIRROR -t docker:${GIT_COMMIT} .'
|
2019-08-02 12:37:58 -04:00
|
|
|
}
|
|
|
|
}
|
2019-08-03 13:57:50 -04:00
|
|
|
stage("Unit tests") {
|
|
|
|
steps {
|
|
|
|
sh '''
|
|
|
|
docker run --rm -t --privileged \
|
|
|
|
-v "$WORKSPACE/bundles:/go/src/github.com/docker/docker/bundles" \
|
|
|
|
--name docker-pr$BUILD_NUMBER \
|
2019-08-09 12:12:29 -04:00
|
|
|
-e DOCKER_EXPERIMENTAL \
|
2019-08-03 13:57:50 -04:00
|
|
|
-e DOCKER_GITCOMMIT=${GIT_COMMIT} \
|
|
|
|
-e DOCKER_GRAPHDRIVER \
|
|
|
|
docker:${GIT_COMMIT} \
|
|
|
|
hack/test/unit
|
|
|
|
'''
|
|
|
|
}
|
2019-08-11 09:15:55 -04:00
|
|
|
post {
|
|
|
|
always {
|
|
|
|
junit testResults: 'bundles/junit-report.xml', allowEmptyResults: true
|
|
|
|
}
|
|
|
|
}
|
2019-08-03 13:57:50 -04:00
|
|
|
}
|
|
|
|
stage("Integration tests") {
|
2019-08-09 19:00:20 -04:00
|
|
|
environment { TEST_SKIP_INTEGRATION_CLI = '1' }
|
2019-08-02 12:37:58 -04:00
|
|
|
steps {
|
|
|
|
sh '''
|
|
|
|
docker run --rm -t --privileged \
|
|
|
|
-v "$WORKSPACE/bundles:/go/src/github.com/docker/docker/bundles" \
|
2019-08-03 13:08:06 -04:00
|
|
|
--name docker-pr$BUILD_NUMBER \
|
2019-08-09 12:12:29 -04:00
|
|
|
-e DOCKER_EXPERIMENTAL \
|
2019-08-03 13:08:06 -04:00
|
|
|
-e DOCKER_GITCOMMIT=${GIT_COMMIT} \
|
|
|
|
-e DOCKER_GRAPHDRIVER \
|
2019-08-23 15:46:55 -04:00
|
|
|
-e TESTDEBUG \
|
2019-08-09 19:00:20 -04:00
|
|
|
-e TEST_SKIP_INTEGRATION_CLI \
|
2019-08-08 22:08:21 -04:00
|
|
|
-e TIMEOUT \
|
2019-08-03 13:08:06 -04:00
|
|
|
docker:${GIT_COMMIT} \
|
2019-08-03 13:57:50 -04:00
|
|
|
hack/make.sh \
|
|
|
|
dynbinary \
|
|
|
|
test-integration
|
2019-08-02 12:37:58 -04:00
|
|
|
'''
|
|
|
|
}
|
2019-08-11 14:32:49 -04:00
|
|
|
post {
|
|
|
|
always {
|
|
|
|
junit testResults: 'bundles/**/*-report.xml', allowEmptyResults: true
|
|
|
|
}
|
|
|
|
}
|
2019-08-02 12:37:58 -04:00
|
|
|
}
|
2019-08-02 11:34:38 -04:00
|
|
|
}
|
2019-08-02 12:37:58 -04:00
|
|
|
|
2019-08-02 11:34:38 -04:00
|
|
|
post {
|
|
|
|
always {
|
|
|
|
sh '''
|
|
|
|
echo "Ensuring container killed."
|
2019-08-02 12:47:23 -04:00
|
|
|
docker rm -vf docker-pr$BUILD_NUMBER || true
|
2019-08-02 12:51:51 -04:00
|
|
|
'''
|
|
|
|
|
|
|
|
sh '''
|
2019-08-02 11:34:38 -04:00
|
|
|
echo "Chowning /workspace to jenkins user"
|
2019-08-02 12:49:33 -04:00
|
|
|
docker run --rm -v "$WORKSPACE:/workspace" busybox chown -R "$(id -u):$(id -g)" /workspace
|
2019-08-02 11:34:38 -04:00
|
|
|
'''
|
2019-08-02 12:37:58 -04:00
|
|
|
|
2019-08-24 08:14:56 -04:00
|
|
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE', message: 'Failed to create bundles.tar.gz') {
|
|
|
|
sh '''
|
2019-09-10 03:46:19 -04:00
|
|
|
bundleName=ppc64le-integration
|
2019-08-24 08:14:56 -04:00
|
|
|
echo "Creating ${bundleName}-bundles.tar.gz"
|
|
|
|
# exclude overlay2 directories
|
2019-08-11 14:32:49 -04:00
|
|
|
find bundles -path '*/root/*overlay2' -prune -o -type f \\( -name '*-report.json' -o -name '*.log' -o -name '*.prof' -o -name '*-report.xml' \\) -print | xargs tar -czf ${bundleName}-bundles.tar.gz
|
2019-08-24 08:14:56 -04:00
|
|
|
'''
|
2019-08-02 12:41:50 -04:00
|
|
|
|
2019-08-24 08:14:56 -04:00
|
|
|
archiveArtifacts artifacts: '*-bundles.tar.gz', allowEmptyArchive: true
|
|
|
|
}
|
2019-08-02 12:41:50 -04:00
|
|
|
}
|
|
|
|
cleanup {
|
|
|
|
sh 'make clean'
|
2019-08-02 11:34:38 -04:00
|
|
|
deleteDir()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-09-10 03:46:19 -04:00
|
|
|
stage('ppc64le integration-cli') {
|
2019-08-08 21:52:03 -04:00
|
|
|
when {
|
|
|
|
beforeAgent true
|
2019-09-12 19:50:33 -04:00
|
|
|
not { changeRequest() }
|
2019-09-10 03:46:19 -04:00
|
|
|
expression { params.ppc64le }
|
2019-08-08 21:52:03 -04:00
|
|
|
}
|
|
|
|
agent { label 'ppc64le-ubuntu-1604' }
|
2019-09-10 03:46:19 -04:00
|
|
|
// ppc64le machines run on Docker 18.06, and buildkit has some bugs on that version
|
2019-08-08 21:52:03 -04:00
|
|
|
environment { DOCKER_BUILDKIT = '0' }
|
|
|
|
|
|
|
|
stages {
|
|
|
|
stage("Print info") {
|
|
|
|
steps {
|
|
|
|
sh 'docker version'
|
|
|
|
sh 'docker info'
|
|
|
|
sh '''
|
|
|
|
echo "check-config.sh version: ${CHECK_CONFIG_COMMIT}"
|
|
|
|
curl -fsSL -o ${WORKSPACE}/check-config.sh "https://raw.githubusercontent.com/moby/moby/${CHECK_CONFIG_COMMIT}/contrib/check-config.sh" \
|
|
|
|
&& bash ${WORKSPACE}/check-config.sh || true
|
|
|
|
'''
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage("Build dev image") {
|
|
|
|
steps {
|
2019-09-13 18:54:52 -04:00
|
|
|
sh 'docker build --force-rm --build-arg APT_MIRROR -t docker:${GIT_COMMIT} .'
|
2019-08-08 21:52:03 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
stage("Integration-cli tests") {
|
2019-08-09 19:00:20 -04:00
|
|
|
environment { TEST_SKIP_INTEGRATION = '1' }
|
2019-08-08 21:52:03 -04:00
|
|
|
steps {
|
|
|
|
sh '''
|
|
|
|
docker run --rm -t --privileged \
|
|
|
|
-v "$WORKSPACE/bundles:/go/src/github.com/docker/docker/bundles" \
|
|
|
|
--name docker-pr$BUILD_NUMBER \
|
|
|
|
-e DOCKER_GITCOMMIT=${GIT_COMMIT} \
|
|
|
|
-e DOCKER_GRAPHDRIVER \
|
2019-08-09 19:00:20 -04:00
|
|
|
-e TEST_SKIP_INTEGRATION \
|
2019-08-08 22:08:21 -04:00
|
|
|
-e TIMEOUT \
|
2019-08-08 21:52:03 -04:00
|
|
|
docker:${GIT_COMMIT} \
|
|
|
|
hack/make.sh \
|
|
|
|
dynbinary \
|
|
|
|
test-integration
|
|
|
|
'''
|
|
|
|
}
|
2019-08-11 14:32:49 -04:00
|
|
|
post {
|
|
|
|
always {
|
|
|
|
junit testResults: 'bundles/**/*-report.xml', allowEmptyResults: true
|
|
|
|
}
|
|
|
|
}
|
2019-08-08 21:52:03 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
post {
|
|
|
|
always {
|
|
|
|
sh '''
|
|
|
|
echo "Ensuring container killed."
|
|
|
|
docker rm -vf docker-pr$BUILD_NUMBER || true
|
2019-09-18 17:47:58 -04:00
|
|
|
cids=$(docker ps -aq -f name=docker-pr${BUILD_NUMBER}-*)
|
|
|
|
[ -n "$cids" ] && docker rm -vf $cids || true
|
2019-08-08 21:52:03 -04:00
|
|
|
'''
|
|
|
|
|
|
|
|
sh '''
|
|
|
|
echo "Chowning /workspace to jenkins user"
|
|
|
|
docker run --rm -v "$WORKSPACE:/workspace" busybox chown -R "$(id -u):$(id -g)" /workspace
|
|
|
|
'''
|
|
|
|
|
2019-08-24 08:14:56 -04:00
|
|
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE', message: 'Failed to create bundles.tar.gz') {
|
|
|
|
sh '''
|
2019-09-10 03:46:19 -04:00
|
|
|
bundleName=ppc64le-integration-cli
|
2019-08-24 08:14:56 -04:00
|
|
|
echo "Creating ${bundleName}-bundles.tar.gz"
|
|
|
|
# exclude overlay2 directories
|
2019-08-11 14:32:49 -04:00
|
|
|
find bundles -path '*/root/*overlay2' -prune -o -type f \\( -name '*-report.json' -o -name '*.log' -o -name '*.prof' -o -name '*-report.xml' \\) -print | xargs tar -czf ${bundleName}-bundles.tar.gz
|
2019-08-24 08:14:56 -04:00
|
|
|
'''
|
2019-08-08 21:52:03 -04:00
|
|
|
|
2019-08-24 08:14:56 -04:00
|
|
|
archiveArtifacts artifacts: '*-bundles.tar.gz', allowEmptyArchive: true
|
|
|
|
}
|
2019-08-08 21:52:03 -04:00
|
|
|
}
|
|
|
|
cleanup {
|
|
|
|
sh 'make clean'
|
|
|
|
deleteDir()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-09-10 03:46:19 -04:00
|
|
|
stage('win-RS1') {
|
2019-08-02 11:34:38 -04:00
|
|
|
when {
|
|
|
|
beforeAgent true
|
2019-09-10 19:37:09 -04:00
|
|
|
// Skip this stage on PRs unless the windowsRS1 checkbox is selected
|
|
|
|
anyOf {
|
|
|
|
not { changeRequest() }
|
|
|
|
expression { params.windowsRS1 }
|
|
|
|
}
|
2019-08-02 11:34:38 -04:00
|
|
|
}
|
2019-08-14 17:26:34 -04:00
|
|
|
environment {
|
|
|
|
DOCKER_BUILDKIT = '0'
|
2019-09-03 12:47:24 -04:00
|
|
|
DOCKER_DUT_DEBUG = '1'
|
2019-08-14 17:26:34 -04:00
|
|
|
SKIP_VALIDATION_TESTS = '1'
|
|
|
|
SOURCES_DRIVE = 'd'
|
|
|
|
SOURCES_SUBDIR = 'gopath'
|
|
|
|
TESTRUN_DRIVE = 'd'
|
2019-09-12 08:53:33 -04:00
|
|
|
TESTRUN_SUBDIR = "CI"
|
2019-08-14 17:26:34 -04:00
|
|
|
WINDOWS_BASE_IMAGE = 'mcr.microsoft.com/windows/servercore'
|
|
|
|
WINDOWS_BASE_IMAGE_TAG = 'ltsc2016'
|
|
|
|
}
|
2019-08-02 11:34:38 -04:00
|
|
|
agent {
|
|
|
|
node {
|
2019-08-14 17:26:34 -04:00
|
|
|
customWorkspace 'd:\\gopath\\src\\github.com\\docker\\docker'
|
|
|
|
label 'windows-2016'
|
2019-08-02 11:34:38 -04:00
|
|
|
}
|
|
|
|
}
|
2019-08-02 12:37:58 -04:00
|
|
|
stages {
|
2019-08-02 14:20:22 -04:00
|
|
|
stage("Print info") {
|
|
|
|
steps {
|
|
|
|
sh 'docker version'
|
|
|
|
sh 'docker info'
|
|
|
|
}
|
|
|
|
}
|
2019-08-02 12:37:58 -04:00
|
|
|
stage("Run tests") {
|
|
|
|
steps {
|
|
|
|
powershell '''
|
|
|
|
$ErrorActionPreference = 'Stop'
|
2019-08-14 17:26:34 -04:00
|
|
|
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
|
|
|
|
Invoke-WebRequest https://github.com/jhowardmsft/docker-ci-zap/blob/master/docker-ci-zap.exe?raw=true -OutFile C:/Windows/System32/docker-ci-zap.exe
|
|
|
|
./hack/ci/windows.ps1
|
2019-08-02 12:37:58 -04:00
|
|
|
exit $LastExitCode
|
|
|
|
'''
|
|
|
|
}
|
|
|
|
}
|
2019-08-02 11:34:38 -04:00
|
|
|
}
|
2019-09-03 09:51:41 -04:00
|
|
|
post {
|
|
|
|
always {
|
|
|
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE', message: 'Failed to create bundles.tar.gz') {
|
|
|
|
powershell '''
|
|
|
|
$bundleName="windowsRS1-integration"
|
|
|
|
Write-Host -ForegroundColor Green "Creating ${bundleName}-bundles.zip"
|
|
|
|
|
|
|
|
# archiveArtifacts does not support env-vars to , so save the artifacts in a fixed location
|
|
|
|
Compress-Archive -Path "${env:TEMP}/CIDUT.out", "${env:TEMP}/CIDUT.err" -CompressionLevel Optimal -DestinationPath "${bundleName}-bundles.zip"
|
|
|
|
'''
|
|
|
|
|
|
|
|
archiveArtifacts artifacts: '*-bundles.zip', allowEmptyArchive: true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
cleanup {
|
|
|
|
sh 'make clean'
|
|
|
|
deleteDir()
|
|
|
|
}
|
|
|
|
}
|
2019-08-02 11:34:38 -04:00
|
|
|
}
|
2019-09-10 03:46:19 -04:00
|
|
|
stage('win-RS5') {
|
2019-08-02 11:34:38 -04:00
|
|
|
when {
|
|
|
|
beforeAgent true
|
|
|
|
expression { params.windowsRS5 }
|
|
|
|
}
|
2019-08-14 17:26:34 -04:00
|
|
|
environment {
|
|
|
|
DOCKER_BUILDKIT = '0'
|
2019-09-03 12:47:24 -04:00
|
|
|
DOCKER_DUT_DEBUG = '1'
|
2019-08-14 17:26:34 -04:00
|
|
|
SKIP_VALIDATION_TESTS = '1'
|
|
|
|
SOURCES_DRIVE = 'd'
|
|
|
|
SOURCES_SUBDIR = 'gopath'
|
|
|
|
TESTRUN_DRIVE = 'd'
|
2019-09-12 08:53:33 -04:00
|
|
|
TESTRUN_SUBDIR = "CI"
|
2019-08-14 17:26:34 -04:00
|
|
|
WINDOWS_BASE_IMAGE = 'mcr.microsoft.com/windows/servercore'
|
|
|
|
WINDOWS_BASE_IMAGE_TAG = 'ltsc2019'
|
|
|
|
}
|
2019-08-02 11:34:38 -04:00
|
|
|
agent {
|
|
|
|
node {
|
2019-08-14 17:26:34 -04:00
|
|
|
customWorkspace 'd:\\gopath\\src\\github.com\\docker\\docker'
|
|
|
|
label 'windows-2019'
|
2019-08-02 11:34:38 -04:00
|
|
|
}
|
|
|
|
}
|
2019-08-02 12:37:58 -04:00
|
|
|
stages {
|
2019-08-02 14:20:22 -04:00
|
|
|
stage("Print info") {
|
|
|
|
steps {
|
|
|
|
sh 'docker version'
|
|
|
|
sh 'docker info'
|
|
|
|
}
|
|
|
|
}
|
2019-08-02 12:37:58 -04:00
|
|
|
stage("Run tests") {
|
|
|
|
steps {
|
|
|
|
powershell '''
|
|
|
|
$ErrorActionPreference = 'Stop'
|
2019-08-14 17:26:34 -04:00
|
|
|
Invoke-WebRequest https://github.com/jhowardmsft/docker-ci-zap/blob/master/docker-ci-zap.exe?raw=true -OutFile C:/Windows/System32/docker-ci-zap.exe
|
|
|
|
./hack/ci/windows.ps1
|
2019-08-02 12:37:58 -04:00
|
|
|
exit $LastExitCode
|
|
|
|
'''
|
|
|
|
}
|
|
|
|
}
|
2019-08-02 11:34:38 -04:00
|
|
|
}
|
2019-09-03 09:51:41 -04:00
|
|
|
post {
|
|
|
|
always {
|
|
|
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE', message: 'Failed to create bundles.tar.gz') {
|
|
|
|
powershell '''
|
|
|
|
$bundleName="windowsRS5-integration"
|
|
|
|
Write-Host -ForegroundColor Green "Creating ${bundleName}-bundles.zip"
|
|
|
|
|
|
|
|
# archiveArtifacts does not support env-vars to , so save the artifacts in a fixed location
|
|
|
|
Compress-Archive -Path "${env:TEMP}/CIDUT.out", "${env:TEMP}/CIDUT.err" -CompressionLevel Optimal -DestinationPath "${bundleName}-bundles.zip"
|
|
|
|
'''
|
|
|
|
|
|
|
|
archiveArtifacts artifacts: '*-bundles.zip', allowEmptyArchive: true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
cleanup {
|
|
|
|
sh 'make clean'
|
|
|
|
deleteDir()
|
|
|
|
}
|
|
|
|
}
|
2019-08-02 11:34:38 -04:00
|
|
|
}
|
2019-01-10 15:08:10 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-07-24 21:25:16 -04:00
|
|
|
}
|