fix jenkinsfile&proxyconf
This commit is contained in:
parent
5c2eb4a087
commit
4110aa63c1
29
ansible/Jenkinsfile
vendored
29
ansible/Jenkinsfile
vendored
@ -7,10 +7,10 @@ pipeline {
|
||||
}
|
||||
|
||||
parameters {
|
||||
string(name: 'ADDITIONAL_CONTENT_SITEA_H2', defaultValue: 'Новое сообщение для SiteA', description: 'Дополнительный <h2> контент для SiteA')
|
||||
string(name: 'ADDITIONAL_CONTENT_SITEA_P', defaultValue: 'Дополнительный параграф для SiteA', description: 'Дополнительный <p> контент для SiteA')
|
||||
string(name: 'ADDITIONAL_CONTENT_SITEB_H2', defaultValue: 'Новое сообщение для SiteB', description: 'Дополнительный <h2> контент для SiteB')
|
||||
string(name: 'ADDITIONAL_CONTENT_SITEB_P', defaultValue: 'Дополнительный параграф для SiteB', description: 'Дополнительный <p> контент для SiteB')
|
||||
string(name: 'ADDITIONAL_CONTENT_SITEA_H2', defaultValue: 'Новое сообщение для SiteA', description: 'Additional <h2> content for SiteA')
|
||||
string(name: 'ADDITIONAL_CONTENT_SITEA_P', defaultValue: 'Дополнительный параграф для SiteA', description: 'Additional <p> content for SiteA')
|
||||
string(name: 'ADDITIONAL_CONTENT_SITEB_H2', defaultValue: 'Новое сообщение для SiteB', description: 'Additional <h2> content for SiteB')
|
||||
string(name: 'ADDITIONAL_CONTENT_SITEB_P', defaultValue: 'Дополнительный параграф для SiteB', description: 'Additional <p> content for SiteB')
|
||||
}
|
||||
|
||||
stages {
|
||||
@ -35,29 +35,12 @@ pipeline {
|
||||
}
|
||||
}
|
||||
|
||||
stage('Deploy SiteA') {
|
||||
stage('Deploy Site') {
|
||||
steps {
|
||||
script {
|
||||
def extraVars = [
|
||||
siteA_h2: params.ADDITIONAL_CONTENT_SITEA_H2,
|
||||
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_p: params.ADDITIONAL_CONTENT_SITEB_P,
|
||||
ansible_ssh_private_key_file: env.DECYPTED_KEY_FILE
|
||||
@ -67,7 +50,7 @@ pipeline {
|
||||
playbook: 'ansible/playbook.yml',
|
||||
inventory: "ansible/inventory.yml",
|
||||
extraVars: extraVars,
|
||||
limit: 'SiteB,proxy'
|
||||
limit: 'SiteA,SiteB,proxy'
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
upstream backend {
|
||||
{% for server in upstream_servers %}
|
||||
server {{ server }} max_fails=1 fail_timeout=5s;
|
||||
server {{ server }} max_fails=1 fail_timeout=1s;
|
||||
{% endfor %}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user