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-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-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
|
|
|
}
|
2021-10-15 17:27:40 +00:00
|
|
|
agent { label 'arm64 && ubuntu-2004' }
|
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} \
|
2022-04-13 13:58:55 +00:00
|
|
|
alpine sh -c 'apk add --no-cache -q bash git openssh-client && git config --system --add safe.directory /workspace && 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-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-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 '''
|
2022-11-29 10:59:09 +00:00
|
|
|
docker buildx build --load --force-rm --build-arg APT_MIRROR -t docker:${GIT_COMMIT} .
|
2019-08-16 23:39:10 +00:00
|
|
|
'''
|
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' }
|
|
|
|
|
|
|
|
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 '''
|
2022-11-29 10:59:09 +00:00
|
|
|
docker buildx build --load --force-rm --build-arg APT_MIRROR -t docker:${GIT_COMMIT} .
|
2019-08-16 23:39:10 +00:00
|
|
|
'''
|
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-01-10 20:08:10 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-07-25 01:25:16 +00:00
|
|
|
}
|