diff options
Diffstat (limited to 'Jenkinsfile')
| -rw-r--r-- | Jenkinsfile | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..3cbfdd0 --- /dev/null +++ b/Jenkinsfile | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | pipeline { | ||
| 2 | agent any | ||
| 3 | stages { | ||
| 4 | stage('Checkout') { | ||
| 5 | steps { | ||
| 6 | checkout scm | ||
| 7 | } | ||
| 8 | } | ||
| 9 | |||
| 10 | stage('Deploy') { | ||
| 11 | when { branch 'master' } | ||
| 12 | steps { | ||
| 13 | sh 'ansible-galaxy install -r requirements.yml' | ||
| 14 | ansiblePlaybook become: true, credentialsId: 'jenkins_freeipa_ssh', disableHostKeyChecking: true, installation: 'Default', inventory: 'inventory.yml', playbook: 'run.yml', vaultCredentialsId: 'ansible_vault' | ||
| 15 | } | ||
| 16 | } | ||
| 17 | } | ||
| 18 | post { | ||
| 19 | always { | ||
| 20 | recordIssues enabledForFailure: true, tools: [ansibleLint(pattern: '**/run.yml')] | ||
| 21 | } | ||
| 22 | } | ||
| 23 | } | ||
