rdy for deploy
This commit is contained in:
26
Jenkinsfile
vendored
Normal file
26
Jenkinsfile
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
pipeline {
|
||||
agent any
|
||||
options { timestamps(); disableConcurrentBuilds() }
|
||||
environment {
|
||||
DEPLOY_HOST = 'web@YOUR_SERVER_IP_OR_DNS'
|
||||
DEPLOY_PATH = '/srv/www/masha-site'
|
||||
SSH_CRED_ID = 'web-ssh'
|
||||
}
|
||||
stages {
|
||||
stage('Checkout') {
|
||||
steps { checkout scm }
|
||||
}
|
||||
stage('Deploy') {
|
||||
steps {
|
||||
sshagent(credentials: [env.SSH_CRED_ID]) {
|
||||
sh 'bash deploy/deploy.sh "$DEPLOY_HOST" "$DEPLOY_PATH"'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
success { echo 'Deployed' }
|
||||
failure { echo 'Failed' }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user