forked from atomy/discord-bot-playercount
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
51 lines (46 loc) · 1.26 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
pipeline {
agent {
label 'php'
}
options {
disableConcurrentBuilds()
}
environment {
CONTAINER_NAME = 'atomy/discord-bot'
REGISTRY_ADDRESS = 'registry124123.azurecr.io'
DEPLOY_SSH_TARGET = '[email protected]'
DEPLOY_DIR = 'discord-bot'
STEAM_APPID = '55555'
DISCORD_API_KEY = 'supersecretapikey888'
STEAM_API_KEY = 'steamapikey99234234'
}
stages {
stage('Checkout') {
steps {
dir('app') {
scm checkout
sh 'git reset --hard HEAD'
sh 'git clean -x -f -d'
}
}
}
// build the container to be pushed to registry
stage('Build Container') {
steps {
dir('app') {
sh 'build/buildContainer.sh'
}
}
}
// deploy the previous built container to the app slave
stage('Deploy Container') {
steps {
dir('app') {
sshagent (credentials: ['52fa7bdf-0e80-4510-917c-a6ec0ca1e8c4']) {
sh 'build/deployContainer.sh'
}
}
}
}
}
}