Skip to content

Instantly share code, notes, and snippets.

@smalltown
Created September 3, 2016 03:42
Show Gist options
  • Save smalltown/4e299bea924744b24ab3c92a97613e75 to your computer and use it in GitHub Desktop.
Save smalltown/4e299bea924744b24ab3c92a97613e75 to your computer and use it in GitHub Desktop.
# clean old properties and script file
rm -rf *
# copy the latest properties and script file
cp -rf /var/lib/jenkins/dsl-repo/config ./
cp -rf /var/lib/jenkins/dsl-repo/dsl ./
cp -rf /var/lib/jenkins/dsl-repo/pipeline ./
# reload pipeline global library
rm -rf /tmp/workflowLibs
rm -rf $JENKINS_HOME/workflow-libs
mkdir $JENKINS_HOME/workflow-libs
git clone http://localhost:8080/workflowLibs.git /tmp/workflowLibs
cd /tmp/workflowLibs
git checkout -b master
cp -rf $JENKINS_HOME/workflowLibs/* .
git add .
git config --global user.email "travis@droi.com.tw"
git config --global user.name "travis"
git commit -m "Initialise the Workflow global repo with default scripts"
git push --set-upstream origin master
git push origin master
rm -rf /tmp/workflowLibs
rm -rf $JENKINS_HOME/workflow-libs/.git
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment