ci: Add Jenkinsfile for domain controllers
This commit is contained in:
38
ci/samba-dc.jenkinsfile
Normal file
38
ci/samba-dc.jenkinsfile
Normal file
@@ -0,0 +1,38 @@
|
||||
// vim: set ft=groovy sw=4 ts=4 sts=4 et :
|
||||
|
||||
pipeline {
|
||||
agent {
|
||||
dockerfile {
|
||||
dir 'ci'
|
||||
}
|
||||
}
|
||||
|
||||
triggers {
|
||||
pollSCM ''
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('Prepare') {
|
||||
steps {
|
||||
withCredentials([file(
|
||||
credentialsId: 'vault-jenkins@gw0',
|
||||
variable: 'SUDO_PASS_FILE')]) {
|
||||
sh 'cp -f "${SUDO_PASS_FILE}" sudo-pass'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Domain Controller') {
|
||||
steps {
|
||||
withCredentials([file(
|
||||
credentialsId: 'ansible-vault',
|
||||
variable: 'ANSIBLE_VAULT_PASSWORD_FILE')]) {
|
||||
sshagent(['jenkins-ssh']) {
|
||||
sh 'ansible-playbook --check --diff -b domain-controller.yml -e @sudo-pass'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user