-
Notifications
You must be signed in to change notification settings - Fork 6
/
Jenkinsfile
38 lines (35 loc) · 896 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
def getCurrentTag() {
sh "git tag --points-at HEAD > .git/current-tag"
return readFile(".git/current-tag").trim()
}
pipeline {
agent {
label 'docker'
}
environment {
DOCKER_IMAGE_NAME = 'ghcr.io/ashswap/interface'
DOCKER_PSECET = credentials('975ca391-602f-421b-98d2-c3bc9e56bcf2')
SENTRY_AUTH_TOKEN = credentials('SENTRY_AUTH_TOKEN')
}
stages {
stage('Build') {
steps {
container('docker-client'){
sh('./scripts/build.sh')
}
}
}
stage('Push') {
when {
expression {
return getCurrentTag() != '';
}
}
steps {
container('docker-client'){
sh('./scripts/push.sh')
}
}
}
}
}