Browse code

Jenkinsfile: aarch64: sync with latest changes

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>

Sebastiaan van Stijn authored on 2019/08/15 08:11:21
Showing 1 changed files
... ...
@@ -781,7 +781,7 @@ pipeline {
781 781
                         }
782 782
                         stage("Build dev image") {
783 783
                             steps {
784
-                                sh 'docker build --force-rm --build-arg APT_MIRROR -t docker:${GIT_COMMIT} -f Dockerfile .'
784
+                                sh 'docker build --force-rm --build-arg APT_MIRROR -t docker:${GIT_COMMIT} .'
785 785
                             }
786 786
                         }
787 787
                         stage("Unit tests") {
... ...
@@ -790,31 +790,50 @@ pipeline {
790 790
                                 docker run --rm -t --privileged \
791 791
                                   -v "$WORKSPACE/bundles:/go/src/github.com/docker/docker/bundles" \
792 792
                                   --name docker-pr$BUILD_NUMBER \
793
+                                  -e DOCKER_EXPERIMENTAL \
793 794
                                   -e DOCKER_GITCOMMIT=${GIT_COMMIT} \
794 795
                                   -e DOCKER_GRAPHDRIVER \
796
+                                  -e VALIDATE_REPO=${GIT_URL} \
797
+                                  -e VALIDATE_BRANCH=${CHANGE_TARGET} \
795 798
                                   docker:${GIT_COMMIT} \
796 799
                                   hack/test/unit
797 800
                                 '''
798 801
                             }
802
+                            post {
803
+                                always {
804
+                                    junit testResults: 'bundles/junit-report.xml', allowEmptyResults: true
805
+                                }
806
+                            }
799 807
                         }
800 808
                         stage("Integration tests") {
809
+                            environment { TEST_SKIP_INTEGRATION_CLI = '1' }
801 810
                             steps {
802 811
                                 sh '''
803 812
                                 docker run --rm -t --privileged \
804 813
                                   -v "$WORKSPACE/bundles:/go/src/github.com/docker/docker/bundles" \
805 814
                                   --name docker-pr$BUILD_NUMBER \
815
+                                  -e DOCKER_EXPERIMENTAL \
806 816
                                   -e DOCKER_GITCOMMIT=${GIT_COMMIT} \
807 817
                                   -e DOCKER_GRAPHDRIVER \
818
+                                  -e TESTDEBUG \
808 819
                                   -e TEST_SKIP_INTEGRATION_CLI \
820
+                                  -e TIMEOUT \
821
+                                  -e VALIDATE_REPO=${GIT_URL} \
822
+                                  -e VALIDATE_BRANCH=${CHANGE_TARGET} \
809 823
                                   docker:${GIT_COMMIT} \
810 824
                                   hack/make.sh \
811
-                                    binary-daemon \
812 825
                                     dynbinary \
813 826
                                     test-integration
814 827
                                 '''
815 828
                             }
829
+                            post {
830
+                                always {
831
+                                    junit testResults: 'bundles/**/*-report.xml', allowEmptyResults: true
832
+                                }
833
+                            }
816 834
                         }
817 835
                     }
836
+
818 837
                     post {
819 838
                         always {
820 839
                             sh '''
... ...
@@ -827,12 +846,16 @@ pipeline {
827 827
                             docker run --rm -v "$WORKSPACE:/workspace" busybox chown -R "$(id -u):$(id -g)" /workspace
828 828
                             '''
829 829
 
830
-                            sh '''
831
-                            echo "Creating bundles.tar.gz"
832
-                            find bundles -name '*.log' | xargs tar -czf arm64-bundles.tar.gz
833
-                            '''
830
+                            catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE', message: 'Failed to create bundles.tar.gz') {
831
+                                sh '''
832
+                                bundleName=arm64-integration
833
+                                echo "Creating ${bundleName}-bundles.tar.gz"
834
+                                # exclude overlay2 directories
835
+                                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
836
+                                '''
834 837
 
835
-                            archiveArtifacts artifacts: 'arm64-bundles.tar.gz'
838
+                                archiveArtifacts artifacts: '*-bundles.tar.gz', allowEmptyArchive: true
839
+                            }
836 840
                         }
837 841
                         cleanup {
838 842
                             sh 'make clean'