forked from devgateway/uot-educat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
41 lines (37 loc) · 968 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
pipeline {
agent any
environment {
COMPOSE_ENV_FILE = ".env.${env.BRANCH_NAME}"
COMPOSE_PROJECT_NAME = "out-odoo-${env.BRANCH_NAME}"
// echo COMPOSE_PROJECT_NAME
}
stages {
stage('Test') {
steps {
echo 'Building testing..'
sh './run-tests.sh'
}
}
stage('Deploy') {
when {
anyOf { branch "develop"; branch "staging"; branch "hotfix"; }
}
steps {
echo 'deploying'
sh './up.sh'
}
}
/*
stage('Deploy to Production') {
when {
branch: "master"
}
environment {
SSH_CREDS = credentials('odoo-production-ssh-creds')
}
steps {
sh 'ssh $SSH_CREDS_USR@prod.example.com -i $SSH_CREDS ./deploy.sh'
}
}*/
}
}