-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
68 lines (59 loc) · 1.44 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
@Library('jenkings') _
pipeline {
agent {
label '!docker-qemu'
}
environment {
CI = 'true'
REACT_APP_OSRM_SERVER_HOST = 'http://osrm:5000/api/osrm/route/v1'
}
stages {
stage('lint') {
agent {
docker {
label 'docker'
image 'node:12-alpine'
args '-e HOME=$WORKSPACE'
}
}
steps {
sh 'npm install'
sh "node_modules/.bin/eslint 'src/*.{ts,tsx}' 'src/**/*.{ts,tsx}' --max-warnings 0"
sh 'npm run build'
}
}
stage('docker image') {
when {
branch 'master'
}
agent {
label 'docker-qemu'
}
stages {
stage('build') {
steps {
script {
sh "docker image build -t alkesst/biceater-app:${GIT_COMMIT} --pull ."
sh "docker image tag alkesst/biceater-app:${GIT_COMMIT} alkesst/biceater-app:latest"
}
}
}
stage('push') {
steps {
script {
docker.withRegistry('', 'alkesst_dockerhub') {
sh "docker image push alkesst/biceater-app:${GIT_COMMIT}"
sh "docker image push alkesst/biceater-app:latest"
}
}
}
}
stage('refresh env') {
steps {
sh 'curl -X POST https://portainer.majorcadevs.com/api/webhooks/a69a4728-dbcc-43e1-b614-31311f818918'
}
}
}
}
}
}