Commit 05f4a0ce by Michael Youngstrom Committed by GitHub

Merge pull request #4094 from edx/youngstrom/jenkins_build_fix

Fixes for jenkins_common role
parents ee6edcda 0e74497c
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
roles: roles:
- aws - aws
- role: jenkins_build - role: jenkins_build
build_jenkins_server_name: test-jenkins.testeng.edx.org
build_jenkins_configuration_scripts: build_jenkins_configuration_scripts:
- 1addJarsToClasspath.groovy - 1addJarsToClasspath.groovy
- 2checkInstalledPlugins.groovy - 2checkInstalledPlugins.groovy
......
...@@ -16,4 +16,4 @@ dependencies: ...@@ -16,4 +16,4 @@ dependencies:
jenkins_common_log_list: '{{ build_jenkins_log_list }}' jenkins_common_log_list: '{{ build_jenkins_log_list }}'
jenkins_common_history_max_days: '{{ build_jenkins_history_max_days }}' jenkins_common_history_max_days: '{{ build_jenkins_history_max_days }}'
jenkins_common_history_exclude_pattern: '{{ build_jenkins_history_exclude_pattern }}' jenkins_common_history_exclude_pattern: '{{ build_jenkins_history_exclude_pattern }}'
jenkins_common_server_name: '{{ build_jenkins_server_name }}' jenkins_common_server_name: '{{ JENKINS_SERVER_NAME }}'
...@@ -7,7 +7,8 @@ jenkins_common_version: jenkins_1.651.3 ...@@ -7,7 +7,8 @@ jenkins_common_version: jenkins_1.651.3
jenkins_common_war_source: https://s3.amazonaws.com/edx-testeng-tools/jenkins jenkins_common_war_source: https://s3.amazonaws.com/edx-testeng-tools/jenkins
jenkins_common_nginx_port: 80 jenkins_common_nginx_port: 80
jenkins_common_protocol_https: true jenkins_common_protocol_https: true
jenkins_common_server_name: jenkins.example.org
JENKINS_SERVER_NAME: jenkins.example.org
jenkins_common_debian_pkgs: jenkins_common_debian_pkgs:
- nginx - nginx
...@@ -107,7 +108,8 @@ JENKINS_SECRET_FILES_LIST: [] ...@@ -107,7 +108,8 @@ JENKINS_SECRET_FILES_LIST: []
JENKINS_USERNAME_PASSWORD_LIST: [] JENKINS_USERNAME_PASSWORD_LIST: []
JENKINS_SECRET_TEXT_LIST: [] JENKINS_SECRET_TEXT_LIST: []
JENKINS_CERTIFICATES_LIST: [] JENKINS_CERTIFICATES_LIST: []
JENKINS_SSH_LIST: [] JENKINS_MASTER_SSH_LIST: []
JENKINS_CUSTOM_SSH_LIST: []
# security # security
jenkins_common_security_scopes: 'read:org,user:email' jenkins_common_security_scopes: 'read:org,user:email'
......
...@@ -14,7 +14,7 @@ dependencies: ...@@ -14,7 +14,7 @@ dependencies:
nginx_template_dir: "etc/nginx/sites-available" nginx_template_dir: "etc/nginx/sites-available"
nginx_sites: jenkins nginx_sites: jenkins
jenkins_nginx_port: "{{ jenkins_common_nginx_port }}" jenkins_nginx_port: "{{ jenkins_common_nginx_port }}"
jenkins_server_name: "{{ jenkins_common_server_name }}" jenkins_server_name: "{{ JENKINS_SERVER_NAME }}"
jenkins_port: "{{ jenkins_common_port }}" jenkins_port: "{{ jenkins_common_port }}"
jenkins_protocol_https: "{{ jenkins_common_protocol_https }}" jenkins_protocol_https: "{{ jenkins_common_protocol_https }}"
- role: oraclejdk - role: oraclejdk
......
...@@ -164,7 +164,7 @@ ...@@ -164,7 +164,7 @@
- install:plugins - install:plugins
- install:jenkins-configuration - install:jenkins-configuration
- name: Copy credentials into files - name: Copy secret file credentials
copy: copy:
content: "{{ item.content }}" content: "{{ item.content }}"
dest: '{{ jenkins_common_config_path }}/credentials/{{ item.name }}' dest: '{{ jenkins_common_config_path }}/credentials/{{ item.name }}'
...@@ -175,6 +175,17 @@ ...@@ -175,6 +175,17 @@
- install:base - install:base
- install:jenkins-configuration - install:jenkins-configuration
- name: Copy ssh key credentials
copy:
content: "{{ item.content }}"
dest: '{{ jenkins_common_config_path }}/credentials/{{ item.name }}'
with_items: '{{ JENKINS_CUSTOM_SSH_LIST }}'
no_log: yes
tags:
- install
- install:base
- install:jenkins-configuration
- name: Copy ec2 key - name: Copy ec2 key
copy: copy:
content: '{{ JENKINS_EC2_PRIVATE_KEY }}' content: '{{ JENKINS_EC2_PRIVATE_KEY }}'
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
scope: '{{ userPass.scope }}' scope: '{{ userPass.scope }}'
username: '{{ userPass.username }}' username: '{{ userPass.username }}'
password: '{{ userPass.password }}' password: '{{ userPass.password }}'
description: '{{ userPass.password }}' description: '{{ userPass.description }}'
id: '{{ userPass.id }}' id: '{{ userPass.id }}'
{% endfor %} {% endfor %}
{% for text in JENKINS_SECRET_TEXT_LIST %} {% for text in JENKINS_SECRET_TEXT_LIST %}
...@@ -30,14 +30,20 @@ ...@@ -30,14 +30,20 @@
description: '{{ cert.description }}' description: '{{ cert.description }}'
id: '{{ cert.id }}' id: '{{ cert.id }}'
{% endfor %} {% endfor %}
{% for ssh in JENKINS_SSH_LIST %} {% for master_ssh in JENKINS_MASTER_SSH_LIST %}
- credentialType: 'ssh' - credentialType: 'ssh'
scope: '{{ ssh.scope }}' scope: '{{ master_ssh.scope }}'
username: '{{ ssh.username }}' username: '{{ master_ssh.username }}'
isJenkinsMasterSsh: '{{ ssh.isJenkinsMasterSsh}}' isJenkinsMasterSsh: true
{% if not isJenkinsMasterSsh %} passphrase: '{{ master_ssh.passphrase }}'
path: '{{ ssh.path }}' description: '{{ master_ssh.description }}'
{% endif %} {% endfor %}
passphrase: '{{ ssh.passphrase }}' {% for custom_ssh in JENKINS_CUSTOM_SSH_LIST %}
description: '{{ ssh.description }}' - credentialType: 'ssh'
scope: '{{ custom_ssh.scope }}'
username: '{{ custom_ssh.username }}'
isJenkinsMasterSsh: false
path: 'credentials/{{ custom_ssh.name }}'
passphrase: '{{ custom_ssh.passphrase }}'
description: '{{ custom_ssh.description }}'
{% endfor %} {% endfor %}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment