Commit 7cf96716 by Michael Youngstrom Committed by GitHub

Merge pull request #4170 from edx/youngstrom/jenkins_local_dev

Add tag to jenkins_common to allow local dev
parents 44b56c34 4add4442
...@@ -50,6 +50,21 @@ ...@@ -50,6 +50,21 @@
- install - install
- install:system-requirements - install:system-requirements
- name: Delete any existing jenkins-configuration folders to avoid unwanted configuration
file:
path: '{{ item }}'
owner: '{{ jenkins_common_user }}'
group: '{{ jenkins_common_group }}'
state: absent
with_items:
- '{{ jenkins_common_home }}/init.groovy.d'
- '{{ jenkins_common_config_path }}'
tags:
- install
- install:base
- install:jenkins-configuration
- jenkins:local-dev
- name: Create necessary folders - name: Create necessary folders
file: file:
path: '{{ item }}' path: '{{ item }}'
...@@ -68,6 +83,8 @@ ...@@ -68,6 +83,8 @@
tags: tags:
- install - install
- install:base - install:base
- install:jenkins-configuration
- jenkins:local-dev
- name: Download Jenkins war file - name: Download Jenkins war file
get_url: get_url:
...@@ -118,6 +135,7 @@ ...@@ -118,6 +135,7 @@
- install - install
- install:base - install:base
- install:jenkins-configuration - install:jenkins-configuration
- jenkins:local-dev
- name: Run gradle libs - name: Run gradle libs
shell: './gradlew libs' shell: './gradlew libs'
...@@ -132,17 +150,28 @@ ...@@ -132,17 +150,28 @@
- install - install
- install:base - install:base
- install:jenkins-configuration - install:jenkins-configuration
- jenkins:local-dev
- name: Copy init scripts into init.groovy.d - name: Copy init scripts into init.groovy.d
command: 'cp {{ jenkins_common_git_home }}/jenkins-configuration/{{ jenkins_common_configuration_src_path }}/{{ item }} {{ jenkins_common_home }}/init.groovy.d/' command: 'cp {{ jenkins_common_git_home }}/jenkins-configuration/{{ jenkins_common_configuration_src_path }}/{{ item }} {{ jenkins_common_home }}/init.groovy.d/'
with_items: '{{ jenkins_common_configuration_scripts }}' with_items: '{{ jenkins_common_configuration_scripts }}'
become: true become: true
become_user: '{{ jenkins_common_user }}' become_user: '{{ jenkins_common_user }}'
register: init_scripts_copied
tags: tags:
- install - install
- install:base - install:base
- install:jenkins-configuration - install:jenkins-configuration
- name: Copy all init scripts other than oauth for local dev
command: 'cp {{ jenkins_common_git_home }}/jenkins-configuration/{{ jenkins_common_configuration_src_path }}/{{ item }} {{ jenkins_common_home }}/init.groovy.d/'
with_items: '{{ jenkins_common_configuration_scripts }}'
become: true
become_user: '{{ jenkins_common_user }}'
when: 'item != "4configureGHOAuth.groovy" and init_scripts_copied is not defined'
tags:
- jenkins:local-dev
- name: Create jenkins config sub folders - name: Create jenkins config sub folders
file: file:
path: '{{ item }}' path: '{{ item }}'
...@@ -156,6 +185,8 @@ ...@@ -156,6 +185,8 @@
tags: tags:
- install - install
- install:base - install:base
- install:jenkins-configuration
- jenkins:local-dev
- name: Copy non plugins template files - name: Copy non plugins template files
template: template:
...@@ -170,6 +201,17 @@ ...@@ -170,6 +201,17 @@
- install:base - install:base
- install:jenkins-configuration - install:jenkins-configuration
- name: For local dev, copy any config files other than oauth
template:
src: '{{ role_path }}/templates/config/{{ item }}.yml.j2'
dest: '{{ jenkins_common_config_path }}/{{ item }}.yml'
owner: '{{ jenkins_common_user }}'
group: '{{ jenkins_common_group }}'
with_items: '{{ jenkins_common_non_plugin_template_files }}'
when: 'item != "security" and templates_copied is not defined'
tags:
- jenkins:local-dev
- name: Update Github OAUTH settings when promoting jenkins instance to production - name: Update Github OAUTH settings when promoting jenkins instance to production
template: template:
src: '{{ role_path }}/templates/config/security.yml.j2' src: '{{ role_path }}/templates/config/security.yml.j2'
...@@ -191,6 +233,7 @@ ...@@ -191,6 +233,7 @@
- install:base - install:base
- install:plugins - install:plugins
- install:jenkins-configuration - install:jenkins-configuration
- jenkins:local-dev
- name: Copy ec2 config files - name: Copy ec2 config files
template: template:
...@@ -204,6 +247,7 @@ ...@@ -204,6 +247,7 @@
- install - install
- install:base - install:base
- install:jenkins-configuration - install:jenkins-configuration
- jenkins:local-dev
- name: Copy xml config files - name: Copy xml config files
template: template:
...@@ -217,6 +261,7 @@ ...@@ -217,6 +261,7 @@
- install - install
- install:base - install:base
- install:jenkins-configuration - install:jenkins-configuration
- jenkins:local-dev
- name: Run plugins.gradle - name: Run plugins.gradle
shell: './gradlew -b plugins.gradle plugins' shell: './gradlew -b plugins.gradle plugins'
...@@ -232,6 +277,7 @@ ...@@ -232,6 +277,7 @@
- install:base - install:base
- install:plugins - install:plugins
- install:jenkins-configuration - install:jenkins-configuration
- jenkins:local-dev
- name: Copy secret file credentials - name: Copy secret file credentials
copy: copy:
...@@ -243,6 +289,7 @@ ...@@ -243,6 +289,7 @@
- install - install
- install:base - install:base
- install:jenkins-configuration - install:jenkins-configuration
- jenkins:local-dev
- name: Copy ssh key credentials - name: Copy ssh key credentials
copy: copy:
...@@ -256,6 +303,7 @@ ...@@ -256,6 +303,7 @@
- install - install
- install:base - install:base
- install:jenkins-configuration - install:jenkins-configuration
- jenkins:local-dev
- name: Copy ec2 key - name: Copy ec2 key
copy: copy:
...@@ -268,6 +316,7 @@ ...@@ -268,6 +316,7 @@
- install - install
- install:base - install:base
- install:jenkins-configuration - install:jenkins-configuration
- jenkins:local-dev
- name: Start Jenkins Service - name: Start Jenkins Service
systemd: systemd:
......
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