Hashar has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/58467


Change subject: macro to wipe workspace
......................................................................

macro to wipe workspace

Some jobs are not using the git plugin which let us easily wipe
a current workspace.  This macro is meant to replace that feature
in jobs not using the git plugin.
`rm -fR .* *` would attempt to delete '.' and '..' which makes rm
to return an exit code of 1.  We use find instead.

Change-Id: I07fb86aea05a5d2ef0772b127a0b9752ddb81150
---
M macro.yaml
1 file changed, 10 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/integration/jenkins-job-builder-config 
refs/changes/67/58467/1

diff --git a/macro.yaml b/macro.yaml
index b28fdda..06143ac 100644
--- a/macro.yaml
+++ b/macro.yaml
@@ -313,6 +313,16 @@
      - shell: |
         find "$WORKSPACE" -type f -name '*.rb' -print0 | xargs -t -n1 -0 
{interpreter} -c
 
+# Some jobs are not using the git plugin which let us easily wipe
+# a current workspace.  This macro is meant to replace that feature
+# in jobs not using the git plugin.
+# `rm -fR .* *` would attempt to delete '.' and '..' which makes rm
+# to return an exit code of 1.  We use find instead.
+- builder:
+    name: wipe-workspace
+    builders:
+     - shell: 'echo "Wiping workspace"; find . -not -path . -delete; echo 
"Done"'
+
 - builder:
     name: yaml-lint
     builders:

-- 
To view, visit https://gerrit.wikimedia.org/r/58467
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I07fb86aea05a5d2ef0772b127a0b9752ddb81150
Gerrit-PatchSet: 1
Gerrit-Project: integration/jenkins-job-builder-config
Gerrit-Branch: master
Gerrit-Owner: Hashar <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to