Skip to content
This repository has been archived by the owner on May 29, 2024. It is now read-only.

Commit

Permalink
ci: Try new kubernetes deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
jftanner committed Dec 28, 2019
1 parent a8d9eba commit b1a2d3a
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

pipeline {
agent {
label 'nodejs && docker'
label 'nodejs && docker && kubectl'
}

stages {
Expand Down Expand Up @@ -59,12 +59,14 @@ pipeline {
}
steps {
script {
sshagent(['jenkins.ssh']) {
sh 'ssh docker.tanndev.com rm -rf maelstrom'
sh 'ssh docker.tanndev.com mkdir maelstrom'
sh 'scp docker-compose.yml docker.tanndev.com:maelstrom/'
sh 'ssh docker.tanndev.com "cd maelstrom && docker-compose pull"'
sh 'ssh docker.tanndev.com "cd maelstrom && docker-compose up -d"'
// Deploy the app.
withKubeConfig([
credentialsId: 'microservices-kubernetes-token',
serverUrl: "$MICROSERVICES_KUBERNETES_SERVER",
namespace: 'maelstrom'
]) {
sh 'kubectl apply -f manifest.yaml'
sh 'kubectl rollout restart deployment/maelstrom'
}

if (RELEASE_VERSION) {
Expand Down

0 comments on commit b1a2d3a

Please sign in to comment.