Skip to content

Commit 5f4f426

Browse files
committed
Edit deploy stage dicodingacademy#7
1 parent e19538c commit 5f4f426

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

Dockerfile

+1-3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,4 @@ WORKDIR /app
44

55
COPY . .
66

7-
RUN npm install
8-
9-
RUN ./jenkins/scripts/deliver.sh
7+
RUN npm install

Jenkinsfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ node {
2626
sshagent(['ec2-server-key']) {
2727
sh "ssh -o StrictHostKeyChecking=no ubuntu@13.212.240.207 sudo docker pull slehmadi/react-app-cicd-dicoding"
2828
sh "ssh -o StrictHostKeyChecking=no ubuntu@13.212.240.207 sudo docker run --rm -d --name webserver -p 3000:3000 slehmadi/react-app-cicd-dicoding npm run start"
29-
sh "echo deploy has been deployed for 1 minute"
29+
sh "echo deploy has been deployed for 1 minute && sleep 60"
3030
sh "ssh -o StrictHostKeyChecking=no ubuntu@13.212.240.207 sudo docker stop webserver"
3131
sh "ssh -o StrictHostKeyChecking=no ubuntu@13.212.240.207 sudo docker rmi slehmadi/react-app-cicd-dicoding"
3232
}

0 commit comments

Comments
 (0)