From a6e69290bf958c3ed56d4e11be4d9cf3a06b3058 Mon Sep 17 00:00:00 2001
From: Fatih Degirmenci <fatih.degirmenci@ericsson.com>
Date: Wed, 29 Mar 2017 11:19:01 +0200
Subject: Make prescm step workspace permission fix a macro available to all

bifrost-verify jobs have been using this without issues and it is
needed for many other jobs in order to avoid unnecessary failures.

This change makes workspace permission fix prescm step a macro.

Change-Id: Ib5678dbf21c17ce640a600d2a06ebed9674663fa
Signed-off-by: Fatih Degirmenci <fatih.degirmenci@ericsson.com>
---
 jjb/global/releng-macros.yml    |  8 ++++++++
 jjb/xci/bifrost-verify-jobs.yml | 13 +------------
 2 files changed, 9 insertions(+), 12 deletions(-)

diff --git a/jjb/global/releng-macros.yml b/jjb/global/releng-macros.yml
index 6fdb4caf4..ced335cb9 100644
--- a/jjb/global/releng-macros.yml
+++ b/jjb/global/releng-macros.yml
@@ -164,6 +164,14 @@
             users:
                 - 'd42411ac011ad6f3dd2e1fa34eaa5d87f910eb2e'
 
+- wrapper:
+    name: fix-workspace-permissions
+    wrappers:
+        - pre-scm-buildstep:
+          - shell: |
+                #!/bin/bash
+                sudo chown -R $USER $WORKSPACE || exit 1
+
 - builder:
     name: build-html-and-pdf-docs-output
     builders:
diff --git a/jjb/xci/bifrost-verify-jobs.yml b/jjb/xci/bifrost-verify-jobs.yml
index 2fa99b290..b93456ee2 100644
--- a/jjb/xci/bifrost-verify-jobs.yml
+++ b/jjb/xci/bifrost-verify-jobs.yml
@@ -161,7 +161,7 @@
         - bifrost-build
 
     wrappers:
-        - bifrost-fix-perms-workspace
+        - fix-workspace-permissions
 
     publishers:
         - email:
@@ -225,17 +225,6 @@
                     pattern: 'prototypes/bifrost/**'
             readable-message: true
 
-#---------------------------
-# wrapper macros
-#---------------------------
-- wrapper:
-    name: bifrost-fix-perms-workspace
-    wrappers:
-        - pre-scm-buildstep:
-          - shell: |
-                #!/bin/bash
-                sudo chown -R $USER $WORKSPACE || exit 1
-
 #---------------------------
 # builder macros
 #---------------------------
-- 
cgit