Files
configpolicy/ci/pyrocufflink.jenkinsfile
Dustin C. Hatch a4aeda6371 ci: pyrocufflink: Add pipline for domain members
The `pyrocufflink` Jenkins pipleline applies the `pyrocufflink.yml`
playbook to ensure AD domain member configuration is correct.
2018-04-08 14:24:43 -05:00

49 lines
1.2 KiB
Groovy

// vim: set ft=groovy sw=4 ts=4 sts=4 et :
pipeline {
agent {
label 'ansible'
}
triggers {
pollSCM ''
}
stages {
stage('kinit') {
steps {
withCredentials([file(
credentialsId: 'keytab-jenkins@pyrocufflink.blue',
variable: 'KEYTAB')]) {
sh 'kinit -kt "${KEYTAB}" jenkins@PYROCUFFLINK.BLUE'
}
}
}
stage('Domain Member') {
steps {
withCredentials([
file(
credentialsId: 'ansible-vault',
variable: 'ANSIBLE_VAULT_PASSWORD_FILE',
),
file(
credentialsId: 'vault-jenkins@pyrocufflink.blue',
variable: 'SUDO_PASS_FILE',
),
]) {
sh '''
ansible-playbook --diff -b pyrocufflink.yml -e "@${SUDO_PASS_FILE}"
'''
}
}
}
}
post {
always {
sh 'kdestroy'
}
}
}