system-config/playbooks/roles/gerrit/templates/manage-projects.j2

28 lines
1.1 KiB
Django/Jinja

#!/bin/bash
# Copyright 2020 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
exec docker run --rm --net=host -u root \
-v/opt/project-config:/opt/project-config \
-v/opt/project-config/gerrit/acls:/home/gerrit2/acls \
-v/opt/project-config/gerrit/projects.yaml:/home/gerrit2/projects.yaml \
-v/opt/lib/git:/opt/lib/git \
-v/opt/lib/jeepyb:/opt/lib/jeepyb \
-v/home/gerrit2/review_site/etc/ssh_project_rsa_key:/home/gerrit2/review_site/etc/ssh_project_rsa_key \
-v/home/gerrit2/projects.ini:/home/gerrit2/projects.ini \
-v/root/.ssh/known_hosts:/root/.ssh/known_hosts \
-v/var/log:/var/log \
{{ gerrit_container_image }} manage-projects $@