Skip to content

Commit

Permalink
Update Jenkinsfile
Browse files Browse the repository at this point in the history
  • Loading branch information
SAMK0107 authored Dec 9, 2024
1 parent 753ee5e commit c398c7a
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
#!/usr/bin/env groovy

def deploy (servers) {
script {
for (item in servers) {
println "Deploying to ${item}."
sh(script: """
whoami
ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null ec2-user@'${item}' bash -c "'
./jwp-dev.sh
'"
""")
}
def deploy(servers, branch) {
for (item in servers) {
println "Deploying to ${item} on branch ${branch}."
sh(script: """
ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null ec2-user@'${item}' bash -c "'
./amar-fe.sh
'"
""")
}
}

Expand Down

0 comments on commit c398c7a

Please sign in to comment.