1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324 |
- #!groovy
- pipeline {
- agent none
- options {
- buildDiscarder(logRotator(daysToKeepStr: '30'))
- timeout(time: 2, unit: 'HOURS')
- timestamps()
- }
- parameters {
- booleanParam(name: 'unit_validate', defaultValue: true, description: 'amd64 (x86_64) unit tests and vendor check')
- booleanParam(name: 'validate_force', defaultValue: false, description: 'force validation steps to be run, even if no changes were detected')
- booleanParam(name: 'amd64', defaultValue: true, description: 'amd64 (x86_64) Build/Test')
- booleanParam(name: 'rootless', defaultValue: true, description: 'amd64 (x86_64) Build/Test (Rootless mode)')
- booleanParam(name: 'cgroup2', defaultValue: true, description: 'amd64 (x86_64) Build/Test (cgroup v2)')
- booleanParam(name: 'arm64', defaultValue: true, description: 'ARM (arm64) Build/Test')
- booleanParam(name: 's390x', defaultValue: false, description: 'IBM Z (s390x) Build/Test')
- booleanParam(name: 'ppc64le', defaultValue: false, description: 'PowerPC (ppc64le) Build/Test')
- booleanParam(name: 'windowsRS1', defaultValue: false, description: 'Windows 2016 (RS1) Build/Test')
- booleanParam(name: 'windowsRS5', defaultValue: true, description: 'Windows 2019 (RS5) Build/Test')
- booleanParam(name: 'windows2022', defaultValue: true, description: 'Windows 2022 (LTSC) Build/Test')
- booleanParam(name: 'windows2022containerd', defaultValue: true, description: 'Windows 2022 (LTSC) with containerd Build/Test')
- booleanParam(name: 'dco', defaultValue: true, description: 'Run the DCO check')
- }
- environment {
- DOCKER_BUILDKIT = '1'
- DOCKER_EXPERIMENTAL = '1'
- DOCKER_GRAPHDRIVER = 'overlay2'
- APT_MIRROR = 'cdn-fastly.deb.debian.org'
- CHECK_CONFIG_COMMIT = '33a3680e08d1007e72c3b3f1454f823d8e9948ee'
- TESTDEBUG = '0'
- TIMEOUT = '120m'
- }
- stages {
- 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)
- }
- }
- }
- stage('DCO-check') {
- when {
- beforeAgent true
- expression { params.dco }
- }
- agent { label 'amd64 && ubuntu-1804 && overlay2' }
- steps {
- sh '''
- docker run --rm \
- -v "$WORKSPACE:/workspace" \
- -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'
- '''
- }
- }
- stage('Build') {
- parallel {
- stage('unit-validate') {
- when {
- beforeAgent true
- expression { params.unit_validate }
- }
- agent { label 'amd64 && ubuntu-1804 && overlay2' }
- 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'
- }
- 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 --build-arg CROSS=true -t docker:${GIT_COMMIT} .'
- }
- }
- 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 \
- -e DOCKER_EXPERIMENTAL \
- -e DOCKER_GITCOMMIT=${GIT_COMMIT} \
- -e DOCKER_GRAPHDRIVER \
- -e TEST_FORCE_VALIDATE \
- -e VALIDATE_REPO=${GIT_URL} \
- -e VALIDATE_BRANCH=${CHANGE_TARGET} \
- docker:${GIT_COMMIT} \
- hack/validate/default
- '''
- }
- }
- 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 \
- -e DOCKER_EXPERIMENTAL \
- -e DOCKER_GITCOMMIT=${GIT_COMMIT} \
- -e DOCKER_GRAPHDRIVER \
- -e VALIDATE_REPO=${GIT_URL} \
- -e VALIDATE_BRANCH=${CHANGE_TARGET} \
- docker:${GIT_COMMIT} \
- hack/make.sh \
- dynbinary \
- test-docker-py
- '''
- }
- post {
- always {
- junit testResults: 'bundles/test-docker-py/junit-report.xml', allowEmptyResults: true
- 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=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
- }
- }
- }
- }
- stage("Static") {
- 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
- '''
- }
- }
- 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
- stage("Unit tests") {
- steps {
- sh '''
- sudo modprobe ip6table_filter
- '''
- sh '''
- docker run --rm -t --privileged \
- -v "$WORKSPACE/bundles:/go/src/github.com/docker/docker/bundles" \
- --name docker-pr$BUILD_NUMBER \
- -e DOCKER_EXPERIMENTAL \
- -e DOCKER_GITCOMMIT=${GIT_COMMIT} \
- -e DOCKER_GRAPHDRIVER \
- -e VALIDATE_REPO=${GIT_URL} \
- -e VALIDATE_BRANCH=${CHANGE_TARGET} \
- docker:${GIT_COMMIT} \
- hack/test/unit
- '''
- }
- post {
- always {
- junit testResults: 'bundles/junit-report*.xml', allowEmptyResults: true
- }
- }
- }
- stage("Validate vendor") {
- steps {
- sh '''
- docker run --rm -t --privileged \
- -v "$WORKSPACE/.git:/go/src/github.com/docker/docker/.git" \
- --name docker-pr$BUILD_NUMBER \
- -e DOCKER_EXPERIMENTAL \
- -e DOCKER_GITCOMMIT=${GIT_COMMIT} \
- -e DOCKER_GRAPHDRIVER \
- -e TEST_FORCE_VALIDATE \
- -e VALIDATE_REPO=${GIT_URL} \
- -e VALIDATE_BRANCH=${CHANGE_TARGET} \
- docker:${GIT_COMMIT} \
- hack/validate/vendor
- '''
- }
- }
- }
- 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=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
- '''
- archiveArtifacts artifacts: '*-bundles.tar.gz', allowEmptyArchive: true
- }
- }
- cleanup {
- sh 'make clean'
- deleteDir()
- }
- }
- }
- stage('amd64') {
- when {
- beforeAgent true
- expression { params.amd64 }
- }
- 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 '''
- # todo: include ip_vs in base image
- sudo modprobe ip_vs
- docker build --force-rm --build-arg APT_MIRROR -t docker:${GIT_COMMIT} .
- '''
- }
- }
- stage("Run tests") {
- steps {
- sh '''#!/bin/bash
- # bash is needed so 'jobs -p' works properly
- # it also accepts setting inline envvars for functions without explicitly exporting
- set -x
- run_tests() {
- [ -n "$TESTDEBUG" ] && rm= || rm=--rm;
- docker run $rm -t --privileged \
- -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" \
- -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 \
- -e TIMEOUT \
- -e VALIDATE_REPO=${GIT_URL} \
- -e VALIDATE_BRANCH=${CHANGE_TARGET} \
- 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
- 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 ${CONTAINER_NAME}-build \
- -e DOCKER_EXPERIMENTAL \
- -e DOCKER_GITCOMMIT=${GIT_COMMIT} \
- -e DOCKER_GRAPHDRIVER \
- docker:${GIT_COMMIT} \
- hack/make.sh \
- dynbinary
- # 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
- 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 &
- # integration-cli second set
- TEST_INTEGRATION_DEST=3 CONTAINER_NAME=${CONTAINER_NAME}-3 TEST_SKIP_INTEGRATION=1 TESTFLAGS="-test.run Test(DockerSwarmSuite|DockerDaemonSuite|DockerExternalVolumeSuite)/" run_tests &
- c=0
- for job in $(jobs -p); do
- wait ${job} || c=$?
- done
- exit $c
- '''
- }
- post {
- always {
- junit testResults: 'bundles/**/*-report.xml', allowEmptyResults: true
- }
- }
- }
- }
- post {
- always {
- sh '''
- echo "Ensuring container killed."
- cids=$(docker ps -aq -f name=docker-pr${BUILD_NUMBER}-*)
- [ -n "$cids" ] && docker rm -vf $cids || 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
- 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()
- }
- }
- }
- 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()
- }
- }
- }
- 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()
- }
- }
- }
- stage('s390x') {
- when {
- beforeAgent true
- // Skip this stage on PRs unless the checkbox is selected
- anyOf {
- not { changeRequest() }
- expression { params.s390x }
- }
- }
- agent { label 's390x-ubuntu-2004' }
- 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("Unit tests") {
- steps {
- sh '''
- sudo modprobe ip6table_filter
- '''
- sh '''
- docker run --rm -t --privileged \
- -v "$WORKSPACE/bundles:/go/src/github.com/docker/docker/bundles" \
- --name docker-pr$BUILD_NUMBER \
- -e DOCKER_EXPERIMENTAL \
- -e DOCKER_GITCOMMIT=${GIT_COMMIT} \
- -e DOCKER_GRAPHDRIVER \
- -e VALIDATE_REPO=${GIT_URL} \
- -e VALIDATE_BRANCH=${CHANGE_TARGET} \
- docker:${GIT_COMMIT} \
- hack/test/unit
- '''
- }
- post {
- always {
- junit testResults: 'bundles/junit-report*.xml', allowEmptyResults: true
- }
- }
- }
- stage("Integration tests") {
- environment { 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_EXPERIMENTAL \
- -e DOCKER_GITCOMMIT=${GIT_COMMIT} \
- -e DOCKER_GRAPHDRIVER \
- -e TESTDEBUG \
- -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=s390x-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
- '''
- archiveArtifacts artifacts: '*-bundles.tar.gz', allowEmptyArchive: true
- }
- }
- cleanup {
- sh 'make clean'
- deleteDir()
- }
- }
- }
- stage('s390x integration-cli') {
- when {
- beforeAgent true
- not { changeRequest() }
- expression { params.s390x }
- }
- agent { label 's390x-ubuntu-2004' }
- 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-cli tests") {
- environment { TEST_SKIP_INTEGRATION = '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 TEST_SKIP_INTEGRATION \
- -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=s390x-integration-cli
- 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()
- }
- }
- }
- stage('ppc64le') {
- when {
- beforeAgent true
- // Skip this stage on PRs unless the checkbox is selected
- anyOf {
- not { changeRequest() }
- expression { params.ppc64le }
- }
- }
- agent { label 'ppc64le-ubuntu-1604' }
- // 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'
- }
- 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 '''
- make bundles/buildx
- bundles/buildx build --load --force-rm --build-arg APT_MIRROR -t docker:${GIT_COMMIT} .
- '''
- }
- }
- stage("Unit tests") {
- steps {
- sh '''
- sudo modprobe ip6table_filter
- '''
- sh '''
- docker run --rm -t --privileged \
- -v "$WORKSPACE/bundles:/go/src/github.com/docker/docker/bundles" \
- --name docker-pr$BUILD_NUMBER \
- -e DOCKER_EXPERIMENTAL \
- -e DOCKER_GITCOMMIT=${GIT_COMMIT} \
- -e DOCKER_GRAPHDRIVER \
- -e VALIDATE_REPO=${GIT_URL} \
- -e VALIDATE_BRANCH=${CHANGE_TARGET} \
- docker:${GIT_COMMIT} \
- hack/test/unit
- '''
- }
- post {
- always {
- junit testResults: 'bundles/junit-report*.xml', allowEmptyResults: true
- }
- }
- }
- stage("Integration tests") {
- environment { 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_EXPERIMENTAL \
- -e DOCKER_GITCOMMIT=${GIT_COMMIT} \
- -e DOCKER_GRAPHDRIVER \
- -e TESTDEBUG \
- -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=ppc64le-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
- '''
- archiveArtifacts artifacts: '*-bundles.tar.gz', allowEmptyArchive: true
- }
- }
- cleanup {
- sh 'make clean'
- deleteDir()
- }
- }
- }
- stage('ppc64le integration-cli') {
- when {
- beforeAgent true
- not { changeRequest() }
- expression { params.ppc64le }
- }
- agent { label 'ppc64le-ubuntu-1604' }
- // 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'
- }
- 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 '''
- make bundles/buildx
- bundles/buildx build --load --force-rm --build-arg APT_MIRROR -t docker:${GIT_COMMIT} .
- '''
- }
- }
- stage("Integration-cli tests") {
- environment { TEST_SKIP_INTEGRATION = '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 TEST_SKIP_INTEGRATION \
- -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=ppc64le-integration-cli
- 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()
- }
- }
- }
- stage('arm64') {
- when {
- beforeAgent true
- expression { params.arm64 }
- }
- agent { label 'arm64 && ubuntu-2004' }
- environment {
- TEST_SKIP_INTEGRATION_CLI = '1'
- }
- 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("Unit tests") {
- steps {
- sh '''
- sudo modprobe ip6table_filter
- '''
- sh '''
- docker run --rm -t --privileged \
- -v "$WORKSPACE/bundles:/go/src/github.com/docker/docker/bundles" \
- --name docker-pr$BUILD_NUMBER \
- -e DOCKER_EXPERIMENTAL \
- -e DOCKER_GITCOMMIT=${GIT_COMMIT} \
- -e DOCKER_GRAPHDRIVER \
- -e VALIDATE_REPO=${GIT_URL} \
- -e VALIDATE_BRANCH=${CHANGE_TARGET} \
- docker:${GIT_COMMIT} \
- hack/test/unit
- '''
- }
- post {
- always {
- junit testResults: 'bundles/junit-report*.xml', allowEmptyResults: true
- }
- }
- }
- stage("Integration tests") {
- environment { 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_EXPERIMENTAL \
- -e DOCKER_GITCOMMIT=${GIT_COMMIT} \
- -e DOCKER_GRAPHDRIVER \
- -e TESTDEBUG \
- -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=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
- '''
- archiveArtifacts artifacts: '*-bundles.tar.gz', allowEmptyArchive: true
- }
- }
- cleanup {
- sh 'make clean'
- deleteDir()
- }
- }
- }
- stage('win-RS1') {
- when {
- beforeAgent true
- // Skip this stage on PRs unless the windowsRS1 checkbox is selected
- anyOf {
- not { changeRequest() }
- expression { params.windowsRS1 }
- }
- }
- environment {
- DOCKER_BUILDKIT = '0'
- DOCKER_DUT_DEBUG = '1'
- SKIP_VALIDATION_TESTS = '1'
- SOURCES_DRIVE = 'd'
- SOURCES_SUBDIR = 'gopath'
- TESTRUN_DRIVE = 'd'
- TESTRUN_SUBDIR = "CI"
- WINDOWS_BASE_IMAGE = 'mcr.microsoft.com/windows/servercore'
- WINDOWS_BASE_IMAGE_TAG = 'ltsc2016'
- }
- agent {
- node {
- customWorkspace 'd:\\gopath\\src\\github.com\\docker\\docker'
- label 'windows-2016'
- }
- }
- stages {
- stage("Print info") {
- steps {
- sh 'docker version'
- sh 'docker info'
- }
- }
- stage("Run tests") {
- steps {
- powershell '''
- $ErrorActionPreference = 'Stop'
- [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
- 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.tar.gz') {
- powershell '''
- cd $env:WORKSPACE
- $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 "bundles/CIDUT.out", "bundles/CIDUT.err", "bundles/junit-report-*.xml" -CompressionLevel Optimal -DestinationPath "${bundleName}-bundles.zip"
- '''
- archiveArtifacts artifacts: '*-bundles.zip', allowEmptyArchive: true
- }
- }
- cleanup {
- sh 'make clean'
- deleteDir()
- }
- }
- }
- stage('win-RS5') {
- when {
- beforeAgent true
- expression { params.windowsRS5 }
- }
- environment {
- DOCKER_BUILDKIT = '0'
- DOCKER_DUT_DEBUG = '1'
- SKIP_VALIDATION_TESTS = '1'
- SOURCES_DRIVE = 'd'
- SOURCES_SUBDIR = 'gopath'
- TESTRUN_DRIVE = 'd'
- TESTRUN_SUBDIR = "CI"
- WINDOWS_BASE_IMAGE = 'mcr.microsoft.com/windows/servercore'
- WINDOWS_BASE_IMAGE_TAG = 'ltsc2019'
- }
- agent {
- node {
- customWorkspace 'd:\\gopath\\src\\github.com\\docker\\docker'
- label 'windows-2019'
- }
- }
- 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.tar.gz') {
- powershell '''
- cd $env:WORKSPACE
- $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 "bundles/CIDUT.out", "bundles/CIDUT.err", "bundles/junit-report-*.xml" -CompressionLevel Optimal -DestinationPath "${bundleName}-bundles.zip"
- '''
- archiveArtifacts artifacts: '*-bundles.zip', allowEmptyArchive: true
- }
- }
- cleanup {
- sh 'make clean'
- deleteDir()
- }
- }
- }
- stage('win-2022') {
- when {
- beforeAgent true
- expression { params.windows2022 }
- }
- environment {
- DOCKER_BUILDKIT = '0'
- DOCKER_DUT_DEBUG = '1'
- SKIP_VALIDATION_TESTS = '1'
- SOURCES_DRIVE = 'd'
- SOURCES_SUBDIR = 'gopath'
- TESTRUN_DRIVE = 'd'
- TESTRUN_SUBDIR = "CI"
- 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'
- }
- 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-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 "bundles/CIDUT.out", "bundles/CIDUT.err", "bundles/junit-report-*.xml" -CompressionLevel Optimal -DestinationPath "${bundleName}-bundles.zip"
- '''
- archiveArtifacts artifacts: '*-bundles.zip', allowEmptyArchive: true
- }
- }
- cleanup {
- sh 'make clean'
- deleteDir()
- }
- }
- }
- 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"
- 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'
- 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
- 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"
- '''
- archiveArtifacts artifacts: '*-bundles.zip', allowEmptyArchive: true
- }
- }
- cleanup {
- sh 'make clean'
- deleteDir()
- }
- }
- }
- }
- }
- }
- }
|