forked from DoctressWasTaken/Lightshield
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
81 lines (81 loc) · 2.29 KB
/
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
pipeline {
agent any
environment {
github = credentials('40e37eb6-34d9-4bc0-9d2d-d924c671ee85')
url = 'github.com/LightshieldDotDev/Lightshield'
}
stages {
stage('Fetch git') {
steps {
git branch: 'master',
credentialsId: '40e37eb6-34d9-4bc0-9d2d-d924c671ee85',
url: 'https://' + env.url
}
}
stage('Tox') {
when {
expression { false }
}
steps {
sh 'sudo python3.8 -m venv --clear .py3'
sh '. .py3/bin/activate'
sh 'pip install tox'
sh 'tox'
}
}
stage('Create Network') {
steps {
sh 'sudo docker network create lightshield || true'
}
}
stage('Create RabbitMQ') {
environment {
def COMPOSE_PROJECT_NAME='lightshield_persistent'
}
steps {
sh 'sudo -E docker-compose -f compose-persistent.yaml up -d'
}
}
stage('Build Base Image') {
steps {
sh 'sudo docker build -t lightshield_service services/base_image/'
}
}
stage('Create NA') {
environment {
def SERVER='NA1'
def COMPOSE_PROJECT_NAME='lightshield_na1'
}
steps {
sh 'sudo -E docker-compose build'
sh 'sudo -E docker-compose up -d'
}
}
stage('Create EUW') {
when {
expression { false }
}
environment {
def SERVER='EUW1'
def COMPOSE_PROJECT_NAME='lightshield_euw1'
}
steps {
sh 'sudo -E docker-compose build'
sh 'sudo -E docker-compose up -d'
}
}
stage('Create KR') {
when {
expression { false }
}
environment {
def SERVER='KR'
def COMPOSE_PROJECT_NAME='lightshield_kr'
}
steps {
sh 'sudo docker-compose build'
sh 'sudo docker-compose up -d'
}
}
}
}