Added playbook for jjb
Change-Id: Ib5b539375fed1db99c7882f91cce34d0fbe6f520
This commit is contained in:
parent
d1965d736a
commit
8a2c9375d8
|
@ -1,6 +0,0 @@
|
|||
[jenkins]
|
||||
user=USER
|
||||
password=PASSWORD
|
||||
url=http://127.0.0.1/jenkins
|
||||
[job_builder]
|
||||
ignore_cache=True
|
|
@ -13,7 +13,13 @@ parameterized-trigger, pathignore, postbuild-task, project-stats-plugin, publish
|
|||
publish-over-ssh, rebuild, ruby-runtime, run-condition, scm-api, scp, simple-theme-plugin,
|
||||
ssh-agent, ssh-credentials, ssh-slaves, subversion, timestamper, token-macro,
|
||||
translation, windows-slaves, ws-cleanup, zmq-event-publisher]
|
||||
jenkins_user: jenkins
|
||||
|
||||
# Zuul params
|
||||
zuul_user: zuul
|
||||
zuul_git_url: git://git.openstack.org/openstack-infra/zuul
|
||||
|
||||
# jjb params
|
||||
jjb_git_url: git://git.openstack.org/openstack-infra/jenkins-job-builder
|
||||
jjb_auth_username: admin
|
||||
jjb_auth_password: admin
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
with_items:
|
||||
- nodepool
|
||||
- zuul
|
||||
- "{{ jenkins_user }}"
|
||||
|
||||
- name: Create users
|
||||
user:
|
||||
|
@ -45,3 +46,4 @@
|
|||
with_items:
|
||||
- nodepool
|
||||
- zuul
|
||||
- "{{ jenkins_user }}"
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
---
|
||||
- name: Create jjb directories
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
owner: "{{ jenkins_user }}"
|
||||
group: "{{ jenkins_user }}"
|
||||
mode: 0755
|
||||
state: directory
|
||||
with_items:
|
||||
- /etc/jenkins_jobs
|
||||
- "{{ ci_dir }}/jjb"
|
||||
|
||||
- name: Clone jjb repo
|
||||
git:
|
||||
repo: "{{ jjb_git_url }}"
|
||||
dest: "{{ ci_dir}}/jjb"
|
||||
become: true
|
||||
become_user: "{{ jenkins_user }}"
|
||||
|
||||
- name: Install jjb to virtualenv
|
||||
command: tox -e venv --notest
|
||||
args:
|
||||
chdir: "{{ ci_dir }}/jjb"
|
||||
become: true
|
||||
become_user: "{{ jenkins_user }}"
|
||||
|
||||
- name: Copy configs
|
||||
template:
|
||||
src: "{{ item }}.j2"
|
||||
dest: "/etc/jenkins_jobs/{{ item }}"
|
||||
become: true
|
||||
with_items:
|
||||
- credentials.conf
|
||||
- jenkins_jobs.ini
|
|
@ -0,0 +1,7 @@
|
|||
[jenkins]
|
||||
user={{ jjb_auth_username }}
|
||||
password={{ jjb_auth_password }}
|
||||
#TODO(esikachev): Change 8080 to /jenkins
|
||||
url=http://127.0.0.1:8080
|
||||
[job_builder]
|
||||
ignore_cache=True
|
|
@ -19,6 +19,11 @@
|
|||
mode: 0755
|
||||
state: directory
|
||||
|
||||
- name: Install jjb
|
||||
hosts: localhost
|
||||
roles:
|
||||
- jjb
|
||||
|
||||
- name: Install zuul
|
||||
hosts: localhost
|
||||
roles:
|
||||
|
|
Loading…
Reference in New Issue