Created
April 28, 2017 10:51
-
-
Save planetrobbie/c268e9c4907cb48df7941aff5a5ad27b to your computer and use it in GitHub Desktop.
Jenkins pipeline to lint reclass model of an etcd cluster
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pipeline { | |
triggers { pollSCM('H/5 * * * *') } | |
agent any | |
stages { | |
stage('Install Salt Formulas Service Metadata into Workspace') { | |
steps { | |
dir(path: 'service') { | |
sh 'for i in /usr/share/salt-formulas/reclass/service/*; do ln -s $i .; done' | |
} | |
} | |
} | |
stage('Topfile Lint') { | |
steps { | |
sh '/usr/local/sbin/salt-reclass --top -b .' | |
} | |
} | |
stage('Pillar Lint for etcd cluster nodes') { | |
steps { | |
echo 'Lint Pillar for Node-01' | |
sh '/usr/local/sbin/salt-reclass --pillar etcd-01 -b .' | |
sh '/usr/local/sbin/salt-reclass --pillar etcd-02 -b .' | |
sh '/usr/local/sbin/salt-reclass --pillar etcd-03 -b .' | |
} | |
} | |
} | |
post { | |
always { | |
sh 'rm -rf service' | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment