gerrit: copy static files directly into container image
Copy static files directly into the container image instead of managing them dynamically with Ansible. Change-Id: I0ebe40ad2a97e87b00137af7c93a3ffa84929a2e
This commit is contained in:
parent
791d09be46
commit
227839e8ad
@ -22,6 +22,7 @@ RUN mkdir /var/gerrit/plugins && \
|
||||
unzip -jo /var/gerrit/bin/gerrit.war WEB-INF/plugins/* -d /var/gerrit/plugins
|
||||
|
||||
# NOTE(ianw) : copied into build context by playbooks/zuul/gerrit/run.yaml
|
||||
COPY opendevtheme.html /var/gerrit/plugins/opendevtheme.html
|
||||
COPY plugins/opendevtheme.html /var/gerrit/plugins/opendevtheme.html
|
||||
COPY static/ /var/gerrit/
|
||||
|
||||
COPY bazel-bin/plugins/zuul-results-summary/zuul-results-summary.jar /var/gerrit/plugins/zuul-results-summary.jar
|
||||
|
@ -17,7 +17,6 @@ gerrit_container_volumes:
|
||||
- /home/gerrit2/review_site/hooks:/var/gerrit/hooks
|
||||
- /home/gerrit2/review_site/index:/var/gerrit/index
|
||||
- /home/gerrit2/review_site/logs:/var/log/gerrit
|
||||
- /home/gerrit2/review_site/static:/var/gerrit/static
|
||||
- /home/gerrit2/review_site/tmp:/var/gerrit/tmp
|
||||
- /opt/project-config/gerrit/projects.yaml:/var/gerrit/etc/projects.yaml
|
||||
- /opt/project-config/gerrit/projects.ini:/var/gerrit/etc/projects.ini
|
||||
|
@ -59,7 +59,6 @@
|
||||
- hooks
|
||||
- index
|
||||
- logs
|
||||
- static
|
||||
- tmp
|
||||
|
||||
- name: Write Gerrit config file
|
||||
@ -207,20 +206,6 @@
|
||||
- change-abandoned
|
||||
- patchset-created
|
||||
|
||||
# TODO(mordred) These things should really go into the image instead.
|
||||
- name: Copy static and etc
|
||||
copy:
|
||||
src: "{{ item }}"
|
||||
dest: "{{ gerrit_site_dir }}/{{ item }}"
|
||||
owner: "{{ gerrit_user_name }}"
|
||||
group: "{{ gerrit_user_name }}"
|
||||
mode: preserve
|
||||
loop:
|
||||
- static/cla.html
|
||||
- static/robots.txt
|
||||
- static/system-cla.html
|
||||
- static/usg-cla.html
|
||||
|
||||
- name: Write manage-projects script
|
||||
template:
|
||||
src: "manage-projects.j2"
|
||||
|
@ -34,10 +34,25 @@
|
||||
mv $target bazel-bin
|
||||
chdir: /home/zuul/src/gerrit.googlesource.com/gerrit
|
||||
|
||||
- name: Install OpenDev theme plugin
|
||||
copy:
|
||||
src: plugins/opendevtheme.html
|
||||
dest: /home/zuul/src/gerrit.googlesource.com/gerrit/opendevtheme.html
|
||||
- name: Install static files to container build context
|
||||
block:
|
||||
- name: Ensure directories
|
||||
file:
|
||||
path: '/home/zuul/src/gerrit.googlesource.com/gerrit/{{ item }}'
|
||||
state: directory
|
||||
loop:
|
||||
- plugins
|
||||
- static
|
||||
- name: Copy static files
|
||||
copy:
|
||||
src: '{{ item }}'
|
||||
dest: '/home/zuul/src/gerrit.googlesource.com/gerrit/{{ item }}'
|
||||
loop:
|
||||
- static/cla.html
|
||||
- static/robots.txt
|
||||
- static/system-cla.html
|
||||
- static/usg-cla.html
|
||||
- plugins/opendevtheme.html
|
||||
|
||||
- name: Build docker image
|
||||
include_role:
|
||||
|
Loading…
x
Reference in New Issue
Block a user