2019-07-31 00:07:30 +00:00
|
|
|
#!groovy
|
2019-01-10 20:08:10 +00:00
|
|
|
pipeline {
|
2019-08-02 15:34:38 +00:00
|
|
|
agent none
|
2019-07-22 21:19:35 +00:00
|
|
|
|
2019-08-02 15:34:38 +00:00
|
|
|
options {
|
|
|
|
buildDiscarder(logRotator(daysToKeepStr: '30'))
|
2019-08-09 02:08:21 +00:00
|
|
|
timeout(time: 2, unit: 'HOURS')
|
2019-08-02 15:34:38 +00:00
|
|
|
timestamps()
|
|
|
|
}
|
|
|
|
parameters {
|
2019-09-10 07:46:19 +00:00
|
|
|
booleanParam(name: 'unit_validate', defaultValue: true, description: 'amd64 (x86_64) unit tests and vendor check')
|
2019-10-07 10:23:19 +00:00
|
|
|
booleanParam(name: 'validate_force', defaultValue: false, description: 'force validation steps to be run, even if no changes were detected')
|
2019-09-10 07:46:19 +00:00
|
|
|
booleanParam(name: 'amd64', defaultValue: true, description: 'amd64 (x86_64) Build/Test')
|
2020-02-18 09:43:56 +00:00
|
|
|
booleanParam(name: 'rootless', defaultValue: true, description: 'amd64 (x86_64) Build/Test (Rootless mode)')
|
2021-01-23 14:36:23 +00:00
|
|
|
booleanParam(name: 'cgroup2', defaultValue: true, description: 'amd64 (x86_64) Build/Test (cgroup v2)')
|
2019-08-06 21:52:14 +00:00
|
|
|
booleanParam(name: 'arm64', defaultValue: true, description: 'ARM (arm64) Build/Test')
|
2021-05-12 10:38:41 +00:00
|
|
|
booleanParam(name: 's390x', defaultValue: false, description: 'IBM Z (s390x) Build/Test')
|
|
|
|
booleanParam(name: 'ppc64le', defaultValue: false, description: 'PowerPC (ppc64le) Build/Test')
|
2019-08-14 21:26:34 +00:00
|
|
|
booleanParam(name: 'windowsRS5', defaultValue: true, description: 'Windows 2019 (RS5) Build/Test')
|
2021-08-20 12:48:08 +00:00
|
|
|
booleanParam(name: 'windows2022', defaultValue: true, description: 'Windows 2022 (LTSC) Build/Test')
|
|
|
|
booleanParam(name: 'windows2022containerd', defaultValue: true, description: 'Windows 2022 (LTSC) with containerd Build/Test')
|
2019-10-31 15:51:45 +00:00
|
|
|
booleanParam(name: 'dco', defaultValue: true, description: 'Run the DCO check')
|
2019-08-02 15:34:38 +00:00
|
|
|
}
|
2019-08-02 15:49:51 +00:00
|
|
|
environment {
|
2019-08-03 14:58:46 +00:00
|
|
|
DOCKER_BUILDKIT = '1'
|
2019-08-09 16:12:29 +00:00
|
|
|
DOCKER_EXPERIMENTAL = '1'
|
2019-08-03 15:10:51 +00:00
|
|
|
DOCKER_GRAPHDRIVER = 'overlay2'
|
2019-08-03 14:58:46 +00:00
|
|
|
APT_MIRROR = 'cdn-fastly.deb.debian.org'
|
2021-11-10 16:10:45 +00:00
|
|
|
CHECK_CONFIG_COMMIT = '33a3680e08d1007e72c3b3f1454f823d8e9948ee'
|
2019-08-23 19:46:55 +00:00
|
|
|
TESTDEBUG = '0'
|
2019-08-09 02:08:21 +00:00
|
|
|
TIMEOUT = '120m'
|
2019-08-02 15:49:51 +00:00
|
|
|
}
|
2019-08-02 15:34:38 +00:00
|
|
|
stages {
|
2019-09-03 19:26:21 +00: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 15:26:26 +00:00
|
|
|
stage('DCO-check') {
|
|
|
|
when {
|
|
|
|
beforeAgent true
|
2019-10-31 15:51:45 +00:00
|
|
|
expression { params.dco }
|
2019-08-11 15:26:26 +00:00
|
|
|
}
|
2019-09-03 19:26:21 +00:00
|
|
|
agent { label 'amd64 && ubuntu-1804 && overlay2' }
|
2019-08-11 15:26:26 +00:00
|
|
|
steps {
|
|
|
|
sh '''
|
|
|
|
docker run --rm \
|
|
|
|
-v "$WORKSPACE:/workspace" \
|
2019-10-21 20:48:03 +00:00
|
|
|
-e VALIDATE_REPO=${GIT_URL} \
|
|
|
|
-e VALIDATE_BRANCH=${CHANGE_TARGET} \
|
|
|
|
alpine sh -c 'apk add --no-cache -q bash git openssh-client && cd /workspace && hack/validate/dco'
|
2019-08-11 15:26:26 +00:00
|
|
|
'''
|
|
|
|
}
|
|
|
|
}
|
2019-08-02 15:34:38 +00:00
|
|
|
stage('Build') {
|
|
|
|
parallel {
|
2019-08-03 14:46:20 +00:00
|
|
|
stage('unit-validate') {
|
2019-08-02 15:34:38 +00:00
|
|
|
when {
|
|
|
|
beforeAgent true
|
2019-08-03 14:46:20 +00:00
|
|
|
expression { params.unit_validate }
|
2019-08-02 15:34:38 +00:00
|
|
|
}
|
|
|
|
agent { label 'amd64 && ubuntu-1804 && overlay2' }
|
2019-10-07 10:23:19 +00:00
|
|
|
environment {
|
|
|
|
// On master ("non-pull-request"), force running some validation checks (vendor, swagger),
|
|
|
|
// even if no files were changed. This allows catching problems caused by pull-requests
|
|
|
|
// that were merged out-of-sequence.
|
|
|
|
TEST_FORCE_VALIDATE = sh returnStdout: true, script: 'if [ "${BRANCH_NAME%%-*}" != "PR" ] || [ "${CHANGE_TARGET:-master}" != "master" ] || [ "${validate_force}" = "true" ]; then echo "1"; fi'
|
|
|
|
}
|
2019-01-10 20:08:10 +00:00
|
|
|
|
2019-08-02 16:37:58 +00:00
|
|
|
stages {
|
2019-08-02 18:20:22 +00:00
|
|
|
stage("Print info") {
|
|
|
|
steps {
|
|
|
|
sh 'docker version'
|
|
|
|
sh 'docker info'
|
2019-08-03 14:58:46 +00: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 18:20:22 +00:00
|
|
|
}
|
|
|
|
}
|
2019-08-02 16:37:58 +00:00
|
|
|
stage("Build dev image") {
|
|
|
|
steps {
|
2021-06-22 09:30:35 +00:00
|
|
|
sh 'docker build --force-rm --build-arg APT_MIRROR --build-arg CROSS=true -t docker:${GIT_COMMIT} .'
|
2019-08-02 16:37:58 +00:00
|
|
|
}
|
|
|
|
}
|
2019-08-03 17:41:00 +00: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 16:12:29 +00:00
|
|
|
-e DOCKER_EXPERIMENTAL \
|
2019-08-03 17:41:00 +00:00
|
|
|
-e DOCKER_GITCOMMIT=${GIT_COMMIT} \
|
|
|
|
-e DOCKER_GRAPHDRIVER \
|
2019-10-07 10:23:19 +00:00
|
|
|
-e TEST_FORCE_VALIDATE \
|
2019-10-03 15:39:08 +00:00
|
|
|
-e VALIDATE_REPO=${GIT_URL} \
|
|
|
|
-e VALIDATE_BRANCH=${CHANGE_TARGET} \
|
2019-08-03 17:41:00 +00:00
|
|
|
docker:${GIT_COMMIT} \
|
|
|
|
hack/validate/default
|
|
|
|
'''
|
|
|
|
}
|
|
|
|
}
|
2019-08-03 18:13:17 +00: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 16:12:29 +00:00
|
|
|
-e DOCKER_EXPERIMENTAL \
|
2019-08-03 18:13:17 +00:00
|
|
|
-e DOCKER_GITCOMMIT=${GIT_COMMIT} \
|
|
|
|
-e DOCKER_GRAPHDRIVER \
|
2019-10-03 15:39:08 +00:00
|
|
|
-e VALIDATE_REPO=${GIT_URL} \
|
|
|
|
-e VALIDATE_BRANCH=${CHANGE_TARGET} \
|
2019-08-03 18:13:17 +00:00
|
|
|
docker:${GIT_COMMIT} \
|
|
|
|
hack/make.sh \
|
2021-04-06 23:32:46 +00:00
|
|
|
dynbinary \
|
2019-08-03 18:13:17 +00:00
|
|
|
test-docker-py
|
|
|
|
'''
|
|
|
|
}
|
2019-08-10 20:41:18 +00:00
|
|
|
post {
|
|
|
|
always {
|
|
|
|
junit testResults: 'bundles/test-docker-py/junit-report.xml', allowEmptyResults: true
|
2019-08-10 20:58:17 +00: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 12:14:56 +00: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 20:41:18 +00:00
|
|
|
}
|
|
|
|
}
|
2019-08-03 18:13:17 +00:00
|
|
|
}
|
2019-08-07 17:57:52 +00:00
|
|
|
stage("Static") {
|
2019-08-05 20:47:08 +00: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} \
|
2021-04-06 23:32:46 +00:00
|
|
|
hack/make.sh binary
|
2019-08-05 20:47:08 +00:00
|
|
|
'''
|
|
|
|
}
|
|
|
|
}
|
|
|
|
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 14:46:20 +00:00
|
|
|
stage("Unit tests") {
|
2019-08-02 16:37:58 +00:00
|
|
|
steps {
|
2021-05-25 22:06:51 +00:00
|
|
|
sh '''
|
|
|
|
sudo modprobe ip6table_filter
|
|
|
|
'''
|
2019-08-02 16:37:58 +00:00
|
|
|
sh '''
|
|
|
|
docker run --rm -t --privileged \
|
|
|
|
-v "$WORKSPACE/bundles:/go/src/github.com/docker/docker/bundles" \
|
|
|
|
--name docker-pr$BUILD_NUMBER \
|
2019-08-09 16:12:29 +00:00
|
|
|
-e DOCKER_EXPERIMENTAL \
|
2019-08-03 14:13:39 +00:00
|
|
|
-e DOCKER_GITCOMMIT=${GIT_COMMIT} \
|
2019-08-03 15:10:51 +00:00
|
|
|
-e DOCKER_GRAPHDRIVER \
|
2019-10-03 15:39:08 +00:00
|
|
|
-e VALIDATE_REPO=${GIT_URL} \
|
|
|
|
-e VALIDATE_BRANCH=${CHANGE_TARGET} \
|
2019-08-03 14:13:39 +00:00
|
|
|
docker:${GIT_COMMIT} \
|
2021-04-27 22:40:39 +00:00
|
|
|
hack/test/unit
|
2019-08-02 16:37:58 +00:00
|
|
|
'''
|
|
|
|
}
|
2019-08-11 13:12:59 +00:00
|
|
|
post {
|
|
|
|
always {
|
2021-07-02 19:29:04 +00:00
|
|
|
junit testResults: 'bundles/junit-report*.xml', allowEmptyResults: true
|
2019-08-11 13:12:59 +00:00
|
|
|
}
|
|
|
|
}
|
2019-08-02 16:37:58 +00:00
|
|
|
}
|
2019-08-03 14:46:20 +00:00
|
|
|
stage("Validate vendor") {
|
|
|
|
steps {
|
|
|
|
sh '''
|
|
|
|
docker run --rm -t --privileged \
|
|
|
|
-v "$WORKSPACE/.git:/go/src/github.com/docker/docker/.git" \
|
2019-08-03 18:05:12 +00:00
|
|
|
--name docker-pr$BUILD_NUMBER \
|
2019-08-09 16:12:29 +00:00
|
|
|
-e DOCKER_EXPERIMENTAL \
|
2019-08-03 14:46:20 +00:00
|
|
|
-e DOCKER_GITCOMMIT=${GIT_COMMIT} \
|
2019-08-03 15:10:51 +00:00
|
|
|
-e DOCKER_GRAPHDRIVER \
|
2019-10-07 10:23:19 +00:00
|
|
|
-e TEST_FORCE_VALIDATE \
|
2019-10-03 15:39:08 +00:00
|
|
|
-e VALIDATE_REPO=${GIT_URL} \
|
|
|
|
-e VALIDATE_BRANCH=${CHANGE_TARGET} \
|
2019-08-03 14:46:20 +00:00
|
|
|
docker:${GIT_COMMIT} \
|
|
|
|
hack/validate/vendor
|
|
|
|
'''
|
|
|
|
}
|
|
|
|
}
|
2019-08-02 15:34:38 +00:00
|
|
|
}
|
2019-08-02 16:37:58 +00:00
|
|
|
|
2019-08-02 15:34:38 +00:00
|
|
|
post {
|
|
|
|
always {
|
|
|
|
sh '''
|
|
|
|
echo 'Ensuring container killed.'
|
|
|
|
docker rm -vf docker-pr$BUILD_NUMBER || true
|
2019-08-02 16:51:51 +00:00
|
|
|
'''
|
|
|
|
|
|
|
|
sh '''
|
2019-08-02 15:34:38 +00:00
|
|
|
echo 'Chowning /workspace to jenkins user'
|
|
|
|
docker run --rm -v "$WORKSPACE:/workspace" busybox chown -R "$(id -u):$(id -g)" /workspace
|
2019-08-02 16:37:58 +00:00
|
|
|
'''
|
|
|
|
|
2019-08-24 12:14:56 +00:00
|
|
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE', message: 'Failed to create bundles.tar.gz') {
|
|
|
|
sh '''
|
|
|
|
bundleName=unit
|
|
|
|
echo "Creating ${bundleName}-bundles.tar.gz"
|
2021-07-02 19:29:04 +00:00
|
|
|
tar -czvf ${bundleName}-bundles.tar.gz bundles/junit-report*.xml bundles/go-test-report*.json bundles/profile*.out
|
2019-08-24 12:14:56 +00:00
|
|
|
'''
|
2019-08-02 16:41:50 +00:00
|
|
|
|
2019-08-24 12:14:56 +00:00
|
|
|
archiveArtifacts artifacts: '*-bundles.tar.gz', allowEmptyArchive: true
|
|
|
|
}
|
2019-08-02 16:41:50 +00:00
|
|
|
}
|
|
|
|
cleanup {
|
|
|
|
sh 'make clean'
|
2019-08-02 15:34:38 +00:00
|
|
|
deleteDir()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-09-10 07:46:19 +00:00
|
|
|
stage('amd64') {
|
2019-08-02 15:34:38 +00:00
|
|
|
when {
|
|
|
|
beforeAgent true
|
2019-09-10 07:46:19 +00:00
|
|
|
expression { params.amd64 }
|
2019-08-02 15:34:38 +00:00
|
|
|
}
|
|
|
|
agent { label 'amd64 && ubuntu-1804 && overlay2' }
|
2019-01-10 20:08:10 +00:00
|
|
|
|
2019-08-02 16:37:58 +00:00
|
|
|
stages {
|
2019-08-02 18:20:22 +00:00
|
|
|
stage("Print info") {
|
|
|
|
steps {
|
|
|
|
sh 'docker version'
|
|
|
|
sh 'docker info'
|
2019-08-03 14:58:46 +00: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 18:20:22 +00:00
|
|
|
}
|
|
|
|
}
|
2019-08-02 16:37:58 +00:00
|
|
|
stage("Build dev image") {
|
|
|
|
steps {
|
|
|
|
sh '''
|
|
|
|
# todo: include ip_vs in base image
|
|
|
|
sudo modprobe ip_vs
|
2019-10-31 15:51:45 +00:00
|
|
|
|
2019-08-03 14:13:39 +00:00
|
|
|
docker build --force-rm --build-arg APT_MIRROR -t docker:${GIT_COMMIT} .
|
2019-08-02 16:37:58 +00:00
|
|
|
'''
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage("Run tests") {
|
|
|
|
steps {
|
2019-08-07 17:57:52 +00:00
|
|
|
sh '''#!/bin/bash
|
|
|
|
# bash is needed so 'jobs -p' works properly
|
|
|
|
# it also accepts setting inline envvars for functions without explicitly exporting
|
2020-05-27 14:29:00 +00:00
|
|
|
set -x
|
2019-10-31 15:51:45 +00:00
|
|
|
|
2019-08-07 17:57:52 +00:00
|
|
|
run_tests() {
|
|
|
|
[ -n "$TESTDEBUG" ] && rm= || rm=--rm;
|
|
|
|
docker run $rm -t --privileged \
|
2019-08-23 22:24:03 +00: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 17:57:52 +00: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-09 02:08:21 +00:00
|
|
|
-e TIMEOUT \
|
2019-10-03 15:39:08 +00:00
|
|
|
-e VALIDATE_REPO=${GIT_URL} \
|
|
|
|
-e VALIDATE_BRANCH=${CHANGE_TARGET} \
|
2019-08-07 17:57:52 +00: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 16:37:58 +00: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 17:57:52 +00:00
|
|
|
--name ${CONTAINER_NAME}-build \
|
2019-08-09 16:12:29 +00:00
|
|
|
-e DOCKER_EXPERIMENTAL \
|
2019-08-03 14:13:39 +00:00
|
|
|
-e DOCKER_GITCOMMIT=${GIT_COMMIT} \
|
2019-08-03 15:10:51 +00:00
|
|
|
-e DOCKER_GRAPHDRIVER \
|
2019-08-03 14:13:39 +00:00
|
|
|
docker:${GIT_COMMIT} \
|
2019-08-03 17:41:00 +00:00
|
|
|
hack/make.sh \
|
2021-04-06 23:32:46 +00:00
|
|
|
dynbinary
|
2019-08-07 17:57:52 +00:00
|
|
|
|
|
|
|
# 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 18:05:18 +00: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 17:57:52 +00:00
|
|
|
|
|
|
|
# integration-cli second set
|
2019-09-12 18:05:18 +00: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 17:57:52 +00:00
|
|
|
|
|
|
|
c=0
|
|
|
|
for job in $(jobs -p); do
|
|
|
|
wait ${job} || c=$?
|
|
|
|
done
|
|
|
|
exit $c
|
2019-08-02 16:37:58 +00:00
|
|
|
'''
|
|
|
|
}
|
2019-08-11 18:32:49 +00:00
|
|
|
post {
|
|
|
|
always {
|
|
|
|
junit testResults: 'bundles/**/*-report.xml', allowEmptyResults: true
|
|
|
|
}
|
|
|
|
}
|
2019-08-02 16:37:58 +00:00
|
|
|
}
|
2019-08-02 15:34:38 +00:00
|
|
|
}
|
2019-08-02 16:37:58 +00:00
|
|
|
|
2019-08-02 15:34:38 +00:00
|
|
|
post {
|
|
|
|
always {
|
|
|
|
sh '''
|
|
|
|
echo "Ensuring container killed."
|
2019-09-24 23:40:33 +00:00
|
|
|
cids=$(docker ps -aq -f name=docker-pr${BUILD_NUMBER}-*)
|
|
|
|
[ -n "$cids" ] && docker rm -vf $cids || true
|
2019-08-02 16:51:51 +00:00
|
|
|
'''
|
|
|
|
|
|
|
|
sh '''
|
2019-08-02 15:34:38 +00:00
|
|
|
echo "Chowning /workspace to jenkins user"
|
|
|
|
docker run --rm -v "$WORKSPACE:/workspace" busybox chown -R "$(id -u):$(id -g)" /workspace
|
|
|
|
'''
|
2019-08-02 16:37:58 +00:00
|
|
|
|
2019-08-24 12:14:56 +00:00
|
|
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE', message: 'Failed to create bundles.tar.gz') {
|
|
|
|
sh '''
|
2019-09-10 07:46:19 +00:00
|
|
|
bundleName=amd64
|
2019-08-24 12:14:56 +00:00
|
|
|
echo "Creating ${bundleName}-bundles.tar.gz"
|
|
|
|
# exclude overlay2 directories
|
2019-08-11 18:32:49 +00: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 12:14:56 +00:00
|
|
|
'''
|
2019-08-02 16:41:50 +00:00
|
|
|
|
2019-08-24 12:14:56 +00:00
|
|
|
archiveArtifacts artifacts: '*-bundles.tar.gz', allowEmptyArchive: true
|
|
|
|
}
|
2019-08-02 16:41:50 +00:00
|
|
|
}
|
|
|
|
cleanup {
|
|
|
|
sh 'make clean'
|
2019-08-02 15:34:38 +00:00
|
|
|
deleteDir()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-02-18 09:43:56 +00:00
|
|
|
stage('rootless') {
|
|
|
|
when {
|
|
|
|
beforeAgent true
|
|
|
|
expression { params.rootless }
|
|
|
|
}
|
|
|
|
agent { label 'amd64 && ubuntu-1804 && overlay2' }
|
|
|
|
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 '''
|
|
|
|
docker build --force-rm --build-arg APT_MIRROR -t docker:${GIT_COMMIT} .
|
|
|
|
'''
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage("Integration tests") {
|
|
|
|
environment {
|
|
|
|
DOCKER_ROOTLESS = '1'
|
|
|
|
TEST_SKIP_INTEGRATION_CLI = '1'
|
|
|
|
}
|
|
|
|
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 \
|
|
|
|
-e DOCKER_EXPERIMENTAL \
|
|
|
|
-e DOCKER_ROOTLESS \
|
|
|
|
-e TEST_SKIP_INTEGRATION_CLI \
|
|
|
|
-e TIMEOUT \
|
|
|
|
-e VALIDATE_REPO=${GIT_URL} \
|
|
|
|
-e VALIDATE_BRANCH=${CHANGE_TARGET} \
|
|
|
|
docker:${GIT_COMMIT} \
|
|
|
|
hack/make.sh \
|
|
|
|
dynbinary \
|
|
|
|
test-integration
|
|
|
|
'''
|
|
|
|
}
|
|
|
|
post {
|
|
|
|
always {
|
|
|
|
junit testResults: 'bundles/**/*-report.xml', allowEmptyResults: true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
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
|
|
|
|
'''
|
|
|
|
|
|
|
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE', message: 'Failed to create bundles.tar.gz') {
|
|
|
|
sh '''
|
|
|
|
bundleName=amd64-rootless
|
|
|
|
echo "Creating ${bundleName}-bundles.tar.gz"
|
|
|
|
# exclude overlay2 directories
|
|
|
|
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
|
|
|
|
'''
|
|
|
|
|
|
|
|
archiveArtifacts artifacts: '*-bundles.tar.gz', allowEmptyArchive: true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
cleanup {
|
|
|
|
sh 'make clean'
|
|
|
|
deleteDir()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-01-23 14:36:23 +00:00
|
|
|
stage('cgroup2') {
|
|
|
|
when {
|
|
|
|
beforeAgent true
|
|
|
|
expression { params.cgroup2 }
|
|
|
|
}
|
|
|
|
agent { label 'amd64 && ubuntu-2004 && cgroup2' }
|
|
|
|
stages {
|
|
|
|
stage("Print info") {
|
|
|
|
steps {
|
|
|
|
sh 'docker version'
|
|
|
|
sh 'docker info'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage("Build dev image") {
|
|
|
|
steps {
|
|
|
|
sh '''
|
|
|
|
docker build --force-rm --build-arg APT_MIRROR --build-arg SYSTEMD=true -t docker:${GIT_COMMIT} .
|
|
|
|
'''
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage("Integration tests") {
|
|
|
|
environment {
|
|
|
|
DOCKER_SYSTEMD = '1' // recommended cgroup driver for v2
|
|
|
|
TEST_SKIP_INTEGRATION_CLI = '1' // CLI tests do not support v2
|
|
|
|
}
|
|
|
|
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 \
|
|
|
|
-e DOCKER_EXPERIMENTAL \
|
|
|
|
-e DOCKER_SYSTEMD \
|
|
|
|
-e TEST_SKIP_INTEGRATION_CLI \
|
|
|
|
-e TIMEOUT \
|
|
|
|
-e VALIDATE_REPO=${GIT_URL} \
|
|
|
|
-e VALIDATE_BRANCH=${CHANGE_TARGET} \
|
|
|
|
docker:${GIT_COMMIT} \
|
|
|
|
hack/make.sh \
|
|
|
|
dynbinary \
|
|
|
|
test-integration
|
|
|
|
'''
|
|
|
|
}
|
|
|
|
post {
|
|
|
|
always {
|
|
|
|
junit testResults: 'bundles/**/*-report.xml', allowEmptyResults: true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
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
|
|
|
|
'''
|
|
|
|
|
|
|
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE', message: 'Failed to create bundles.tar.gz') {
|
|
|
|
sh '''
|
|
|
|
bundleName=amd64-cgroup2
|
|
|
|
echo "Creating ${bundleName}-bundles.tar.gz"
|
|
|
|
# exclude overlay2 directories
|
|
|
|
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
|
|
|
|
'''
|
|
|
|
|
|
|
|
archiveArtifacts artifacts: '*-bundles.tar.gz', allowEmptyArchive: true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
cleanup {
|
|
|
|
sh 'make clean'
|
|
|
|
deleteDir()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2019-09-10 07:46:19 +00:00
|
|
|
stage('s390x') {
|
2019-08-02 15:34:38 +00:00
|
|
|
when {
|
|
|
|
beforeAgent true
|
2021-05-12 10:38:41 +00:00
|
|
|
// Skip this stage on PRs unless the checkbox is selected
|
|
|
|
anyOf {
|
|
|
|
not { changeRequest() }
|
|
|
|
expression { params.s390x }
|
|
|
|
}
|
2019-08-02 15:34:38 +00:00
|
|
|
}
|
2021-06-29 14:27:56 +00:00
|
|
|
agent { label 's390x-ubuntu-2004' }
|
2019-08-02 16:37:58 +00:00
|
|
|
|
|
|
|
stages {
|
2019-08-02 18:20:22 +00:00
|
|
|
stage("Print info") {
|
|
|
|
steps {
|
|
|
|
sh 'docker version'
|
|
|
|
sh 'docker info'
|
2019-08-03 14:58:46 +00: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 18:20:22 +00:00
|
|
|
}
|
|
|
|
}
|
2019-08-02 16:37:58 +00:00
|
|
|
stage("Build dev image") {
|
|
|
|
steps {
|
|
|
|
sh '''
|
2020-03-10 20:56:56 +00:00
|
|
|
docker build --force-rm --build-arg APT_MIRROR -t docker:${GIT_COMMIT} .
|
2019-08-02 16:37:58 +00:00
|
|
|
'''
|
|
|
|
}
|
|
|
|
}
|
2019-08-03 17:57:50 +00:00
|
|
|
stage("Unit tests") {
|
|
|
|
steps {
|
2021-05-25 22:06:51 +00:00
|
|
|
sh '''
|
|
|
|
sudo modprobe ip6table_filter
|
|
|
|
'''
|
2019-08-03 17:57:50 +00:00
|
|
|
sh '''
|
|
|
|
docker run --rm -t --privileged \
|
|
|
|
-v "$WORKSPACE/bundles:/go/src/github.com/docker/docker/bundles" \
|
|
|
|
--name docker-pr$BUILD_NUMBER \
|
2019-08-09 16:12:29 +00:00
|
|
|
-e DOCKER_EXPERIMENTAL \
|
2019-08-03 17:57:50 +00:00
|
|
|
-e DOCKER_GITCOMMIT=${GIT_COMMIT} \
|
|
|
|
-e DOCKER_GRAPHDRIVER \
|
2019-10-03 15:39:08 +00:00
|
|
|
-e VALIDATE_REPO=${GIT_URL} \
|
|
|
|
-e VALIDATE_BRANCH=${CHANGE_TARGET} \
|
2019-08-03 17:57:50 +00:00
|
|
|
docker:${GIT_COMMIT} \
|
2021-04-27 22:40:39 +00:00
|
|
|
hack/test/unit
|
2019-08-03 17:57:50 +00:00
|
|
|
'''
|
|
|
|
}
|
2019-08-11 13:15:55 +00:00
|
|
|
post {
|
|
|
|
always {
|
2021-07-02 19:29:04 +00:00
|
|
|
junit testResults: 'bundles/junit-report*.xml', allowEmptyResults: true
|
2019-08-11 13:15:55 +00:00
|
|
|
}
|
|
|
|
}
|
2019-08-03 17:57:50 +00:00
|
|
|
}
|
|
|
|
stage("Integration tests") {
|
2019-08-09 23:02:43 +00:00
|
|
|
environment { TEST_SKIP_INTEGRATION_CLI = '1' }
|
2019-08-02 16:37:58 +00:00
|
|
|
steps {
|
|
|
|
sh '''
|
|
|
|
docker run --rm -t --privileged \
|
|
|
|
-v "$WORKSPACE/bundles:/go/src/github.com/docker/docker/bundles" \
|
2019-08-03 17:08:06 +00:00
|
|
|
--name docker-pr$BUILD_NUMBER \
|
2019-08-09 16:12:29 +00:00
|
|
|
-e DOCKER_EXPERIMENTAL \
|
2019-08-03 17:08:06 +00:00
|
|
|
-e DOCKER_GITCOMMIT=${GIT_COMMIT} \
|
|
|
|
-e DOCKER_GRAPHDRIVER \
|
2019-08-23 19:46:55 +00:00
|
|
|
-e TESTDEBUG \
|
2019-08-09 23:02:43 +00:00
|
|
|
-e TEST_SKIP_INTEGRATION_CLI \
|
2019-08-09 02:08:21 +00:00
|
|
|
-e TIMEOUT \
|
2019-10-03 15:39:08 +00:00
|
|
|
-e VALIDATE_REPO=${GIT_URL} \
|
|
|
|
-e VALIDATE_BRANCH=${CHANGE_TARGET} \
|
2019-08-03 17:08:06 +00:00
|
|
|
docker:${GIT_COMMIT} \
|
2019-08-03 17:57:50 +00:00
|
|
|
hack/make.sh \
|
|
|
|
dynbinary \
|
|
|
|
test-integration
|
2019-08-02 16:37:58 +00:00
|
|
|
'''
|
|
|
|
}
|
2019-08-11 18:32:49 +00:00
|
|
|
post {
|
|
|
|
always {
|
|
|
|
junit testResults: 'bundles/**/*-report.xml', allowEmptyResults: true
|
|
|
|
}
|
|
|
|
}
|
2019-08-02 16:37:58 +00:00
|
|
|
}
|
2019-08-02 15:34:38 +00:00
|
|
|
}
|
2019-08-02 16:37:58 +00:00
|
|
|
|
2019-08-02 15:34:38 +00:00
|
|
|
post {
|
|
|
|
always {
|
|
|
|
sh '''
|
|
|
|
echo "Ensuring container killed."
|
2019-08-03 18:05:12 +00:00
|
|
|
docker rm -vf docker-pr$BUILD_NUMBER || true
|
2019-08-02 16:51:51 +00:00
|
|
|
'''
|
|
|
|
|
|
|
|
sh '''
|
2019-08-02 15:34:38 +00:00
|
|
|
echo "Chowning /workspace to jenkins user"
|
2019-08-02 16:49:33 +00:00
|
|
|
docker run --rm -v "$WORKSPACE:/workspace" busybox chown -R "$(id -u):$(id -g)" /workspace
|
2019-08-02 15:34:38 +00:00
|
|
|
'''
|
2019-08-02 16:37:58 +00:00
|
|
|
|
2019-08-24 12:14:56 +00: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 18:32:49 +00: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 12:14:56 +00:00
|
|
|
'''
|
2019-08-02 16:41:50 +00:00
|
|
|
|
2019-08-24 12:14:56 +00:00
|
|
|
archiveArtifacts artifacts: '*-bundles.tar.gz', allowEmptyArchive: true
|
|
|
|
}
|
2019-08-02 16:41:50 +00:00
|
|
|
}
|
|
|
|
cleanup {
|
|
|
|
sh 'make clean'
|
2019-08-02 15:34:38 +00:00
|
|
|
deleteDir()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-09-10 07:46:19 +00:00
|
|
|
stage('s390x integration-cli') {
|
2019-08-09 02:00:57 +00:00
|
|
|
when {
|
|
|
|
beforeAgent true
|
2022-04-06 13:34:38 +00:00
|
|
|
// Skip this stage on PRs unless the checkbox is selected
|
|
|
|
anyOf {
|
|
|
|
not { changeRequest() }
|
|
|
|
expression { params.s390x }
|
|
|
|
}
|
2019-08-09 02:00:57 +00:00
|
|
|
}
|
2021-06-29 14:27:56 +00:00
|
|
|
agent { label 's390x-ubuntu-2004' }
|
2019-08-09 02:00:57 +00:00
|
|
|
|
|
|
|
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 '''
|
2020-03-10 20:56:56 +00:00
|
|
|
docker build --force-rm --build-arg APT_MIRROR -t docker:${GIT_COMMIT} .
|
2019-08-09 02:00:57 +00:00
|
|
|
'''
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage("Integration-cli tests") {
|
2019-08-09 23:02:43 +00:00
|
|
|
environment { TEST_SKIP_INTEGRATION = '1' }
|
2019-08-09 02:00:57 +00: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 23:02:43 +00:00
|
|
|
-e TEST_SKIP_INTEGRATION \
|
2019-08-09 02:08:21 +00:00
|
|
|
-e TIMEOUT \
|
2019-10-03 15:39:08 +00:00
|
|
|
-e VALIDATE_REPO=${GIT_URL} \
|
|
|
|
-e VALIDATE_BRANCH=${CHANGE_TARGET} \
|
2019-08-09 02:00:57 +00:00
|
|
|
docker:${GIT_COMMIT} \
|
|
|
|
hack/make.sh \
|
|
|
|
dynbinary \
|
|
|
|
test-integration
|
|
|
|
'''
|
|
|
|
}
|
2019-08-11 18:32:49 +00:00
|
|
|
post {
|
|
|
|
always {
|
|
|
|
junit testResults: 'bundles/**/*-report.xml', allowEmptyResults: true
|
|
|
|
}
|
|
|
|
}
|
2019-08-09 02:00:57 +00: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 12:14:56 +00: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 18:32:49 +00: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 12:14:56 +00:00
|
|
|
'''
|
2019-08-09 02:00:57 +00:00
|
|
|
|
2019-08-24 12:14:56 +00:00
|
|
|
archiveArtifacts artifacts: '*-bundles.tar.gz', allowEmptyArchive: true
|
|
|
|
}
|
2019-08-09 02:00:57 +00:00
|
|
|
}
|
|
|
|
cleanup {
|
|
|
|
sh 'make clean'
|
|
|
|
deleteDir()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-09-10 07:46:19 +00:00
|
|
|
stage('ppc64le') {
|
2019-08-02 15:34:38 +00:00
|
|
|
when {
|
|
|
|
beforeAgent true
|
2021-05-12 10:38:41 +00:00
|
|
|
// Skip this stage on PRs unless the checkbox is selected
|
|
|
|
anyOf {
|
|
|
|
not { changeRequest() }
|
|
|
|
expression { params.ppc64le }
|
|
|
|
}
|
2019-08-02 15:34:38 +00:00
|
|
|
}
|
|
|
|
agent { label 'ppc64le-ubuntu-1604' }
|
2019-10-14 17:22:56 +00:00
|
|
|
// ppc64le machines run on Docker 18.06, and buildkit has some
|
|
|
|
// bugs on that version. Build and use buildx instead.
|
|
|
|
environment {
|
|
|
|
USE_BUILDX = '1'
|
|
|
|
DOCKER_BUILDKIT = '0'
|
|
|
|
}
|
2019-08-02 16:37:58 +00:00
|
|
|
|
|
|
|
stages {
|
2019-08-02 18:20:22 +00:00
|
|
|
stage("Print info") {
|
|
|
|
steps {
|
|
|
|
sh 'docker version'
|
|
|
|
sh 'docker info'
|
2019-08-03 14:58:46 +00: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 18:20:22 +00:00
|
|
|
}
|
|
|
|
}
|
2019-08-02 16:37:58 +00:00
|
|
|
stage("Build dev image") {
|
|
|
|
steps {
|
2019-08-16 23:39:10 +00:00
|
|
|
sh '''
|
|
|
|
make bundles/buildx
|
|
|
|
bundles/buildx build --load --force-rm --build-arg APT_MIRROR -t docker:${GIT_COMMIT} .
|
|
|
|
'''
|
2019-08-02 16:37:58 +00:00
|
|
|
}
|
|
|
|
}
|
2019-08-03 17:57:50 +00:00
|
|
|
stage("Unit tests") {
|
|
|
|
steps {
|
2021-05-25 22:06:51 +00:00
|
|
|
sh '''
|
|
|
|
sudo modprobe ip6table_filter
|
|
|
|
'''
|
2019-08-03 17:57:50 +00:00
|
|
|
sh '''
|
|
|
|
docker run --rm -t --privileged \
|
|
|
|
-v "$WORKSPACE/bundles:/go/src/github.com/docker/docker/bundles" \
|
|
|
|
--name docker-pr$BUILD_NUMBER \
|
2019-08-09 16:12:29 +00:00
|
|
|
-e DOCKER_EXPERIMENTAL \
|
2019-08-03 17:57:50 +00:00
|
|
|
-e DOCKER_GITCOMMIT=${GIT_COMMIT} \
|
|
|
|
-e DOCKER_GRAPHDRIVER \
|
2019-10-03 15:39:08 +00:00
|
|
|
-e VALIDATE_REPO=${GIT_URL} \
|
|
|
|
-e VALIDATE_BRANCH=${CHANGE_TARGET} \
|
2019-08-03 17:57:50 +00:00
|
|
|
docker:${GIT_COMMIT} \
|
2021-04-27 22:40:39 +00:00
|
|
|
hack/test/unit
|
2019-08-03 17:57:50 +00:00
|
|
|
'''
|
|
|
|
}
|
2019-08-11 13:15:55 +00:00
|
|
|
post {
|
|
|
|
always {
|
2021-07-02 19:29:04 +00:00
|
|
|
junit testResults: 'bundles/junit-report*.xml', allowEmptyResults: true
|
2019-08-11 13:15:55 +00:00
|
|
|
}
|
|
|
|
}
|
2019-08-03 17:57:50 +00:00
|
|
|
}
|
|
|
|
stage("Integration tests") {
|
2019-08-09 23:00:20 +00:00
|
|
|
environment { TEST_SKIP_INTEGRATION_CLI = '1' }
|
2019-08-02 16:37:58 +00:00
|
|
|
steps {
|
|
|
|
sh '''
|
|
|
|
docker run --rm -t --privileged \
|
|
|
|
-v "$WORKSPACE/bundles:/go/src/github.com/docker/docker/bundles" \
|
2019-08-03 17:08:06 +00:00
|
|
|
--name docker-pr$BUILD_NUMBER \
|
2019-08-09 16:12:29 +00:00
|
|
|
-e DOCKER_EXPERIMENTAL \
|
2019-08-03 17:08:06 +00:00
|
|
|
-e DOCKER_GITCOMMIT=${GIT_COMMIT} \
|
|
|
|
-e DOCKER_GRAPHDRIVER \
|
2019-08-23 19:46:55 +00:00
|
|
|
-e TESTDEBUG \
|
2019-08-09 23:00:20 +00:00
|
|
|
-e TEST_SKIP_INTEGRATION_CLI \
|
2019-08-09 02:08:21 +00:00
|
|
|
-e TIMEOUT \
|
2019-10-03 15:39:08 +00:00
|
|
|
-e VALIDATE_REPO=${GIT_URL} \
|
|
|
|
-e VALIDATE_BRANCH=${CHANGE_TARGET} \
|
2019-08-03 17:08:06 +00:00
|
|
|
docker:${GIT_COMMIT} \
|
2019-08-03 17:57:50 +00:00
|
|
|
hack/make.sh \
|
|
|
|
dynbinary \
|
|
|
|
test-integration
|
2019-08-02 16:37:58 +00:00
|
|
|
'''
|
|
|
|
}
|
2019-08-11 18:32:49 +00:00
|
|
|
post {
|
|
|
|
always {
|
|
|
|
junit testResults: 'bundles/**/*-report.xml', allowEmptyResults: true
|
|
|
|
}
|
|
|
|
}
|
2019-08-02 16:37:58 +00:00
|
|
|
}
|
2019-08-02 15:34:38 +00:00
|
|
|
}
|
2019-08-02 16:37:58 +00:00
|
|
|
|
2019-08-02 15:34:38 +00:00
|
|
|
post {
|
|
|
|
always {
|
|
|
|
sh '''
|
|
|
|
echo "Ensuring container killed."
|
2019-08-02 16:47:23 +00:00
|
|
|
docker rm -vf docker-pr$BUILD_NUMBER || true
|
2019-08-02 16:51:51 +00:00
|
|
|
'''
|
|
|
|
|
|
|
|
sh '''
|
2019-08-02 15:34:38 +00:00
|
|
|
echo "Chowning /workspace to jenkins user"
|
2019-08-02 16:49:33 +00:00
|
|
|
docker run --rm -v "$WORKSPACE:/workspace" busybox chown -R "$(id -u):$(id -g)" /workspace
|
2019-08-02 15:34:38 +00:00
|
|
|
'''
|
2019-08-02 16:37:58 +00:00
|
|
|
|
2019-08-24 12:14:56 +00:00
|
|
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE', message: 'Failed to create bundles.tar.gz') {
|
|
|
|
sh '''
|
2019-09-10 07:46:19 +00:00
|
|
|
bundleName=ppc64le-integration
|
2019-08-24 12:14:56 +00:00
|
|
|
echo "Creating ${bundleName}-bundles.tar.gz"
|
|
|
|
# exclude overlay2 directories
|
2019-08-11 18:32:49 +00: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 12:14:56 +00:00
|
|
|
'''
|
2019-08-02 16:41:50 +00:00
|
|
|
|
2019-08-24 12:14:56 +00:00
|
|
|
archiveArtifacts artifacts: '*-bundles.tar.gz', allowEmptyArchive: true
|
|
|
|
}
|
2019-08-02 16:41:50 +00:00
|
|
|
}
|
|
|
|
cleanup {
|
|
|
|
sh 'make clean'
|
2019-08-02 15:34:38 +00:00
|
|
|
deleteDir()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-09-10 07:46:19 +00:00
|
|
|
stage('ppc64le integration-cli') {
|
2019-08-09 01:52:03 +00:00
|
|
|
when {
|
|
|
|
beforeAgent true
|
2022-04-06 13:34:38 +00:00
|
|
|
// Skip this stage on PRs unless the checkbox is selected
|
|
|
|
anyOf {
|
|
|
|
not { changeRequest() }
|
|
|
|
expression { params.ppc64le }
|
|
|
|
}
|
2019-08-09 01:52:03 +00:00
|
|
|
}
|
|
|
|
agent { label 'ppc64le-ubuntu-1604' }
|
2019-10-14 17:22:56 +00:00
|
|
|
// ppc64le machines run on Docker 18.06, and buildkit has some
|
|
|
|
// bugs on that version. Build and use buildx instead.
|
|
|
|
environment {
|
|
|
|
USE_BUILDX = '1'
|
|
|
|
DOCKER_BUILDKIT = '0'
|
|
|
|
}
|
2019-08-09 01:52:03 +00:00
|
|
|
|
|
|
|
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-08-16 23:39:10 +00:00
|
|
|
sh '''
|
|
|
|
make bundles/buildx
|
|
|
|
bundles/buildx build --load --force-rm --build-arg APT_MIRROR -t docker:${GIT_COMMIT} .
|
|
|
|
'''
|
2019-08-09 01:52:03 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
stage("Integration-cli tests") {
|
2019-08-09 23:00:20 +00:00
|
|
|
environment { TEST_SKIP_INTEGRATION = '1' }
|
2019-08-09 01:52:03 +00: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 23:00:20 +00:00
|
|
|
-e TEST_SKIP_INTEGRATION \
|
2019-08-09 02:08:21 +00:00
|
|
|
-e TIMEOUT \
|
2019-10-03 15:39:08 +00:00
|
|
|
-e VALIDATE_REPO=${GIT_URL} \
|
|
|
|
-e VALIDATE_BRANCH=${CHANGE_TARGET} \
|
2019-08-09 01:52:03 +00:00
|
|
|
docker:${GIT_COMMIT} \
|
|
|
|
hack/make.sh \
|
|
|
|
dynbinary \
|
|
|
|
test-integration
|
|
|
|
'''
|
|
|
|
}
|
2019-08-11 18:32:49 +00:00
|
|
|
post {
|
|
|
|
always {
|
|
|
|
junit testResults: 'bundles/**/*-report.xml', allowEmptyResults: true
|
|
|
|
}
|
|
|
|
}
|
2019-08-09 01:52:03 +00: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 12:14:56 +00:00
|
|
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE', message: 'Failed to create bundles.tar.gz') {
|
|
|
|
sh '''
|
2019-09-10 07:46:19 +00:00
|
|
|
bundleName=ppc64le-integration-cli
|
2019-08-24 12:14:56 +00:00
|
|
|
echo "Creating ${bundleName}-bundles.tar.gz"
|
|
|
|
# exclude overlay2 directories
|
2019-08-11 18:32:49 +00: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 12:14:56 +00:00
|
|
|
'''
|
2019-08-09 01:52:03 +00:00
|
|
|
|
2019-08-24 12:14:56 +00:00
|
|
|
archiveArtifacts artifacts: '*-bundles.tar.gz', allowEmptyArchive: true
|
|
|
|
}
|
2019-08-09 01:52:03 +00:00
|
|
|
}
|
|
|
|
cleanup {
|
|
|
|
sh 'make clean'
|
|
|
|
deleteDir()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-08-06 21:52:14 +00:00
|
|
|
stage('arm64') {
|
2019-08-06 10:23:12 +00:00
|
|
|
when {
|
|
|
|
beforeAgent true
|
2019-08-06 21:52:14 +00:00
|
|
|
expression { params.arm64 }
|
2019-08-06 10:23:12 +00:00
|
|
|
}
|
2021-03-30 10:20:40 +00:00
|
|
|
agent { label 'arm64 && ubuntu-2004' }
|
2019-08-06 10:33:43 +00:00
|
|
|
environment {
|
|
|
|
TEST_SKIP_INTEGRATION_CLI = '1'
|
|
|
|
}
|
|
|
|
|
2019-08-06 10:35:33 +00:00
|
|
|
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-08-14 23:11:21 +00:00
|
|
|
sh 'docker build --force-rm --build-arg APT_MIRROR -t docker:${GIT_COMMIT} .'
|
2019-08-06 10:35:33 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
stage("Unit tests") {
|
|
|
|
steps {
|
2021-05-25 22:06:51 +00:00
|
|
|
sh '''
|
|
|
|
sudo modprobe ip6table_filter
|
|
|
|
'''
|
2019-08-06 10:35:33 +00:00
|
|
|
sh '''
|
|
|
|
docker run --rm -t --privileged \
|
|
|
|
-v "$WORKSPACE/bundles:/go/src/github.com/docker/docker/bundles" \
|
|
|
|
--name docker-pr$BUILD_NUMBER \
|
2019-08-14 23:11:21 +00:00
|
|
|
-e DOCKER_EXPERIMENTAL \
|
2019-08-06 10:35:33 +00:00
|
|
|
-e DOCKER_GITCOMMIT=${GIT_COMMIT} \
|
|
|
|
-e DOCKER_GRAPHDRIVER \
|
2019-08-14 23:11:21 +00:00
|
|
|
-e VALIDATE_REPO=${GIT_URL} \
|
|
|
|
-e VALIDATE_BRANCH=${CHANGE_TARGET} \
|
2019-08-06 10:35:33 +00:00
|
|
|
docker:${GIT_COMMIT} \
|
2021-04-27 22:40:39 +00:00
|
|
|
hack/test/unit
|
2019-08-06 10:35:33 +00:00
|
|
|
'''
|
|
|
|
}
|
2019-08-14 23:11:21 +00:00
|
|
|
post {
|
|
|
|
always {
|
2021-07-02 19:29:04 +00:00
|
|
|
junit testResults: 'bundles/junit-report*.xml', allowEmptyResults: true
|
2019-08-14 23:11:21 +00:00
|
|
|
}
|
|
|
|
}
|
2019-08-06 10:35:33 +00:00
|
|
|
}
|
|
|
|
stage("Integration tests") {
|
2019-08-14 23:11:21 +00:00
|
|
|
environment { TEST_SKIP_INTEGRATION_CLI = '1' }
|
2019-08-06 10:35:33 +00: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-14 23:11:21 +00:00
|
|
|
-e DOCKER_EXPERIMENTAL \
|
2019-08-06 10:35:33 +00:00
|
|
|
-e DOCKER_GITCOMMIT=${GIT_COMMIT} \
|
|
|
|
-e DOCKER_GRAPHDRIVER \
|
2019-08-14 23:11:21 +00:00
|
|
|
-e TESTDEBUG \
|
2019-08-06 10:35:33 +00:00
|
|
|
-e TEST_SKIP_INTEGRATION_CLI \
|
2019-08-14 23:11:21 +00:00
|
|
|
-e TIMEOUT \
|
|
|
|
-e VALIDATE_REPO=${GIT_URL} \
|
|
|
|
-e VALIDATE_BRANCH=${CHANGE_TARGET} \
|
2019-08-06 10:35:33 +00:00
|
|
|
docker:${GIT_COMMIT} \
|
|
|
|
hack/make.sh \
|
|
|
|
dynbinary \
|
|
|
|
test-integration
|
|
|
|
'''
|
|
|
|
}
|
2019-08-14 23:11:21 +00:00
|
|
|
post {
|
|
|
|
always {
|
|
|
|
junit testResults: 'bundles/**/*-report.xml', allowEmptyResults: true
|
|
|
|
}
|
|
|
|
}
|
2019-08-06 10:35:33 +00:00
|
|
|
}
|
2019-08-06 10:23:12 +00:00
|
|
|
}
|
2019-08-14 23:11:21 +00:00
|
|
|
|
2019-08-06 10:23:12 +00:00
|
|
|
post {
|
|
|
|
always {
|
|
|
|
sh '''
|
|
|
|
echo "Ensuring container killed."
|
2019-08-06 10:33:43 +00:00
|
|
|
docker rm -vf docker-pr$BUILD_NUMBER || true
|
|
|
|
'''
|
2019-08-06 10:23:12 +00:00
|
|
|
|
2019-08-06 10:33:43 +00:00
|
|
|
sh '''
|
2019-08-06 10:23:12 +00:00
|
|
|
echo "Chowning /workspace to jenkins user"
|
2019-08-06 10:33:43 +00:00
|
|
|
docker run --rm -v "$WORKSPACE:/workspace" busybox chown -R "$(id -u):$(id -g)" /workspace
|
2019-08-06 10:23:12 +00:00
|
|
|
'''
|
2019-08-06 10:33:43 +00:00
|
|
|
|
2019-08-14 23:11:21 +00:00
|
|
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE', message: 'Failed to create bundles.tar.gz') {
|
|
|
|
sh '''
|
|
|
|
bundleName=arm64-integration
|
|
|
|
echo "Creating ${bundleName}-bundles.tar.gz"
|
|
|
|
# exclude overlay2 directories
|
|
|
|
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-06 10:33:43 +00:00
|
|
|
|
2019-08-14 23:11:21 +00:00
|
|
|
archiveArtifacts artifacts: '*-bundles.tar.gz', allowEmptyArchive: true
|
|
|
|
}
|
2019-08-06 10:23:12 +00:00
|
|
|
}
|
2019-08-06 10:35:33 +00:00
|
|
|
cleanup {
|
|
|
|
sh 'make clean'
|
|
|
|
deleteDir()
|
|
|
|
}
|
2019-08-06 10:23:12 +00:00
|
|
|
}
|
|
|
|
}
|
2019-09-10 07:46:19 +00:00
|
|
|
stage('win-RS5') {
|
2019-08-02 15:34:38 +00:00
|
|
|
when {
|
|
|
|
beforeAgent true
|
|
|
|
expression { params.windowsRS5 }
|
|
|
|
}
|
2019-08-14 21:26:34 +00:00
|
|
|
environment {
|
|
|
|
DOCKER_BUILDKIT = '0'
|
2019-09-03 16:47:24 +00:00
|
|
|
DOCKER_DUT_DEBUG = '1'
|
2019-08-14 21:26:34 +00:00
|
|
|
SKIP_VALIDATION_TESTS = '1'
|
|
|
|
SOURCES_DRIVE = 'd'
|
|
|
|
SOURCES_SUBDIR = 'gopath'
|
|
|
|
TESTRUN_DRIVE = 'd'
|
2019-09-12 12:53:33 +00:00
|
|
|
TESTRUN_SUBDIR = "CI"
|
2019-08-14 21:26:34 +00:00
|
|
|
WINDOWS_BASE_IMAGE = 'mcr.microsoft.com/windows/servercore'
|
2020-02-13 10:42:56 +00:00
|
|
|
WINDOWS_BASE_IMAGE_TAG = 'ltsc2019'
|
2019-08-14 21:26:34 +00:00
|
|
|
}
|
2019-08-02 15:34:38 +00:00
|
|
|
agent {
|
|
|
|
node {
|
2019-08-14 21:26:34 +00:00
|
|
|
customWorkspace 'd:\\gopath\\src\\github.com\\docker\\docker'
|
|
|
|
label 'windows-2019'
|
2019-08-02 15:34:38 +00:00
|
|
|
}
|
|
|
|
}
|
2019-08-02 16:37:58 +00:00
|
|
|
stages {
|
2019-08-02 18:20:22 +00:00
|
|
|
stage("Print info") {
|
|
|
|
steps {
|
|
|
|
sh 'docker version'
|
|
|
|
sh 'docker info'
|
|
|
|
}
|
|
|
|
}
|
2019-08-02 16:37:58 +00:00
|
|
|
stage("Run tests") {
|
|
|
|
steps {
|
|
|
|
powershell '''
|
|
|
|
$ErrorActionPreference = 'Stop'
|
2019-09-26 09:59:13 +00:00
|
|
|
Invoke-WebRequest https://github.com/moby/docker-ci-zap/blob/master/docker-ci-zap.exe?raw=true -OutFile C:/Windows/System32/docker-ci-zap.exe
|
2019-08-14 21:26:34 +00:00
|
|
|
./hack/ci/windows.ps1
|
2019-08-02 16:37:58 +00:00
|
|
|
exit $LastExitCode
|
|
|
|
'''
|
|
|
|
}
|
|
|
|
}
|
2019-08-02 15:34:38 +00:00
|
|
|
}
|
2019-09-03 13:51:41 +00:00
|
|
|
post {
|
|
|
|
always {
|
2019-10-08 01:14:51 +00:00
|
|
|
junit testResults: 'bundles/junit-report-*.xml', allowEmptyResults: true
|
2019-09-03 13:51:41 +00:00
|
|
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE', message: 'Failed to create bundles.tar.gz') {
|
|
|
|
powershell '''
|
2020-05-28 16:47:29 +00:00
|
|
|
cd $env:WORKSPACE
|
2019-09-03 13:51:41 +00:00
|
|
|
$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
|
2020-05-28 16:47:29 +00:00
|
|
|
Compress-Archive -Path "bundles/CIDUT.out", "bundles/CIDUT.err", "bundles/junit-report-*.xml" -CompressionLevel Optimal -DestinationPath "${bundleName}-bundles.zip"
|
2019-09-03 13:51:41 +00:00
|
|
|
'''
|
|
|
|
|
|
|
|
archiveArtifacts artifacts: '*-bundles.zip', allowEmptyArchive: true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
cleanup {
|
|
|
|
sh 'make clean'
|
|
|
|
deleteDir()
|
|
|
|
}
|
|
|
|
}
|
2019-08-02 15:34:38 +00:00
|
|
|
}
|
2020-09-15 19:33:04 +00:00
|
|
|
stage('win-2022') {
|
2019-09-02 10:32:18 +00:00
|
|
|
when {
|
|
|
|
beforeAgent true
|
2020-09-15 19:33:04 +00:00
|
|
|
expression { params.windows2022 }
|
2019-09-02 10:32:18 +00:00
|
|
|
}
|
|
|
|
environment {
|
|
|
|
DOCKER_BUILDKIT = '0'
|
|
|
|
DOCKER_DUT_DEBUG = '1'
|
|
|
|
SKIP_VALIDATION_TESTS = '1'
|
|
|
|
SOURCES_DRIVE = 'd'
|
|
|
|
SOURCES_SUBDIR = 'gopath'
|
|
|
|
TESTRUN_DRIVE = 'd'
|
|
|
|
TESTRUN_SUBDIR = "CI"
|
2021-08-20 12:48:08 +00:00
|
|
|
WINDOWS_BASE_IMAGE = 'mcr.microsoft.com/windows/servercore'
|
|
|
|
// Available tags can be found at https://mcr.microsoft.com/v2/windows/servercore/tags/list
|
|
|
|
WINDOWS_BASE_IMAGE_TAG = 'ltsc2022'
|
2019-09-02 10:32:18 +00:00
|
|
|
}
|
|
|
|
agent {
|
|
|
|
node {
|
|
|
|
customWorkspace 'd:\\gopath\\src\\github.com\\docker\\docker'
|
2020-09-15 19:33:04 +00:00
|
|
|
label 'windows-2022'
|
2019-09-02 10:32:18 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
stages {
|
|
|
|
stage("Print info") {
|
|
|
|
steps {
|
|
|
|
sh 'docker version'
|
|
|
|
sh 'docker info'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage("Run tests") {
|
|
|
|
steps {
|
|
|
|
powershell '''
|
|
|
|
$ErrorActionPreference = 'Stop'
|
|
|
|
Invoke-WebRequest https://github.com/moby/docker-ci-zap/blob/master/docker-ci-zap.exe?raw=true -OutFile C:/Windows/System32/docker-ci-zap.exe
|
|
|
|
./hack/ci/windows.ps1
|
|
|
|
exit $LastExitCode
|
|
|
|
'''
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
post {
|
|
|
|
always {
|
2020-02-12 11:29:40 +00:00
|
|
|
junit testResults: 'bundles/junit-report-*.xml', allowEmptyResults: true
|
2019-09-02 10:32:18 +00:00
|
|
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE', message: 'Failed to create bundles.zip') {
|
|
|
|
powershell '''
|
|
|
|
cd $env:WORKSPACE
|
2020-09-15 19:33:04 +00:00
|
|
|
$bundleName="win-2022-integration"
|
2019-09-02 10:32:18 +00:00
|
|
|
Write-Host -ForegroundColor Green "Creating ${bundleName}-bundles.zip"
|
|
|
|
|
|
|
|
# archiveArtifacts does not support env-vars to , so save the artifacts in a fixed location
|
2020-02-12 11:29:40 +00:00
|
|
|
Compress-Archive -Path "bundles/CIDUT.out", "bundles/CIDUT.err", "bundles/junit-report-*.xml" -CompressionLevel Optimal -DestinationPath "${bundleName}-bundles.zip"
|
2019-09-02 10:32:18 +00:00
|
|
|
'''
|
|
|
|
|
|
|
|
archiveArtifacts artifacts: '*-bundles.zip', allowEmptyArchive: true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
cleanup {
|
|
|
|
sh 'make clean'
|
|
|
|
deleteDir()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2021-06-16 08:27:37 +00:00
|
|
|
stage('win-2022-c8d') {
|
|
|
|
when {
|
|
|
|
beforeAgent true
|
|
|
|
expression { params.windows2022containerd }
|
|
|
|
}
|
|
|
|
environment {
|
|
|
|
DOCKER_BUILDKIT = '0'
|
|
|
|
DOCKER_DUT_DEBUG = '1'
|
|
|
|
SKIP_VALIDATION_TESTS = '1'
|
|
|
|
SOURCES_DRIVE = 'd'
|
|
|
|
SOURCES_SUBDIR = 'gopath'
|
|
|
|
TESTRUN_DRIVE = 'd'
|
|
|
|
TESTRUN_SUBDIR = "CI"
|
2021-08-20 12:48:08 +00:00
|
|
|
WINDOWS_BASE_IMAGE = 'mcr.microsoft.com/windows/servercore'
|
|
|
|
// Available tags can be found at https://mcr.microsoft.com/v2/windows/servercore/tags/list
|
|
|
|
WINDOWS_BASE_IMAGE_TAG = 'ltsc2022'
|
2021-06-16 08:27:37 +00:00
|
|
|
DOCKER_WINDOWS_CONTAINERD_RUNTIME = '1'
|
|
|
|
}
|
|
|
|
agent {
|
|
|
|
node {
|
|
|
|
customWorkspace 'd:\\gopath\\src\\github.com\\docker\\docker'
|
|
|
|
label 'windows-2022'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stages {
|
|
|
|
stage("Print info") {
|
|
|
|
steps {
|
|
|
|
sh 'docker version'
|
|
|
|
sh 'docker info'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage("Run tests") {
|
|
|
|
steps {
|
|
|
|
powershell '''
|
|
|
|
$ErrorActionPreference = 'Stop'
|
|
|
|
Invoke-WebRequest https://github.com/moby/docker-ci-zap/blob/master/docker-ci-zap.exe?raw=true -OutFile C:/Windows/System32/docker-ci-zap.exe
|
|
|
|
./hack/ci/windows.ps1
|
|
|
|
exit $LastExitCode
|
|
|
|
'''
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
post {
|
|
|
|
always {
|
|
|
|
junit testResults: 'bundles/junit-report-*.xml', allowEmptyResults: true
|
|
|
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE', message: 'Failed to create bundles.zip') {
|
|
|
|
powershell '''
|
|
|
|
cd $env:WORKSPACE
|
|
|
|
$bundleName="win-2022-c8d-integration"
|
|
|
|
Write-Host -ForegroundColor Green "Creating ${bundleName}-bundles.zip"
|
|
|
|
|
|
|
|
# archiveArtifacts does not support env-vars to , so save the artifacts in a fixed location
|
2020-09-21 19:21:22 +00:00
|
|
|
Compress-Archive -Path "bundles/CIDUT.out", "bundles/CIDUT.err", "bundles/containerd.out", "bundles/containerd.err", "bundles/junit-report-*.xml" -CompressionLevel Optimal -DestinationPath "${bundleName}-bundles.zip"
|
2021-06-16 08:27:37 +00:00
|
|
|
'''
|
|
|
|
|
|
|
|
archiveArtifacts artifacts: '*-bundles.zip', allowEmptyArchive: true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
cleanup {
|
|
|
|
sh 'make clean'
|
|
|
|
deleteDir()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-01-10 20:08:10 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-07-25 01:25:16 +00:00
|
|
|
}
|