Skip to content
This repository has been archived by the owner on Oct 13, 2023. It is now read-only.

[19.03 backport] Testing and Jenkinsfile changes [step 1] #382

Merged
merged 59 commits into from
Sep 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
c953304
Integration: remove unneeded platform check for IPVLAN tests
thaJeztah Jun 28, 2019
0c8bc0b
Integration: remove "experimental" option for IPVLAN test-daemons
thaJeztah Jun 28, 2019
0378afa
Integration: IPVlan add missing import comment
thaJeztah Jun 28, 2019
1710bba
Integration: exclude IPVlan test-suite on Windows
thaJeztah Jul 11, 2019
8c8de17
Integration: remove redundant kernel version check for MACVlan
thaJeztah Jun 28, 2019
edeff03
Integration: MACVlan add missing import comment and build-tag
thaJeztah Jun 28, 2019
f76cb3e
integration-cli: remove ExecSupport check
thaJeztah Jul 8, 2019
a63a02f
integration-cli: remove defaultSleepImage constant
thaJeztah Jul 8, 2019
e286096
integration-cli: remove unused requirements utils
thaJeztah Jul 8, 2019
3441811
Add (hidden) flags to set containerd namespaces
cpuguy83 Jul 11, 2019
ad8327f
integration: fix cleanup of raft data
thaJeztah Jul 12, 2019
05c096a
Don't log test initial test daemon ping failures
cpuguy83 Jul 12, 2019
eeeb2e9
Fix Microsecond -> Milisecond.
cpuguy83 Jul 13, 2019
bf212c5
DockerSwarmSuite lock portIndex to work around race
thaJeztah Jul 13, 2019
7e76438
Be more conservative for Windows in TestFrequency for Splunk
ddebroy Jul 17, 2019
1d795b5
integration: run build session tests on non-experimental
thaJeztah Jul 17, 2019
1204f3a
integration-cli: increase healthcheck timeout
tonistiigi Jul 18, 2019
2ebfdfd
Retry service updates on out of sequence errors
dperny Jul 18, 2019
a768bf8
integration-cli: remove redundant "testrequires"
thaJeztah Jul 19, 2019
24395d5
Better logging for swarm tests
cpuguy83 Jul 24, 2019
3163908
hack: Remove inContainer check, it wasn't useful
seemethere Jul 24, 2019
1da2e90
fix some spelling mistakes
SataQiu Aug 13, 2019
14d561e
integration: simplify parallel run destination
thaJeztah Aug 23, 2019
517ebe6
integration: use gotestsum to generate junit.xml and go-test-report.json
thaJeztah Aug 11, 2019
48e8f18
integration: test2json: enable timestamps to fix zero-time test durat…
thaJeztah Aug 23, 2019
5d4f5db
integration: improve package- and filename for junit.xml
thaJeztah Aug 23, 2019
08573e2
Jenkinsfile: add TESTDEBUG
thaJeztah Aug 23, 2019
b8b8bcb
Dockerfile: update CRIU to v3.12
thaJeztah Aug 14, 2019
6d7d877
Fix testcase name
ostrosablin Aug 20, 2019
79e5950
pkg/term: refactor TestEscapeProxyRead
thaJeztah Aug 27, 2019
1d91898
integration: windows.ps1: turn defender error into a warning
thaJeztah Aug 27, 2019
45f49fe
TestDispatch: refactor to use subtests again, and fix linting (struct…
thaJeztah Aug 27, 2019
e8e2666
integration-cli: getContainerCount() fix trimming prefix
thaJeztah Aug 28, 2019
93b38b8
Fix docker inspect for dutimgVersion
StefanScherer Aug 30, 2019
69da36f
hack/make/binary-daemon: fix some linting issues
thaJeztah Aug 31, 2019
ae7858f
integration-cli: fix some bashism's in Dockerfiles
thaJeztah Sep 2, 2019
24181cd
TestBuildSquashParent: fix non-standard comparisson
thaJeztah Sep 2, 2019
b116452
docker-py: skip flaky AttachContainerTest::test_attach_no_stream
thaJeztah Sep 2, 2019
d588295
TestCase: use `icmd.RunCmd` instead `icmd.StartCmd`
tao12345666333 Sep 2, 2019
4329550
hack/ci/windows.ps1: explicitly set exit code to result of tests
thaJeztah Sep 2, 2019
ff26a23
hack/ci/windows.ps1 print all environment variables to check how Jenk…
thaJeztah Sep 6, 2019
a365f07
Jenkinsfile: create bundles for Windows stages
thaJeztah Sep 3, 2019
e101935
Jenkinsfile: Windows: enabled debug-mode for daemon under test
thaJeztah Sep 3, 2019
5d74bd7
Jenkinsfile hack for auto-cancellation.
psftw Sep 3, 2019
a163856
integration-cli: update TestCreateWithWorkdir for Hyper-V isolation
thaJeztah Sep 4, 2019
b9f2e88
hack/ci/windows.ps1: add support for DOCKER_STORAGE_OPTS
thaJeztah Sep 4, 2019
d53f67b
hack/ci/windows.ps1: stop tailing logs after stopping the daemon
thaJeztah Sep 6, 2019
884551a
Dockerfile.windows: trim .0 from Go versions
thaJeztah Jul 20, 2019
6fdd837
hack/ci/windows.ps1: fix Go version check (due to trailing .0)
thaJeztah Sep 6, 2019
0459d8c
integration: TestInspect(): use swarm.RunningTasksCount
thaJeztah Sep 9, 2019
eba485a
Fix Service TTY test so signal handlers work
cpuguy83 Sep 9, 2019
55aadb3
integration-cli: swarm.RestartNode(); don't load busybox again
thaJeztah Sep 9, 2019
c2b84fd
integration-cli: add daemon.StartNodeWithBusybox function
thaJeztah Sep 9, 2019
de3a04a
Windows: skip flaky TestLogBlocking
thaJeztah Sep 9, 2019
06cca53
Dockerfile: remove GOMETALINTER_OPTS
thaJeztah Sep 11, 2019
35e9ee8
integration-cli: Skip TestAPIImagesSaveAndLoad on RS3 and older
thaJeztah Sep 11, 2019
168e23a
Zap a fixed folder, add build number to folder inside
StefanScherer Sep 12, 2019
183cac2
awslogs: fix flaky TestLogBlocking unit test
samuelkarp Sep 20, 2019
dfadf72
Jenkinsfile: move integration step cleanup to amd64 where it was inte…
Sep 24, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ RUN sed -ri "s/(httpredir|deb).debian.org/${APT_MIRROR:-deb.debian.org}/g" /etc/
FROM base AS criu
ARG DEBIAN_FRONTEND
# Install CRIU for checkpoint/restore support
ENV CRIU_VERSION 3.11
ENV CRIU_VERSION 3.12
# Install dependency packages specific to criu
RUN apt-get update && apt-get install -y --no-install-recommends \
libnet-dev \
Expand Down Expand Up @@ -281,8 +281,6 @@ COPY --from=djs55/vpnkit@sha256:e508a17cfacc8fd39261d5b4e397df2b953690da577e2c98

ENV PATH=/usr/local/cli:$PATH
ENV DOCKER_BUILDTAGS apparmor seccomp selinux
# Options for hack/validate/gometalinter
ENV GOMETALINTER_OPTS="--deadline=2m"
WORKDIR /go/src/github.com/docker/docker
VOLUME /var/lib/docker
# Wrap all commands in the "docker-in-docker" script to allow nested containers
Expand Down
3 changes: 2 additions & 1 deletion Dockerfile.windows
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,8 @@ RUN `
Download-File $location C:\gitsetup.zip; `
`
Write-Host INFO: Downloading go...; `
Download-File $('https://golang.org/dl/go'+$Env:GO_VERSION+'.windows-amd64.zip') C:\go.zip; `
$dlGoVersion=$Env:GO_VERSION -replace '\.0$',''; `
Download-File "https://golang.org/dl/go${dlGoVersion}.windows-amd64.zip" C:\go.zip; `
`
Write-Host INFO: Downloading compiler 1 of 3...; `
Download-File https://raw.githubusercontent.com/jhowardmsft/docker-tdmgcc/master/gcc.zip C:\gcc.zip; `
Expand Down
104 changes: 91 additions & 13 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,27 @@ pipeline {
DOCKER_GRAPHDRIVER = 'overlay2'
APT_MIRROR = 'cdn-fastly.deb.debian.org'
CHECK_CONFIG_COMMIT = '78405559cfe5987174aa2cb6463b9b2c1b917255'
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.skip_dco }
}
agent { label 'linux' }
agent { label 'amd64 && ubuntu-1804 && overlay2' }
steps {
sh '''
docker run --rm \
Expand Down Expand Up @@ -257,13 +269,13 @@ pipeline {
run_tests() {
[ -n "$TESTDEBUG" ] && rm= || rm=--rm;
docker run $rm -t --privileged \
-v "$WORKSPACE/bundles:/go/src/github.com/docker/docker/bundles" \
-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_INTEGRATION_DEST \
-e TEST_SKIP_INTEGRATION \
-e TEST_SKIP_INTEGRATION_CLI \
-e DOCKER_GITCOMMIT=${GIT_COMMIT} \
Expand Down Expand Up @@ -308,14 +320,20 @@ pipeline {
exit $c
'''
}
post {
always {
junit testResults: 'bundles/**/*-report.xml', allowEmptyResults: true
}
}
}
}

post {
always {
sh '''
echo "Ensuring container killed."
docker rm -vf docker-pr$BUILD_NUMBER || true
cids=$(docker ps -aq -f name=docker-pr${BUILD_NUMBER}-*)
[ -n "$cids" ] && docker rm -vf $cids || true
'''

sh '''
Expand All @@ -328,7 +346,7 @@ pipeline {
bundleName=amd64
echo "Creating ${bundleName}-bundles.tar.gz"
# exclude overlay2 directories
find bundles -path '*/root/*overlay2' -prune -o -type f \\( -name '*.log' -o -name '*.prof' \\) -print | xargs tar -czf ${bundleName}-bundles.tar.gz
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
Expand Down Expand Up @@ -397,6 +415,7 @@ pipeline {
-e DOCKER_EXPERIMENTAL \
-e DOCKER_GITCOMMIT=${GIT_COMMIT} \
-e DOCKER_GRAPHDRIVER \
-e TESTDEBUG \
-e TEST_SKIP_INTEGRATION_CLI \
-e TIMEOUT \
docker:${GIT_COMMIT} \
Expand All @@ -405,6 +424,11 @@ pipeline {
test-integration
'''
}
post {
always {
junit testResults: 'bundles/**/*-report.xml', allowEmptyResults: true
}
}
}
}

Expand All @@ -425,7 +449,7 @@ pipeline {
bundleName=s390x-integration
echo "Creating ${bundleName}-bundles.tar.gz"
# exclude overlay2 directories
find bundles -path '*/root/*overlay2' -prune -o -type f \\( -name '*.log' -o -name '*.prof' \\) -print | xargs tar -czf ${bundleName}-bundles.tar.gz
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
Expand Down Expand Up @@ -483,6 +507,11 @@ pipeline {
test-integration
'''
}
post {
always {
junit testResults: 'bundles/**/*-report.xml', allowEmptyResults: true
}
}
}
}

Expand All @@ -503,7 +532,7 @@ pipeline {
bundleName=s390x-integration-cli
echo "Creating ${bundleName}-bundles.tar.gz"
# exclude overlay2 directories
find bundles -path '*/root/*overlay2' -prune -o -type f \\( -name '*.log' -o -name '*.prof' \\) -print | xargs tar -czf ${bundleName}-bundles.tar.gz
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
Expand Down Expand Up @@ -570,6 +599,7 @@ pipeline {
-e DOCKER_EXPERIMENTAL \
-e DOCKER_GITCOMMIT=${GIT_COMMIT} \
-e DOCKER_GRAPHDRIVER \
-e TESTDEBUG \
-e TEST_SKIP_INTEGRATION_CLI \
-e TIMEOUT \
docker:${GIT_COMMIT} \
Expand All @@ -578,6 +608,11 @@ pipeline {
test-integration
'''
}
post {
always {
junit testResults: 'bundles/**/*-report.xml', allowEmptyResults: true
}
}
}
}

Expand All @@ -598,7 +633,7 @@ pipeline {
bundleName=ppc64le-integration
echo "Creating ${bundleName}-bundles.tar.gz"
# exclude overlay2 directories
find bundles -path '*/root/*overlay2' -prune -o -type f \\( -name '*.log' -o -name '*.prof' \\) -print | xargs tar -czf ${bundleName}-bundles.tar.gz
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
Expand Down Expand Up @@ -654,6 +689,11 @@ pipeline {
test-integration
'''
}
post {
always {
junit testResults: 'bundles/**/*-report.xml', allowEmptyResults: true
}
}
}
}

Expand All @@ -662,8 +702,6 @@ pipeline {
sh '''
echo "Ensuring container killed."
docker rm -vf docker-pr$BUILD_NUMBER || true
cids=$(docker ps -aq -f name=docker-pr${BUILD_NUMBER}-*)
[ -n "$cids" ] && docker rm -vf $cids || true
'''

sh '''
Expand All @@ -676,7 +714,7 @@ pipeline {
bundleName=ppc64le-integration-cli
echo "Creating ${bundleName}-bundles.tar.gz"
# exclude overlay2 directories
find bundles -path '*/root/*overlay2' -prune -o -type f \\( -name '*.log' -o -name '*.prof' \\) -print | xargs tar -czf ${bundleName}-bundles.tar.gz
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
Expand All @@ -699,11 +737,12 @@ pipeline {
}
environment {
DOCKER_BUILDKIT = '0'
DOCKER_DUT_DEBUG = '1'
SKIP_VALIDATION_TESTS = '1'
SOURCES_DRIVE = 'd'
SOURCES_SUBDIR = 'gopath'
TESTRUN_DRIVE = 'd'
TESTRUN_SUBDIR = "CI-$BUILD_NUMBER"
TESTRUN_SUBDIR = "CI"
WINDOWS_BASE_IMAGE = 'mcr.microsoft.com/windows/servercore'
WINDOWS_BASE_IMAGE_TAG = 'ltsc2016'
}
Expand Down Expand Up @@ -732,6 +771,25 @@ pipeline {
}
}
}
post {
always {
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE', message: 'Failed to create bundles.tar.gz') {
powershell '''
$bundleName="windowsRS1-integration"
Write-Host -ForegroundColor Green "Creating ${bundleName}-bundles.zip"

# archiveArtifacts does not support env-vars to , so save the artifacts in a fixed location
Compress-Archive -Path "${env:TEMP}/CIDUT.out", "${env:TEMP}/CIDUT.err" -CompressionLevel Optimal -DestinationPath "${bundleName}-bundles.zip"
'''

archiveArtifacts artifacts: '*-bundles.zip', allowEmptyArchive: true
}
}
cleanup {
sh 'make clean'
deleteDir()
}
}
}
stage('win-RS5') {
when {
Expand All @@ -740,11 +798,12 @@ pipeline {
}
environment {
DOCKER_BUILDKIT = '0'
DOCKER_DUT_DEBUG = '1'
SKIP_VALIDATION_TESTS = '1'
SOURCES_DRIVE = 'd'
SOURCES_SUBDIR = 'gopath'
TESTRUN_DRIVE = 'd'
TESTRUN_SUBDIR = "CI-$BUILD_NUMBER"
TESTRUN_SUBDIR = "CI"
WINDOWS_BASE_IMAGE = 'mcr.microsoft.com/windows/servercore'
WINDOWS_BASE_IMAGE_TAG = 'ltsc2019'
}
Expand Down Expand Up @@ -772,6 +831,25 @@ pipeline {
}
}
}
post {
always {
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE', message: 'Failed to create bundles.tar.gz') {
powershell '''
$bundleName="windowsRS5-integration"
Write-Host -ForegroundColor Green "Creating ${bundleName}-bundles.zip"

# archiveArtifacts does not support env-vars to , so save the artifacts in a fixed location
Compress-Archive -Path "${env:TEMP}/CIDUT.out", "${env:TEMP}/CIDUT.err" -CompressionLevel Optimal -DestinationPath "${bundleName}-bundles.zip"
'''

archiveArtifacts artifacts: '*-bundles.zip', allowEmptyArchive: true
}
}
cleanup {
sh 'make clean'
deleteDir()
}
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
# still stumble into him in our issue tracker, or on IRC.
"erikh",

# Evan Hazlett is the creator of of the Shipyard and Interlock open source projects,
# Evan Hazlett is the creator of the Shipyard and Interlock open source projects,
# and the author of "Orca", which became the foundation of Docker Universal Control
# Plane (UCP). As a maintainer, Evan helped integrating SwarmKit (secrets, tasks)
# into the Docker engine.
Expand Down
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ DOCKER_ENVS := \
-e DOCKER_TEST_HOST \
-e DOCKER_USERLANDPROXY \
-e DOCKERD_ARGS \
-e TEST_INTEGRATION_DEST \
-e TEST_INTEGRATION_DIR \
-e TEST_SKIP_INTEGRATION \
-e TEST_SKIP_INTEGRATION_CLI \
Expand Down
2 changes: 1 addition & 1 deletion api/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3262,7 +3262,7 @@ definitions:

<p><br /></p>

- "ingress" makes the target port accessible on on every node,
- "ingress" makes the target port accessible on every node,
regardless of whether there is a task for the service running on
that node or not.
- "host" bypasses the routing mesh and publish the port directly on
Expand Down
Loading