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

Commit

Permalink
Update Jenkinsfile SSH commands to disable StrictHostKeyChecking
Browse files Browse the repository at this point in the history
  • Loading branch information
nmcc1212 committed Apr 5, 2024
1 parent c1b6266 commit 0a2c578
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Jenkins/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ pipeline {
}
environment {
// SSH_KEY = credentials('nial-ssh-aws') // Credential ID for SSH private key
REMOTE_USER = 'ubuntu' // User to SSH into the EC2 instance
REMOTE_HOST = '13.49.230.240' // Public IP or hostname of your EC2 instance
}
stages {
stage('Install') {
Expand Down Expand Up @@ -40,7 +38,7 @@ pipeline {
steps {
script {
sshagent(['nial-ssh-creds']) {
sh "ssh ubuntu@13.49.230.240 'cd TSI && git pull'"
sh "ssh -o StrictHostKeyChecking=no ubuntu@13.49.230.240 'cd TSI && git pull'"
}
}
}
Expand All @@ -49,7 +47,7 @@ pipeline {
steps {
script {
sshagent(['nial-ssh-creds']) {
sh "ssh ubuntu@13.49.230.240 'screen && cd TSI/next/news-aggregation && npm install && npm run dev'"
sh "ssh -o StrictHostKeyChecking=no ubuntu@13.49.230.240 'screen && cd TSI/next/news-aggregation && npm install && npm run dev'"
}
}
}
Expand Down

0 comments on commit 0a2c578

Please sign in to comment.