]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-build.git/commitdiff
tcmu-runner: cleanup shaman.repo using bash trap 848/head
authorJason Dillaman <dillaman@redhat.com>
Tue, 29 Aug 2017 18:24:03 +0000 (14:24 -0400)
committerJason Dillaman <dillaman@redhat.com>
Tue, 29 Aug 2017 18:24:03 +0000 (14:24 -0400)
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
tcmu-runner/build/build_rpm
tcmu-runner/config/definitions/tcmu-runner.yml

index d18e41c5fc9c039afe2c72c3374a2ad5c3642887..71aefae53ca2f242f3262a02874d57f7d8bfeb7f 100644 (file)
@@ -35,6 +35,11 @@ if [[ "$REPO_FOUND" -eq 0 ]]; then
   exit 1
 fi
 
+function cleanup() {
+  sudo rm -rf /etc/yum.repos.d/shaman.repo || true
+}
+trap cleanup EXIT
+
 # Copy the repo
 sudo cp $WORKSPACE/shaman.repo /etc/yum.repos.d/
 
index c2ce7629af8a918be0b135918c3c1a6364612c8e..0c0c53f3a16c617514c3adf53cd26731fe1bc679 100644 (file)
@@ -100,10 +100,3 @@ If this is checked, then the binaries will be built and pushed to chacra even if
       - inject-passwords:
           global: true
           mask-password-params: true
-
-    publishers:
-      - postbuildscript:
-          script-only-if-succeeded: False
-          script-only-if-failed: False
-          builders:
-            - shell: "sudo rm -f /etc/apt/sources.list.d/shaman.list /etc/yum.repos.d/shaman.repo"