-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathJenkinsFile-dev
37 lines (36 loc) · 981 Bytes
/
JenkinsFile-dev
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
36
pipeline {
agent { label "adacloud-bridge-wn" }
options { disableConcurrentBuilds() }
environment {
VAULT_PASS = credentials('SN06_VAULT_PASS')
}
stages {
stage('deploy') {
steps {
sh '''
python3 -m venv venv
. venv/bin/activate
python -m pip install -r requirements.txt
ansible-galaxy install -r requirements.yaml
cp $VAULT_PASS .vault_password
ansible-playbook -i inventory usegalaxy_it_dev.yml --extra-vars "__galaxy_dir_perms='0755'"
rm -d .vault_password
'''
}
}
}
post {
success {
cleanWs()
}
failure {
emailext (
subject: '$DEFAULT_SUBJECT',
body: '$DEFAULT_CONTENT',
to: '$DEFAULT_RECIPIENTS',
attachLog: true
)
cleanWs()
}
}
}