-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
23 lines (22 loc) · 849 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
pipeline {
agent any
stages {
// stage('Checkout') {
// steps {
// git 'https://github.com/hoanglinhdigital/nodejs-random-color.git'
// }
// }
stage('Build') {
steps {
sh 'docker build -t nodejs-random-color:latest .'
}
}
stage('Upload image to ECR') {
steps {
sh 'aws ecr get-login-password --region ap-southeast-1 | docker login --username AWS --password-stdin 287925497349.dkr.ecr.ap-southeast-1.amazonaws.com'
sh 'docker tag nodejs-random-color:latest 287925497349.dkr.ecr.ap-southeast-1.amazonaws.com/nodejs-random-color:latest'
sh 'docker push 287925497349.dkr.ecr.ap-southeast-1.amazonaws.com/nodejs-random-color:latest'
}
}
}
}