Add gitea-init image jobs

Add jobs to build, upload, and promote a gitea-init image to
Docker Hub.

Change-Id: I7f3ed47ec4c58c118dd3b234a4e20ced3a998999
This commit is contained in:
James E. Blair 2019-01-15 14:33:07 -08:00
parent 31de26ff39
commit de9e62975a
3 changed files with 79 additions and 0 deletions

View File

@ -109,6 +109,33 @@
vars: *jinja-init_vars
files: *jinja-init_files
# Gitea-init jobs
- job:
name: system-config-build-image-gitea-init
description: Build a gitea-init image.
parent: system-config-build-image
vars: &gitea-init_vars
images:
- context: docker/gitea-init
target: gitea-init
repository: opendevorg/gitea-init
files: &gitea-init_files
- docker/gitea-init/.*
- job:
name: system-config-upload-image-gitea-init
description: Build and upload a gitea-init image.
parent: system-config-upload-image
vars: *gitea-init_vars
files: *gitea-init_files
- job:
name: system-config-promote-image-gitea-init
description: Promote a previously published gitea-init image to latest.
parent: system-config-promote-image
vars: *gitea-init_vars
files: *gitea-init_files
# Role integration jobs. These test the top-level generic roles/*
# under Zuul. The range of platforms should be the same as those for
# openstack-zuul-jobs.
@ -392,6 +419,7 @@
- system-config-run-nodepool
- system-config-run-docker
- system-config-build-image-jinja-init
- system-config-build-image-gitea-init
gate:
jobs:
- tox-linters
@ -406,6 +434,8 @@
- system-config-run-nodepool
- system-config-run-docker
- system-config-upload-image-jinja-init
- system-config-upload-image-gitea-init
promote:
jobs:
- system-config-promote-image-jinja-init
- system-config-promote-image-gitea-init

View File

@ -0,0 +1,19 @@
# Copyright 2018 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.
FROM opendevorg/jinja-init
COPY entrypoint.sh /
ENTRYPOINT ["/entrypoint.sh"]

30
docker/gitea-init/entrypoint.sh Executable file
View File

@ -0,0 +1,30 @@
#!/bin/sh
# Copyright 2018 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.
# Create directories needed by gitea
mkdir -p /data/git
chown 1000:1000 /data/git
mkdir -p /data/gitea
chown 1000:1000 /data/gitea
# This one is used by openssh and can remain root-owned
mkdir -p /data/ssh
# Template the config file (which can also be root-owned)
export JINJA_SRC_FILE=/config_src/app.ini.j2
export JINJA_DEST_FILE=/conf/app.ini
python /run.py