Skip to content

Commit

Permalink
Add initial cleanup checks
Browse files Browse the repository at this point in the history
  • Loading branch information
shanemacbride committed Dec 21, 2017
1 parent e4934ef commit a88c31e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
8 changes: 6 additions & 2 deletions createDevJob.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@ if [ ! -d /var/jenkins_home/jobs/devPipeline/ ]; then
mkdir /var/jenkins_home/jobs/devPipeline/
mkdir /var/jenkins_home/jobs/devPipeline/workspace/
fi
rm -r /var/jenkins_home/jobs/devPipeline/workspace/*
cp -r ../pipeline-dev/* /var/jenkins_home/jobs/devPipeline/workspace/
if [ -e /var/jenkins_home/jobs/devPipeline/workspace/* ]; then
rm -r /var/jenkins_home/jobs/devPipeline/workspace/*
fi
if [[ ! -z "$(ls -A)" ]] ; then
cp -r * /var/jenkins_home/jobs/devPipeline/workspace/
fi
'''


Expand Down
8 changes: 6 additions & 2 deletions jenkins/jobs/pipeline-updater/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,12 @@
mkdir /var/jenkins_home/jobs/devPipeline/
mkdir /var/jenkins_home/jobs/devPipeline/workspace/
fi
rm -r /var/jenkins_home/jobs/devPipeline/workspace/*
cp -r ../pipeline-dev/* /var/jenkins_home/jobs/devPipeline/workspace/</command>
if [ -e /var/jenkins_home/jobs/devPipeline/workspace/* ]; then
rm -r /var/jenkins_home/jobs/devPipeline/workspace/*
fi
if [[ ! -z "$(ls -A)" ]] ; then
cp -r * /var/jenkins_home/jobs/devPipeline/workspace/
fi</command>
</hudson.tasks.Shell>
<javaposse.jobdsl.plugin.ExecuteDslScripts plugin="[email protected]">
<scriptText>pipelineJob(&apos;devPipeline&apos;) {
Expand Down

0 comments on commit a88c31e

Please sign in to comment.