Clean up proposal slave in a builder
So we can avoid using the jenkins-specific postbuildscript plugin, move the proposal slave cleanup to a builder. Run it first so that it always runs. Since we're running it first, we can't use it to clean up our current workspace, so instead, ask it to clean up all workspaces. Change-Id: I54a187d643fb76f10cc11411d546c41348b5592e
This commit is contained in:
parent
a9ca416454
commit
20576bded0
|
@ -3,6 +3,7 @@
|
|||
node: proposal
|
||||
|
||||
builders:
|
||||
- proposal-slave-cleanup
|
||||
- link-logs
|
||||
- branch-git-prep:
|
||||
branch: master
|
||||
|
@ -10,7 +11,6 @@
|
|||
|
||||
publishers:
|
||||
- console-log
|
||||
- proposal-slave-cleanup
|
||||
|
||||
|
||||
- job:
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
node: proposal
|
||||
|
||||
builders:
|
||||
- proposal-slave-cleanup
|
||||
- revoke-sudo
|
||||
- link-logs
|
||||
- branch-git-prep:
|
||||
|
@ -37,4 +38,3 @@
|
|||
|
||||
publishers:
|
||||
- console-log
|
||||
- proposal-slave-cleanup
|
||||
|
|
|
@ -105,6 +105,7 @@
|
|||
node: proposal
|
||||
|
||||
builders:
|
||||
- proposal-slave-cleanup
|
||||
- revoke-sudo
|
||||
- link-logs
|
||||
- net-info
|
||||
|
@ -113,4 +114,3 @@
|
|||
|
||||
publishers:
|
||||
- console-log
|
||||
- proposal-slave-cleanup
|
||||
|
|
|
@ -308,6 +308,16 @@
|
|||
sudo -H pip install dib-utils
|
||||
sudo -H pip install diskimage-builder
|
||||
|
||||
- builder:
|
||||
name: proposal-slave-cleanup
|
||||
builders:
|
||||
- shell: |
|
||||
#!/bin/bash
|
||||
cd /
|
||||
rm -rf `dirname $WORKSPACE`/*
|
||||
mkdir $WORKSPACE
|
||||
cd $WORKSPACE
|
||||
|
||||
- builder:
|
||||
name: puppet-prepare-node
|
||||
builders:
|
||||
|
@ -1135,13 +1145,6 @@
|
|||
- zuul-swift-upload-logs-with-console:
|
||||
upload_source: '"**/*nose_results.html" "**/*testr_results.html.gz" ".testrepository/tmp*" "**/*testrepository.subunit.gz" ".tox/*/log/*"'
|
||||
|
||||
- publisher:
|
||||
name: proposal-slave-cleanup
|
||||
publishers:
|
||||
- postbuildscript:
|
||||
builders:
|
||||
- shell: "/usr/local/jenkins/slave_scripts/slave-cleanup.sh"
|
||||
|
||||
- publisher:
|
||||
name: copy-puppet-logs
|
||||
publishers:
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
node: proposal
|
||||
|
||||
builders:
|
||||
- proposal-slave-cleanup
|
||||
- revoke-sudo
|
||||
- link-logs
|
||||
- net-info
|
||||
|
@ -11,7 +12,6 @@
|
|||
|
||||
publishers:
|
||||
- console-log
|
||||
- proposal-slave-cleanup
|
||||
|
||||
- job-template:
|
||||
name: 'gate-{name}-tox-doc-publish-{envlist}'
|
||||
|
|
|
@ -308,6 +308,7 @@
|
|||
node: proposal
|
||||
|
||||
builders:
|
||||
- proposal-slave-cleanup
|
||||
- revoke-sudo
|
||||
- link-logs
|
||||
- branch-git-prep:
|
||||
|
@ -320,13 +321,13 @@
|
|||
|
||||
publishers:
|
||||
- console-log
|
||||
- proposal-slave-cleanup
|
||||
|
||||
- job:
|
||||
name: propose-puppet-openstack-rdo-promote
|
||||
node: proposal
|
||||
|
||||
builders:
|
||||
- proposal-slave-cleanup
|
||||
- revoke-sudo
|
||||
- link-logs
|
||||
- branch-git-prep:
|
||||
|
@ -339,7 +340,6 @@
|
|||
|
||||
publishers:
|
||||
- console-log
|
||||
- proposal-slave-cleanup
|
||||
|
||||
- job-group:
|
||||
name: 'puppet-check-jobs'
|
||||
|
|
|
@ -262,6 +262,7 @@
|
|||
node: proposal
|
||||
|
||||
builders:
|
||||
- proposal-slave-cleanup
|
||||
- revoke-sudo
|
||||
- link-logs
|
||||
- net-info
|
||||
|
@ -270,7 +271,6 @@
|
|||
|
||||
publishers:
|
||||
- console-log
|
||||
- proposal-slave-cleanup
|
||||
|
||||
- job-template:
|
||||
name: propose-requirements-constraints{job-suffix}
|
||||
|
@ -279,6 +279,7 @@
|
|||
builders:
|
||||
- print-template-name:
|
||||
template-name: "{template-name}"
|
||||
- proposal-slave-cleanup
|
||||
- revoke-sudo
|
||||
- link-logs
|
||||
- net-info
|
||||
|
@ -291,4 +292,3 @@
|
|||
|
||||
publishers:
|
||||
- console-log
|
||||
- proposal-slave-cleanup
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
builders:
|
||||
- print-template-name:
|
||||
template-name: "{template-name}"
|
||||
- proposal-slave-cleanup
|
||||
- revoke-sudo
|
||||
- gerrit-git-prep
|
||||
- shell: |
|
||||
|
@ -25,7 +26,6 @@
|
|||
source: 'testrepository.subunit.gz'
|
||||
keep-hierarchy: false
|
||||
copy-after-failure: true
|
||||
- proposal-slave-cleanup
|
||||
|
||||
node: 'proposal'
|
||||
|
||||
|
@ -35,6 +35,7 @@
|
|||
builders:
|
||||
- print-template-name:
|
||||
template-name: "{template-name}"
|
||||
- proposal-slave-cleanup
|
||||
- revoke-sudo
|
||||
- branch-git-prep:
|
||||
branch: '{branch}'
|
||||
|
@ -51,7 +52,6 @@
|
|||
source: 'testrepository.subunit.gz'
|
||||
keep-hierarchy: false
|
||||
copy-after-failure: true
|
||||
- proposal-slave-cleanup
|
||||
|
||||
node: 'proposal'
|
||||
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
#!/bin/bash -xe
|
||||
|
||||
# Cleanup workspace afterwards so that no extra files are in it.
|
||||
# This is also done at beginning of each job but let's do it
|
||||
# afterwards to save space on the workspace between invocations.
|
||||
|
||||
# Let's see how much we delete.
|
||||
# Let du report sizes each directory.
|
||||
du -h --max-depth=1 .
|
||||
git clean -f -x -d
|
||||
du -h --max-depth=1 .
|
Loading…
Reference in New Issue