Merge "Add an use a utility service for gerrit commands"
This commit is contained in:
commit
f214917274
@ -1,14 +1,10 @@
|
|||||||
# TODO(mordred) Make this suck less, like if we could do an init container
|
|
||||||
# or something just generally less gross.
|
|
||||||
- name: Run gerrit init
|
- name: Run gerrit init
|
||||||
|
shell:
|
||||||
|
cmd: >
|
||||||
|
docker-compose run shell
|
||||||
|
java -jar /var/gerrit/bin/gerrit.war init -d /var/gerrit -b --no-auto-start --install-all-plugins
|
||||||
|
chdir: /etc/gerrit-compose/
|
||||||
when: gerrit_run_init | bool
|
when: gerrit_run_init | bool
|
||||||
command: >
|
|
||||||
docker run --rm --net=host -u gerrit
|
|
||||||
{% for volume in gerrit_container_volumes %}
|
|
||||||
-v {{ volume }}
|
|
||||||
{% endfor %}
|
|
||||||
{{ gerrit_container_image }}
|
|
||||||
/usr/local/openjdk-8/bin/java -jar /var/gerrit/bin/gerrit.war init -d /var/gerrit -b --no-auto-start --install-all-plugins
|
|
||||||
|
|
||||||
- name: Run docker-compose up
|
- name: Run docker-compose up
|
||||||
shell:
|
shell:
|
||||||
|
@ -8,4 +8,15 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
{% for volume in gerrit_container_volumes %}
|
{% for volume in gerrit_container_volumes %}
|
||||||
- {{ volume }}
|
- {{ volume }}
|
||||||
|
{% endfor %}
|
||||||
|
# Utility "service" to allow us to run ad-hoc commands
|
||||||
|
shell:
|
||||||
|
image: {{ gerrit_container_image }}
|
||||||
|
restart: 'no'
|
||||||
|
command: /bin/true
|
||||||
|
network_mode: host
|
||||||
|
user: gerrit
|
||||||
|
volumes:
|
||||||
|
{% for volume in gerrit_container_volumes %}
|
||||||
|
- {{ volume }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user