-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile
More file actions
31 lines (29 loc) · 1.09 KB
/
Jenkinsfile
File metadata and controls
31 lines (29 loc) · 1.09 KB
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
pipeline {
agent {
label 'node20 && docker'
}
stages {
stage('Build') {
steps {
container('node') {
sh 'yarn install --network-timeout 900000' // TODO: Too long! Maybe mix of needing a local cache and an SSD capable agent?
sh 'yarn tsc'
sh 'yarn build:backend'
sh 'yarn build-image'
}
}
}
stage('Publish') {
steps {
// Publish a Docker image with GCR auth present
withCredentials([file(credentialsId: 'gcr-service-user-proto-client-ttf', variable: 'GOOGLE_APPLICATION_CREDENTIALS')]) {
sh """
docker tag backstage gcr.io/proto-client-ttf-832500/backstage:latest
cat \${GOOGLE_APPLICATION_CREDENTIALS} | docker login -u _json_key --password-stdin https://gcr.io
docker push gcr.io/proto-client-ttf-832500/backstage:latest
"""
}
}
}
}
}