forked from jlaunonen/kirppu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
41 lines (37 loc) · 879 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
36
37
38
39
40
41
def image = "tracon/kirppu:build-${env.BUILD_NUMBER}"
stage("Build") {
node {
checkout scm
sh "docker build --tag ${image} ."
}
}
// stage("Test") {
// node {
// sh """
// docker run \
// --rm \
// --link jenkins.tracon.fi-postgres:postgres \
// --env-file ~/.kirppu.env \
// ${image} \
// pip install -r requirements-dev.txt && py.test --cov . --doctest-modules
// """
// }
// }
stage("Push") {
node {
sh "docker tag ${image} tracon/kirppu:latest && docker push tracon/kirppu:latest && docker rmi ${image}"
}
}
stage("Deploy") {
node {
git url: "[email protected]:tracon/ansible-tracon"
sh """
ansible-playbook \
--vault-password-file=~/.vault_pass.txt \
--user root \
--limit nuoli.tracon.fi \
--tags kirppu-deploy \
tracon.yml
"""
}
}