forked from espos/base-files
Refactor Jenkinsfile to add ssh-keyscan before SCP command
This commit is contained in:
Vendored
+3
-3
@@ -11,6 +11,7 @@ pipeline {
|
|||||||
}
|
}
|
||||||
|
|
||||||
stages {
|
stages {
|
||||||
|
|
||||||
stage('Checkout') {
|
stage('Checkout') {
|
||||||
steps {
|
steps {
|
||||||
checkout scm
|
checkout scm
|
||||||
@@ -45,10 +46,9 @@ pipeline {
|
|||||||
stage("Upload to aptly") {
|
stage("Upload to aptly") {
|
||||||
steps {
|
steps {
|
||||||
sshagent(['srv01_elordenador_org']) {
|
sshagent(['srv01_elordenador_org']) {
|
||||||
|
|
||||||
sh '''
|
sh '''
|
||||||
scp ../${DEB_FILE} \
|
ssh-keyscan -H elordenador.org >> ~/.ssh/known_hosts
|
||||||
${APTLY_HOST}:/tmp/
|
scp ../${DEB_FILE} ${APTLY_HOST}:/tmp/
|
||||||
'''
|
'''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user