DO NOT fail autorelease if file scripts fail 54/58354/2
authorThanh Ha <thanh.ha@linuxfoundation.org>
Tue, 6 Jun 2017 16:21:30 +0000 (12:21 -0400)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Tue, 6 Jun 2017 16:23:16 +0000 (12:23 -0400)
There are 2 scripts which create a file in int/dist which are sure to
fail if int/dist is not included in autorelease. We noticed this because
of Nitrogen work.

Change-Id: I7a7123c551b420f838b281c810dc1711ef5c90d2
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
jjb/autorelease/autorelease-macros.yaml
jjb/releng-macros.yaml

index 4d012d69b42a60c7643c291adfe90016941a0c1c..2390bc6a814084bfe3a17d1dd57f240247c09653 100644 (file)
     builders:
       - integration-set-variables
       - shell: |
+          #!/bin/bash
+          set +e  # DO NOT fail build if copying fails.
+
           if [ -d "integration/distribution/distributions" ]; then
               cp -vf "$WORKSPACE/taglist.log" "integration/distribution/distributions/karaf/src/main/assembly/"
           else
               cp -vf "$WORKSPACE/taglist.log" "integration/distribution/$KARAF_ARTIFACT/src/main/assembly/"
           fi
 
+          # DO NOT fail the build if copying failed.
+          exit 0
+
 - builder:
     name: autorelease-generate-release-patches
     builders:
index b52d7820f9971926dcf83c947eb2bafb3d887ba2..72e3a83443c5126291ae047fe0dd5b0ae8c8966f 100644 (file)
     name: distribute-build-url
     # Place URL of the current run of a build job to a file at given path.
     builders:
-      - shell: 'echo "$BUILD_URL" > {path}/build.url'
+      - shell: |
+          #!/bin/bash
+          set +e  # DO NOT fail script if command returns non-zero.
+
+          echo "$BUILD_URL" > {path}/build.url
+
+          # DO NOT fail the build if the echo failed.
+          exit 0
 
 - builder:
     name: wipe-org-opendaylight-repo