-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
46 lines (45 loc) · 1.19 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
@Library('galactech-shared-lib')_
pipeline {
agent any
stages {
stage("init"){
steps{
script{
dockerLogin("https://docker.galactechstudio.com","docker-cred")
}
}
}
stage("build docker images"){
steps {
script{
if(BRANCH_NAME == 'authentication'){
BuildImage('docker.galactechstudio.com/auth:latest')
}
}
}
}
stage("push docker image"){
steps {
script{
if(BRANCH_NAME == 'authentication'){
dockerPush('docker.galactechstudio.com/auth:latest')
}
}
sh "echo 'y' | docker system prune -a"
}
}
stage("deploy auth branch") {
steps {
script {
sh 'envsubst < auth.yaml | kubectl delete -f -'
sh 'envsubst < auth.yaml | kubectl apply -f -'
}
}
}
}
post {
success {
discordSend description: "T7D $BRANCH_NAME deployed successfully", link: env.BUILD_URL, result: currentBuild.currentResult, title: BRANCH_NAME, webhookURL: "https://discord.com/api/webhooks/907974702847377411/YAW4qz0j7A3skOVVRpDiuLran7tYLe52qMtVSOzn4zs9aro1A-MkFmr3mMa9F86ZsObo"
}
}
}