Files
masha_site/Jenkinsfile
2025-09-22 21:22:25 +03:00

27 lines
541 B
Groovy

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' }
}
}