-
Notifications
You must be signed in to change notification settings - Fork 1
/
Jenkinsfile
35 lines (34 loc) · 1019 Bytes
/
Jenkinsfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
pipeline {
agent any
environment {
CREDENTIALS = credentials('nexus_credentials')
}
stages {
stage('Validate') {
steps {
sh 'ansible-playbook -i inventory/ nexus_validate.yaml'
}
}
stage('Prepare') {
steps {
sh 'ansible-playbook -i inventory/ nexus_prepare.yaml -e "username=$CREDENTIALS_USR password=$CREDENTIALS_PSW"'
}
}
stage('Deploy') {
steps {
sh 'ansible-playbook -i inventory/ nexus_deploy.yaml -e "username=$CREDENTIALS_USR password=$CREDENTIALS_PSW"'
}
}
stage('Test') {
steps {
sh 'ansible-playbook -i inventory/ nexus_test.yaml -e "username=$CREDENTIALS_USR password=$CREDENTIALS_PSW"'
}
}
}
post {
always {
junit 'test_results/nexus_*.xml'
archiveArtifacts 'test_results/nexus_*.html'
}
}
}