-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathJenkinsfile
More file actions
28 lines (28 loc) · 718 Bytes
/
Copy pathJenkinsfile
File metadata and controls
28 lines (28 loc) · 718 Bytes
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
pipeline {
agent any
environment {
CI = 'true'
}
stages {
stage('Build') {
steps {
sh 'sudo docker build -t myapp2:latest .'
sh 'sudo docker images'
script {
docker.withRegistry('https://635019503179.dkr.ecr.us-east-1.amazonaws.com', 'ecr:us-east-1:demo-ecr-credentials')
{
docker.image('hello-world').push('latest')
}
}
}
}
stage('Deploy') {
steps {
sh 'kubectl create -f eks-Deployment.yml'
sh 'kubectl create -f eks-Service.yml'
sh 'kubectl get services -o wide'
sh 'kubectl get pods'
}
}
}
}