fix(ci): add default deploy environment variables for bash-safe pipeline #41

Merged
robbond merged 1 commits from fix/cl9-jenkins-env-defaults into master 2026-03-06 16:10:05 +00:00
Showing only changes of commit d30a7d37b5 - Show all commits

11
Jenkinsfile vendored
View File

@@ -1,8 +1,3 @@
def DEPLOY_SSH_CREDENTIAL_ID = env.DEPLOY_SSH_CREDENTIAL_ID ?: 'plesk-agency-deploy-key'
def APP_HOST = env.APP_HOST ?: '192.168.68.89'
def APP_USER = env.APP_USER ?: 'deploy'
def DEPLOY_PATH = env.DEPLOY_PATH ?: '/opt/plesk-agency-portal'
pipeline {
// Build + deploy stages require Docker CLI/daemon access on the Jenkins node.
// Ensure this label maps to an agent with Docker installed and usable.
@@ -12,6 +7,10 @@ pipeline {
REGISTRY_IMAGE = "plesk-agency-portal"
IMAGE_LATEST = "${REGISTRY_IMAGE}:latest"
IMAGE_BUILD = "${REGISTRY_IMAGE}:build-${BUILD_NUMBER}"
DEPLOY_SSH_CREDENTIAL_ID = "${env.DEPLOY_SSH_CREDENTIAL_ID ?: 'plesk-agency-deploy-key'}"
APP_HOST = "${env.APP_HOST ?: '192.168.68.89'}"
APP_USER = "${env.APP_USER ?: 'deploy'}"
DEPLOY_PATH = "${env.DEPLOY_PATH ?: '/opt/plesk-agency-portal'}"
}
stages {
@@ -74,7 +73,7 @@ pipeline {
stage('Deploy') {
steps {
withCredentials([sshUserPrivateKey(
credentialsId: DEPLOY_SSH_CREDENTIAL_ID,
credentialsId: "${env.DEPLOY_SSH_CREDENTIAL_ID}",
keyFileVariable: 'SSH_KEY'
)]) {
sh '''