fix jenkinsfile
This commit is contained in:
parent
50feda89b3
commit
764f1b5792
29
ansible/Jenkinsfile
vendored
29
ansible/Jenkinsfile
vendored
@ -7,10 +7,10 @@ pipeline {
|
|||||||
}
|
}
|
||||||
|
|
||||||
parameters {
|
parameters {
|
||||||
string(name: 'ADDITIONAL_CONTENT_SITEA_H2', defaultValue: 'Новое сообщение для SiteA', description: 'Additional <h2> content for SiteA')
|
string(name: 'ADDITIONAL_CONTENT_SITEA_H2', defaultValue: 'Новое сообщение для SiteA', description: 'Дополнительный <h2> контент для SiteA')
|
||||||
string(name: 'ADDITIONAL_CONTENT_SITEA_P', defaultValue: 'Дополнительный параграф для SiteA', description: 'Additional <p> content for SiteA')
|
string(name: 'ADDITIONAL_CONTENT_SITEA_P', defaultValue: 'Дополнительный параграф для SiteA', description: 'Дополнительный <p> контент для SiteA')
|
||||||
string(name: 'ADDITIONAL_CONTENT_SITEB_H2', defaultValue: 'Новое сообщение для SiteB', description: 'Additional <h2> content for SiteB')
|
string(name: 'ADDITIONAL_CONTENT_SITEB_H2', defaultValue: 'Новое сообщение для SiteB', description: 'Дополнительный <h2> контент для SiteB')
|
||||||
string(name: 'ADDITIONAL_CONTENT_SITEB_P', defaultValue: 'Дополнительный параграф для SiteB', description: 'Additional <p> content for SiteB')
|
string(name: 'ADDITIONAL_CONTENT_SITEB_P', defaultValue: 'Дополнительный параграф для SiteB', description: 'Дополнительный <p> контент для SiteB')
|
||||||
}
|
}
|
||||||
|
|
||||||
stages {
|
stages {
|
||||||
@ -35,12 +35,29 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
stage('Deploy Site') {
|
stage('Deploy SiteA') {
|
||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
def extraVars = [
|
def extraVars = [
|
||||||
siteA_h2: params.ADDITIONAL_CONTENT_SITEA_H2,
|
siteA_h2: params.ADDITIONAL_CONTENT_SITEA_H2,
|
||||||
siteA_p: params.ADDITIONAL_CONTENT_SITEA_P,
|
siteA_p: params.ADDITIONAL_CONTENT_SITEA_P,
|
||||||
|
ansible_ssh_private_key_file: env.DECYPTED_KEY_FILE
|
||||||
|
]
|
||||||
|
|
||||||
|
ansiblePlaybook(
|
||||||
|
playbook: 'ansible/playbook.yml',
|
||||||
|
inventory: "ansible/inventory.yml",
|
||||||
|
extraVars: extraVars,
|
||||||
|
limit: 'SiteA,proxy'
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Deploy SiteB') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
def extraVars = [
|
||||||
siteB_h2: params.ADDITIONAL_CONTENT_SITEB_H2,
|
siteB_h2: params.ADDITIONAL_CONTENT_SITEB_H2,
|
||||||
siteB_p: params.ADDITIONAL_CONTENT_SITEB_P,
|
siteB_p: params.ADDITIONAL_CONTENT_SITEB_P,
|
||||||
ansible_ssh_private_key_file: env.DECYPTED_KEY_FILE
|
ansible_ssh_private_key_file: env.DECYPTED_KEY_FILE
|
||||||
@ -50,7 +67,7 @@ pipeline {
|
|||||||
playbook: 'ansible/playbook.yml',
|
playbook: 'ansible/playbook.yml',
|
||||||
inventory: "ansible/inventory.yml",
|
inventory: "ansible/inventory.yml",
|
||||||
extraVars: extraVars,
|
extraVars: extraVars,
|
||||||
limit: 'SiteA,SiteB,proxy'
|
limit: 'SiteB,proxy'
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user