|
@@ -12,8 +12,9 @@ pipeline {
|
|
|
booleanParam(name: 'janky', defaultValue: true, description: 'x86 Build/Test')
|
|
|
booleanParam(name: 'z', defaultValue: true, description: 'IBM Z (s390x) Build/Test')
|
|
|
booleanParam(name: 'powerpc', defaultValue: true, description: 'PowerPC (ppc64le) Build/Test')
|
|
|
- booleanParam(name: 'windowsRS1', defaultValue: false, description: 'Windows 2016 (RS1) Build/Test')
|
|
|
- booleanParam(name: 'windowsRS5', defaultValue: false, description: 'Windows 2019 (RS5) Build/Test')
|
|
|
+ booleanParam(name: 'windowsRS1', defaultValue: true, description: 'Windows 2016 (RS1) Build/Test')
|
|
|
+ booleanParam(name: 'windowsRS5', defaultValue: true, description: 'Windows 2019 (RS5) Build/Test')
|
|
|
+ booleanParam(name: 'skip_dco', defaultValue: false, description: 'Skip the DCO check')
|
|
|
}
|
|
|
environment {
|
|
|
DOCKER_BUILDKIT = '1'
|
|
@@ -24,6 +25,20 @@ pipeline {
|
|
|
TIMEOUT = '120m'
|
|
|
}
|
|
|
stages {
|
|
|
+ stage('DCO-check') {
|
|
|
+ when {
|
|
|
+ beforeAgent true
|
|
|
+ expression { !params.skip_dco }
|
|
|
+ }
|
|
|
+ agent { label 'linux' }
|
|
|
+ steps {
|
|
|
+ sh '''
|
|
|
+ docker run --rm \
|
|
|
+ -v "$WORKSPACE:/workspace" \
|
|
|
+ alpine sh -c 'apk add --no-cache -q git bash && cd /workspace && hack/validate/dco'
|
|
|
+ '''
|
|
|
+ }
|
|
|
+ }
|
|
|
stage('Build') {
|
|
|
parallel {
|
|
|
stage('unit-validate') {
|
|
@@ -94,12 +109,15 @@ pipeline {
|
|
|
docker run --rm -v "$WORKSPACE:/workspace" busybox chown -R "$(id -u):$(id -g)" /workspace
|
|
|
'''
|
|
|
|
|
|
- sh '''
|
|
|
- echo 'Creating docker-py-bundles.tar.gz'
|
|
|
- tar -czf docker-py-bundles.tar.gz bundles/test-docker-py/*.xml bundles/test-docker-py/*.log
|
|
|
- '''
|
|
|
+ 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: 'docker-py-bundles.tar.gz'
|
|
|
+ archiveArtifacts artifacts: '*-bundles.tar.gz', allowEmptyArchive: true
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -185,12 +203,15 @@ pipeline {
|
|
|
docker run --rm -v "$WORKSPACE:/workspace" busybox chown -R "$(id -u):$(id -g)" /workspace
|
|
|
'''
|
|
|
|
|
|
- sh '''
|
|
|
- echo 'Creating unit-bundles.tar.gz'
|
|
|
- tar -czvf unit-bundles.tar.gz bundles/junit-report.xml bundles/go-test-report.json bundles/profile.out
|
|
|
- '''
|
|
|
+ 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: 'unit-bundles.tar.gz'
|
|
|
+ archiveArtifacts artifacts: '*-bundles.tar.gz', allowEmptyArchive: true
|
|
|
+ }
|
|
|
}
|
|
|
cleanup {
|
|
|
sh 'make clean'
|
|
@@ -302,13 +323,16 @@ pipeline {
|
|
|
docker run --rm -v "$WORKSPACE:/workspace" busybox chown -R "$(id -u):$(id -g)" /workspace
|
|
|
'''
|
|
|
|
|
|
- sh '''
|
|
|
- echo "Creating janky-bundles.tar.gz"
|
|
|
- # exclude overlay2 directories
|
|
|
- find bundles -path '*/root/*overlay2' -prune -o -type f \\( -name '*.log' -o -name '*.prof' \\) -print | xargs tar -czf janky-bundles.tar.gz
|
|
|
- '''
|
|
|
+ catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE', message: 'Failed to create bundles.tar.gz') {
|
|
|
+ sh '''
|
|
|
+ bundleName=janky
|
|
|
+ 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
|
|
|
+ '''
|
|
|
|
|
|
- archiveArtifacts artifacts: 'janky-bundles.tar.gz'
|
|
|
+ archiveArtifacts artifacts: '*-bundles.tar.gz', allowEmptyArchive: true
|
|
|
+ }
|
|
|
}
|
|
|
cleanup {
|
|
|
sh 'make clean'
|
|
@@ -396,13 +420,16 @@ pipeline {
|
|
|
docker run --rm -v "$WORKSPACE:/workspace" busybox chown -R "$(id -u):$(id -g)" /workspace
|
|
|
'''
|
|
|
|
|
|
- sh '''
|
|
|
- echo "Creating s390x-integration-bundles.tar.gz"
|
|
|
- # exclude overlay2 directories
|
|
|
- find bundles -path '*/root/*overlay2' -prune -o -type f \\( -name '*.log' -o -name '*.prof' \\) -print | xargs tar -czf s390x-integration-bundles.tar.gz
|
|
|
- '''
|
|
|
+ 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 '*.log' -o -name '*.prof' \\) -print | xargs tar -czf ${bundleName}-bundles.tar.gz
|
|
|
+ '''
|
|
|
|
|
|
- archiveArtifacts artifacts: 's390x-integration-bundles.tar.gz'
|
|
|
+ archiveArtifacts artifacts: '*-bundles.tar.gz', allowEmptyArchive: true
|
|
|
+ }
|
|
|
}
|
|
|
cleanup {
|
|
|
sh 'make clean'
|
|
@@ -471,12 +498,16 @@ pipeline {
|
|
|
docker run --rm -v "$WORKSPACE:/workspace" busybox chown -R "$(id -u):$(id -g)" /workspace
|
|
|
'''
|
|
|
|
|
|
- sh '''
|
|
|
- echo "Creating s390x-integration-cli-bundles.tar.gz"
|
|
|
- find bundles -path '*/root/*overlay2' -prune -o -type f \\( -name '*.log' -o -name '*.prof' \\) -print | xargs tar -czf s390x-integration-cli-bundles.tar.gz
|
|
|
- '''
|
|
|
+ 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 '*.log' -o -name '*.prof' \\) -print | xargs tar -czf ${bundleName}-bundles.tar.gz
|
|
|
+ '''
|
|
|
|
|
|
- archiveArtifacts artifacts: 's390x-integration-cli-bundles.tar.gz'
|
|
|
+ archiveArtifacts artifacts: '*-bundles.tar.gz', allowEmptyArchive: true
|
|
|
+ }
|
|
|
}
|
|
|
cleanup {
|
|
|
sh 'make clean'
|
|
@@ -562,13 +593,16 @@ pipeline {
|
|
|
docker run --rm -v "$WORKSPACE:/workspace" busybox chown -R "$(id -u):$(id -g)" /workspace
|
|
|
'''
|
|
|
|
|
|
- sh '''
|
|
|
- echo "Creating powerpc-integration-bundles.tar.gz"
|
|
|
- # exclude overlay2 directories
|
|
|
- find bundles -path '*/root/*overlay2' -prune -o -type f \\( -name '*.log' -o -name '*.prof' \\) -print | xargs tar -czf powerpc-integration-bundles.tar.gz
|
|
|
- '''
|
|
|
+ catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE', message: 'Failed to create bundles.tar.gz') {
|
|
|
+ sh '''
|
|
|
+ bundleName=powerpc-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
|
|
|
+ '''
|
|
|
|
|
|
- archiveArtifacts artifacts: 'powerpc-integration-bundles.tar.gz'
|
|
|
+ archiveArtifacts artifacts: '*-bundles.tar.gz', allowEmptyArchive: true
|
|
|
+ }
|
|
|
}
|
|
|
cleanup {
|
|
|
sh 'make clean'
|
|
@@ -635,12 +669,16 @@ pipeline {
|
|
|
docker run --rm -v "$WORKSPACE:/workspace" busybox chown -R "$(id -u):$(id -g)" /workspace
|
|
|
'''
|
|
|
|
|
|
- sh '''
|
|
|
- echo "Creating powerpc-integration-cli-bundles.tar.gz"
|
|
|
- find bundles -path '*/root/*overlay2' -prune -o -type f \\( -name '*.log' -o -name '*.prof' \\) -print | xargs tar -czf powerpc-integration-cli-bundles.tar.gz
|
|
|
- '''
|
|
|
+ catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE', message: 'Failed to create bundles.tar.gz') {
|
|
|
+ sh '''
|
|
|
+ bundleName=powerpc-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
|
|
|
+ '''
|
|
|
|
|
|
- archiveArtifacts artifacts: 'powerpc-integration-cli-bundles.tar.gz'
|
|
|
+ archiveArtifacts artifacts: '*-bundles.tar.gz', allowEmptyArchive: true
|
|
|
+ }
|
|
|
}
|
|
|
cleanup {
|
|
|
sh 'make clean'
|
|
@@ -653,10 +691,20 @@ pipeline {
|
|
|
beforeAgent true
|
|
|
expression { params.windowsRS1 }
|
|
|
}
|
|
|
+ environment {
|
|
|
+ DOCKER_BUILDKIT = '0'
|
|
|
+ SKIP_VALIDATION_TESTS = '1'
|
|
|
+ SOURCES_DRIVE = 'd'
|
|
|
+ SOURCES_SUBDIR = 'gopath'
|
|
|
+ TESTRUN_DRIVE = 'd'
|
|
|
+ TESTRUN_SUBDIR = "CI-$BUILD_NUMBER"
|
|
|
+ WINDOWS_BASE_IMAGE = 'mcr.microsoft.com/windows/servercore'
|
|
|
+ WINDOWS_BASE_IMAGE_TAG = 'ltsc2016'
|
|
|
+ }
|
|
|
agent {
|
|
|
node {
|
|
|
- label 'windows-rs1'
|
|
|
- customWorkspace 'c:\\gopath\\src\\github.com\\docker\\docker'
|
|
|
+ customWorkspace 'd:\\gopath\\src\\github.com\\docker\\docker'
|
|
|
+ label 'windows-2016'
|
|
|
}
|
|
|
}
|
|
|
stages {
|
|
@@ -670,7 +718,9 @@ pipeline {
|
|
|
steps {
|
|
|
powershell '''
|
|
|
$ErrorActionPreference = 'Stop'
|
|
|
- .\\hack\\ci\\windows.ps1
|
|
|
+ [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
|
|
|
+ Invoke-WebRequest https://github.com/jhowardmsft/docker-ci-zap/blob/master/docker-ci-zap.exe?raw=true -OutFile C:/Windows/System32/docker-ci-zap.exe
|
|
|
+ ./hack/ci/windows.ps1
|
|
|
exit $LastExitCode
|
|
|
'''
|
|
|
}
|
|
@@ -682,10 +732,20 @@ pipeline {
|
|
|
beforeAgent true
|
|
|
expression { params.windowsRS5 }
|
|
|
}
|
|
|
+ environment {
|
|
|
+ DOCKER_BUILDKIT = '0'
|
|
|
+ SKIP_VALIDATION_TESTS = '1'
|
|
|
+ SOURCES_DRIVE = 'd'
|
|
|
+ SOURCES_SUBDIR = 'gopath'
|
|
|
+ TESTRUN_DRIVE = 'd'
|
|
|
+ TESTRUN_SUBDIR = "CI-$BUILD_NUMBER"
|
|
|
+ WINDOWS_BASE_IMAGE = 'mcr.microsoft.com/windows/servercore'
|
|
|
+ WINDOWS_BASE_IMAGE_TAG = 'ltsc2019'
|
|
|
+ }
|
|
|
agent {
|
|
|
node {
|
|
|
- label 'windows-rs5'
|
|
|
- customWorkspace 'c:\\gopath\\src\\github.com\\docker\\docker'
|
|
|
+ customWorkspace 'd:\\gopath\\src\\github.com\\docker\\docker'
|
|
|
+ label 'windows-2019'
|
|
|
}
|
|
|
}
|
|
|
stages {
|
|
@@ -699,7 +759,8 @@ pipeline {
|
|
|
steps {
|
|
|
powershell '''
|
|
|
$ErrorActionPreference = 'Stop'
|
|
|
- .\\hack\\ci\\windows.ps1
|
|
|
+ Invoke-WebRequest https://github.com/jhowardmsft/docker-ci-zap/blob/master/docker-ci-zap.exe?raw=true -OutFile C:/Windows/System32/docker-ci-zap.exe
|
|
|
+ ./hack/ci/windows.ps1
|
|
|
exit $LastExitCode
|
|
|
'''
|
|
|
}
|