Commit 0e74497c by Michael Youngstrom

Fix problems with jenkins_common role

parent ee6edcda
......@@ -13,7 +13,6 @@
roles:
- aws
- role: jenkins_build
build_jenkins_server_name: test-jenkins.testeng.edx.org
build_jenkins_configuration_scripts:
- 1addJarsToClasspath.groovy
- 2checkInstalledPlugins.groovy
......
......@@ -16,4 +16,4 @@ dependencies:
jenkins_common_log_list: '{{ build_jenkins_log_list }}'
jenkins_common_history_max_days: '{{ build_jenkins_history_max_days }}'
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
jenkins_common_war_source: https://s3.amazonaws.com/edx-testeng-tools/jenkins
jenkins_common_nginx_port: 80
jenkins_common_protocol_https: true
jenkins_common_server_name: jenkins.example.org
JENKINS_SERVER_NAME: jenkins.example.org
jenkins_common_debian_pkgs:
- nginx
......@@ -107,7 +108,8 @@ JENKINS_SECRET_FILES_LIST: []
JENKINS_USERNAME_PASSWORD_LIST: []
JENKINS_SECRET_TEXT_LIST: []
JENKINS_CERTIFICATES_LIST: []
JENKINS_SSH_LIST: []
JENKINS_MASTER_SSH_LIST: []
JENKINS_CUSTOM_SSH_LIST: []
# security
jenkins_common_security_scopes: 'read:org,user:email'
......
......@@ -14,7 +14,7 @@ dependencies:
nginx_template_dir: "etc/nginx/sites-available"
nginx_sites: jenkins
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_protocol_https: "{{ jenkins_common_protocol_https }}"
- role: oraclejdk
......
......@@ -164,7 +164,7 @@
- install:plugins
- install:jenkins-configuration
- name: Copy credentials into files
- name: Copy secret file credentials
copy:
content: "{{ item.content }}"
dest: '{{ jenkins_common_config_path }}/credentials/{{ item.name }}'
......@@ -175,6 +175,17 @@
- install:base
- 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
copy:
content: '{{ JENKINS_EC2_PRIVATE_KEY }}'
......
......@@ -12,7 +12,7 @@
scope: '{{ userPass.scope }}'
username: '{{ userPass.username }}'
password: '{{ userPass.password }}'
description: '{{ userPass.password }}'
description: '{{ userPass.description }}'
id: '{{ userPass.id }}'
{% endfor %}
{% for text in JENKINS_SECRET_TEXT_LIST %}
......@@ -30,14 +30,20 @@
description: '{{ cert.description }}'
id: '{{ cert.id }}'
{% endfor %}
{% for ssh in JENKINS_SSH_LIST %}
{% for master_ssh in JENKINS_MASTER_SSH_LIST %}
- credentialType: 'ssh'
scope: '{{ ssh.scope }}'
username: '{{ ssh.username }}'
isJenkinsMasterSsh: '{{ ssh.isJenkinsMasterSsh}}'
{% if not isJenkinsMasterSsh %}
path: '{{ ssh.path }}'
{% endif %}
passphrase: '{{ ssh.passphrase }}'
description: '{{ ssh.description }}'
scope: '{{ master_ssh.scope }}'
username: '{{ master_ssh.username }}'
isJenkinsMasterSsh: true
passphrase: '{{ master_ssh.passphrase }}'
description: '{{ master_ssh.description }}'
{% endfor %}
{% for custom_ssh in JENKINS_CUSTOM_SSH_LIST %}
- 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 %}
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