Use opendev base docker image and add jobs
The other zuul containers use the python-builder/python-base pattern for the container images. Use that, and add a container build job This is only the build container job. We need to add the secret for upload and promote. Change-Id: I110d47995411323dcf4eaed2962c238ee67d62cf
This commit is contained in:
committed by
James E. Blair
parent
bf54ed0b03
commit
e4e623920d
19
.zuul.yaml
19
.zuul.yaml
@@ -1,6 +1,25 @@
|
||||
- job:
|
||||
name: zuul-storage-proxy-build-image
|
||||
description: Build and test a Docker image.
|
||||
parent: opendev-build-docker-image
|
||||
allowed-projects: zuul/zuul-storage-proxy
|
||||
provides: zuul-storage-proxy-container-image
|
||||
vars: &image_vars
|
||||
docker_images:
|
||||
- context: .
|
||||
repository: zuul/zuul-storage-proxy
|
||||
target: zuul-storage-proxy
|
||||
tags:
|
||||
# If zuul.tag is defined: [ '3', '3.19', '3.19.0' ]. Only works for 3-component tags.
|
||||
# Otherwise: ['latest']
|
||||
&imagetag "{{ zuul.tag is defined | ternary([zuul.get('tag', '').split('.')[0], '.'.join(zuul.get('tag', '').split('.')[:2]), zuul.get('tag', '')], ['latest']) }}"
|
||||
|
||||
- project:
|
||||
vars:
|
||||
release_python: python3
|
||||
check:
|
||||
jobs:
|
||||
- zuul-storage-proxy-build-image
|
||||
- tox-linters:
|
||||
vars:
|
||||
tox_install_bindep: false
|
||||
|
||||
15
Dockerfile
15
Dockerfile
@@ -1,13 +1,12 @@
|
||||
FROM python:3.6-slim
|
||||
FROM docker.io/opendevorg/python-builder as builder
|
||||
|
||||
RUN python -m venv /opt/swift-proxy
|
||||
COPY . /tmp/src
|
||||
RUN assemble
|
||||
|
||||
RUN mkdir -p /opt/swift-proxy-src
|
||||
FROM docker.io/opendevorg/python-base as zuul-storage-proxy
|
||||
|
||||
COPY . /opt/swift-proxy-src/
|
||||
|
||||
RUN PBR_VERSION=1.0.0 /opt/swift-proxy/bin/pip install /opt/swift-proxy-src
|
||||
COPY --from=builder /output/ /output
|
||||
RUN /output/install-from-bindep
|
||||
|
||||
EXPOSE 8000
|
||||
|
||||
CMD /opt/swift-proxy/bin/gunicorn -k eventlet -t 3600 --workers 10 swift_proxy:proxy
|
||||
CMD ["/usr/local/bin/gunicorn", "-k", "eventlet", "-t", "3600", "--workers", "10", "swift_proxy:proxy"]
|
||||
|
||||
3
bindep.txt
Normal file
3
bindep.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
gcc [compile test]
|
||||
g++ [compile test platform:apk platform:dpkg]
|
||||
gcc-c++ [compile test platform:rpm]
|
||||
Reference in New Issue
Block a user