Add a uwsgi-base container image

For things using the builder/base pattern providing uwsgi services.

Change-Id: Iaf6d31a3d119f6b7e87b54cda1969a9994110dad
This commit is contained in:
Monty Taylor 2020-03-19 13:03:22 -05:00 committed by Mohammed Naser
parent f3304c38d5
commit 08a807e188
3 changed files with 138 additions and 0 deletions

View File

@ -771,6 +771,104 @@
vars: *python-base-3_8_vars
files: *python-base-3_8_files
# uwsgi-base-3.7 jobs
- job:
name: system-config-build-image-uwsgi-base-3.7
description: Build a uwsgi-base-3.7 image.
parent: system-config-build-image
requires: &uwsgi-base_3_7_requires
- python-base-3.7-container-image
- python-builder-3.7-container-image
provides: uwsgi-base-3.7-container-image
dependencies:
- name: system-config-build-image-python-base-3.7
soft: true
- name: system-config-build-image-python-builder-3.7
soft: true
vars: &uwsgi-base_3_7_vars
docker_images:
- context: docker/uwsgi-base
repository: opendevorg/uwsgi-base
tags:
- 3.7
- latest
build_args:
- PYTHON_VERSION=3.7
files: &uwsgi-base_3_7_files
- docker/python-base/.*
- docker/python-builder/.*
- docker/uwsgi-base/.*
- job:
name: system-config-upload-image-uwsgi-base-3.7
description: Build and upload a uwsgi-base-3.7 image.
parent: system-config-upload-image
provides: uwsgi-base-3.7-container-image
requires: *uwsgi-base_3_7_requires
dependencies:
- name: system-config-upload-image-python-base-3.7
soft: true
- name: system-config-upload-image-python-builder-3.7
soft: true
vars: *uwsgi-base_3_7_vars
files: *uwsgi-base_3_7_files
- job:
name: system-config-promote-image-uwsgi-base-3.7
description: Promote a previously published uwsgi-base-3.7 image to latest.
parent: system-config-promote-image
vars: *uwsgi-base_3_7_vars
files: *uwsgi-base_3_7_files
# uwsgi-base-3.8 jobs
- job:
name: system-config-build-image-uwsgi-base-3.8
description: Build a uwsgi-base-3.8 image.
parent: system-config-build-image
provides: uwsgi-base-3.8-container-image
requires: &uwsgi-base_3_8_requires
- python-base-3.8-container-image
- python-builder-3.8-container-image
dependencies:
- name: system-config-build-image-python-base-3.8
soft: true
- name: system-config-build-image-python-builder-3.8
soft: true
vars: &uwsgi-base_3_8_vars
docker_images:
- context: docker/uwsgi-base
repository: opendevorg/uwsgi-base
tags:
- 3.8
build_args:
- PYTHON_VERSION=3.8
files: &uwsgi-base_3_8_files
- docker/python-base/.*
- docker/python-builder/.*
- docker/uwsgi-base/.*
- job:
name: system-config-upload-image-uwsgi-base-3.8
description: Build and upload a uwsgi-base-3.8 image.
parent: system-config-upload-image
provides: uwsgi-base-3.8-container-image
requires: *uwsgi-base_3_8_requires
dependencies:
- name: system-config-upload-image-python-base-3.8
soft: true
- name: system-config-upload-image-python-builder-3.8
soft: true
vars: *uwsgi-base_3_8_vars
files: *uwsgi-base_3_8_files
- job:
name: system-config-promote-image-uwsgi-base-3.8
description: Promote a previously published uwsgi-base-3.8 image to latest.
parent: system-config-promote-image
vars: *uwsgi-base_3_8_vars
files: *uwsgi-base_3_8_files
# gerrit-base jobs
- job:
name: system-config-build-image-gerrit-base
@ -2535,6 +2633,8 @@
- system-config-build-image-python-base-3.8
- system-config-build-image-python-builder-3.7
- system-config-build-image-python-builder-3.8
- system-config-build-image-uwsgi-base-3.7
- system-config-build-image-uwsgi-base-3.8
check-arm64:
jobs:
- system-config-run-mirror-arm64
@ -2599,6 +2699,8 @@
- system-config-upload-image-python-base-3.8
- system-config-upload-image-python-builder-3.7
- system-config-upload-image-python-builder-3.8
- system-config-upload-image-uwsgi-base-3.7
- system-config-upload-image-uwsgi-base-3.8
promote:
jobs:
- opendev-promote-docs
@ -2614,6 +2716,8 @@
- system-config-promote-image-python-base-3.8
- system-config-promote-image-python-builder-3.7
- system-config-promote-image-python-builder-3.8
- system-config-promote-image-uwsgi-base-3.7
- system-config-promote-image-uwsgi-base-3.8
- infra-prod-install-ansible
- infra-prod-base
- infra-prod-service-letsencrypt

View File

@ -0,0 +1,29 @@
# Copyright (c) 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.
ARG PYTHON_VERSION=3.7
FROM docker.io/opendevorg/python-builder:${PYTHON_VERSION} as builder
COPY . /tmp/src
RUN assemble uWSGI
FROM docker.io/opendevorg/python-base:${PYTHON_VERSION}
COPY --from=builder /output/ /output
RUN /output/install-from-bindep
ENV UWSGI_MASTER=1 UWSGI_UID=nobody UWSGI_GID=nogroup
CMD ["/usr/local/bin/uwsgi"]

View File

@ -0,0 +1,5 @@
gcc [compile]
libc6-dev [compile]
libffi-dev [compile platform:dpkg]
libffi6 [platform:dpkg]
libssl-dev [compile platform:dpkg]