|
|
92ac25a |
From 089471c8fbe655ae1e519fb415394aa9485a6554 Mon Sep 17 00:00:00 2001
|
|
|
92ac25a |
From: Mohammed Naser <mnaser@vexxhost.com>
|
|
|
92ac25a |
Date: Mon, 14 Oct 2019 12:27:29 -0400
|
|
|
92ac25a |
Subject: [PATCH 6/9] Added Docker image builds
|
|
|
92ac25a |
|
|
|
92ac25a |
Change-Id: If0b5c982020faf0f512a1c0d9b7b495789b9aa4f
|
|
|
92ac25a |
Signed-off-by: Matthieu Huin <mhuin@redhat.com>
|
|
|
92ac25a |
---
|
|
|
92ac25a |
.zuul.yaml | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
|
92ac25a |
Dockerfile | 26 +++++++++++++++++++++
|
|
|
92ac25a |
2 files changed, 92 insertions(+)
|
|
|
92ac25a |
create mode 100644 Dockerfile
|
|
|
92ac25a |
|
|
|
92ac25a |
diff --git a/.zuul.yaml b/.zuul.yaml
|
|
|
92ac25a |
index 7a12e67..49e6f97 100644
|
|
|
92ac25a |
--- a/.zuul.yaml
|
|
|
92ac25a |
+++ b/.zuul.yaml
|
|
|
92ac25a |
@@ -1,3 +1,58 @@
|
|
|
92ac25a |
+- secret:
|
|
|
92ac25a |
+ name: gear-opendev-dockerhub
|
|
|
92ac25a |
+ data:
|
|
|
92ac25a |
+ username: opendevzuul
|
|
|
92ac25a |
+ password: !encrypted/pkcs1-oaep
|
|
|
92ac25a |
+ - bROAu0oGBv+2l67dlC94t+s33rmdogBhWzyk7d/Zj7bSHZtfap2f1u+0RWogAKwjRtxtR
|
|
|
92ac25a |
+ C6mqoVjKdWd+qBcnek0U/6Czgnhp5og3d9rsN+3SeQ9aOTTjoYkiqsg+c7N0rMh1AGndG
|
|
|
92ac25a |
+ Qn3LU8i0EDGfzn5C+1KTcRHJ5brSrZzB+GsiXZxm8eLlupuFCep/yrUcnsH6f73sKGHQI
|
|
|
92ac25a |
+ C9OcENQCelPLEdEtLb1eyx0hL1+o1ar0FdRCDrvZwih1SE/UUa18Zi7QCMEmkwZ8fil7B
|
|
|
92ac25a |
+ zVtcBSTxTqIY49bgjerUykq0YKH1gTZrVC+UPFPjPZfNS39fxgcdqUMgbUTuWCoIrI0Jh
|
|
|
92ac25a |
+ 2pKg+KZ/3L8zqcmqOZFQOFvVi7zOtXdKZI3rmWRAzM/BgVXFeBsQZkGZ75TzE8Xm70uA4
|
|
|
92ac25a |
+ WYdIva8kjBLrTz1/uRijZqNSrwM2fGO3VI+1SXUQI6FWJfZ+uSWzCDk9JswLPFzoXa7+J
|
|
|
92ac25a |
+ ASDaygdGvU6q+pkxOQ/v9lgTnwZCdEAoCRdSZBKz/y3OosKAYIRIismLRJ9Kfkqxl8IEi
|
|
|
92ac25a |
+ /0U+rSsWpWb5jufUcwAmL2Rj6YVcgUl3qSq2TzP3R+DPPda6Et4NZQ3RLpWP8if4VuNq7
|
|
|
92ac25a |
+ gJ2yQTSLJLOG6nhDMRJoW3GLjUMWUw3sbvFE1VzcIggIs4mfxVp21Ps/6hRoAI=
|
|
|
92ac25a |
+
|
|
|
92ac25a |
+- job:
|
|
|
92ac25a |
+ name: gear-build-opendev-image
|
|
|
92ac25a |
+ parent: opendev-build-docker-image
|
|
|
92ac25a |
+ description: Build OpenDev Docker images for gear
|
|
|
92ac25a |
+ requires:
|
|
|
92ac25a |
+ - python-base-container-image
|
|
|
92ac25a |
+ - python-builder-container-image
|
|
|
92ac25a |
+ provides: gear-container-image
|
|
|
92ac25a |
+ vars: &gear_opendev_image_vars
|
|
|
92ac25a |
+ zuul_work_dir: src/opendev.org/opendev/gear
|
|
|
92ac25a |
+ docker_images:
|
|
|
92ac25a |
+ - context: .
|
|
|
92ac25a |
+ repository: opendevorg/geard
|
|
|
92ac25a |
+ target: geard
|
|
|
92ac25a |
+
|
|
|
92ac25a |
+- job:
|
|
|
92ac25a |
+ name: gear-upload-opendev-image
|
|
|
92ac25a |
+ parent: opendev-upload-docker-image
|
|
|
92ac25a |
+ description: Build OpenDev gear Docker images and upload to Docker Hub.
|
|
|
92ac25a |
+ requires:
|
|
|
92ac25a |
+ - python-base-container-image
|
|
|
92ac25a |
+ - python-builder-container-image
|
|
|
92ac25a |
+ provides: gear-container-image
|
|
|
92ac25a |
+ vars: *gear_opendev_image_vars
|
|
|
92ac25a |
+ secrets:
|
|
|
92ac25a |
+ - name: docker_credentials
|
|
|
92ac25a |
+ secret: gear-opendev-dockerhub
|
|
|
92ac25a |
+ pass-to-parent: true
|
|
|
92ac25a |
+
|
|
|
92ac25a |
+- job:
|
|
|
92ac25a |
+ name: gear-promote-opendev-image
|
|
|
92ac25a |
+ parent: opendev-promote-docker-image
|
|
|
92ac25a |
+ description: Promote previously uploaded gear Docker images.
|
|
|
92ac25a |
+ vars: *gear_opendev_image_vars
|
|
|
92ac25a |
+ secrets:
|
|
|
92ac25a |
+ - name: docker_credentials
|
|
|
92ac25a |
+ secret: gear-opendev-dockerhub
|
|
|
92ac25a |
+ pass-to-parent: true
|
|
|
92ac25a |
+
|
|
|
92ac25a |
- project:
|
|
|
92ac25a |
vars:
|
|
|
92ac25a |
release_python: python3
|
|
|
92ac25a |
@@ -10,6 +65,7 @@
|
|
|
92ac25a |
- tox-py35:
|
|
|
92ac25a |
nodeset: ubuntu-xenial
|
|
|
92ac25a |
- build-python-release
|
|
|
92ac25a |
+ - gear-build-opendev-image
|
|
|
92ac25a |
gate:
|
|
|
92ac25a |
jobs:
|
|
|
92ac25a |
- tox-pep8
|
|
|
92ac25a |
@@ -17,9 +73,19 @@
|
|
|
92ac25a |
- tox-py35:
|
|
|
92ac25a |
nodeset: ubuntu-xenial
|
|
|
92ac25a |
- build-python-release
|
|
|
92ac25a |
+ - gear-upload-opendev-image
|
|
|
92ac25a |
promote:
|
|
|
92ac25a |
jobs:
|
|
|
92ac25a |
- opendev-promote-python
|
|
|
92ac25a |
+ - gear-promote-opendev-image
|
|
|
92ac25a |
release:
|
|
|
92ac25a |
jobs:
|
|
|
92ac25a |
- opendev-release-python
|
|
|
92ac25a |
+ - upload-docker-image:
|
|
|
92ac25a |
+ secrets:
|
|
|
92ac25a |
+ name: docker_credentials
|
|
|
92ac25a |
+ secret: gear-opendev-dockerhub
|
|
|
92ac25a |
+ pass-to-parent: true
|
|
|
92ac25a |
+ vars:
|
|
|
92ac25a |
+ <<: *gear_opendev_image_vars
|
|
|
92ac25a |
+ upload_docker_image_promote: false
|
|
|
92ac25a |
diff --git a/Dockerfile b/Dockerfile
|
|
|
92ac25a |
new file mode 100644
|
|
|
92ac25a |
index 0000000..13a86af
|
|
|
92ac25a |
--- /dev/null
|
|
|
92ac25a |
+++ b/Dockerfile
|
|
|
92ac25a |
@@ -0,0 +1,26 @@
|
|
|
92ac25a |
+# Copyright (c) 2019 VEXXHOST, Inc.
|
|
|
92ac25a |
+#
|
|
|
92ac25a |
+# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
92ac25a |
+# you may not use this file except in compliance with the License.
|
|
|
92ac25a |
+# You may obtain a copy of the License at
|
|
|
92ac25a |
+#
|
|
|
92ac25a |
+# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
92ac25a |
+#
|
|
|
92ac25a |
+# Unless required by applicable law or agreed to in writing, software
|
|
|
92ac25a |
+# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
92ac25a |
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
|
92ac25a |
+# implied.
|
|
|
92ac25a |
+# See the License for the specific language governing permissions and
|
|
|
92ac25a |
+# limitations under the License.
|
|
|
92ac25a |
+
|
|
|
92ac25a |
+FROM opendevorg/python-builder as builder
|
|
|
92ac25a |
+
|
|
|
92ac25a |
+COPY . /tmp/src
|
|
|
92ac25a |
+RUN assemble
|
|
|
92ac25a |
+
|
|
|
92ac25a |
+FROM opendevorg/python-base as geard
|
|
|
92ac25a |
+
|
|
|
92ac25a |
+COPY --from=builder /output/ /output
|
|
|
92ac25a |
+RUN /output/install-from-bindep
|
|
|
92ac25a |
+
|
|
|
92ac25a |
+CMD ["/usr/local/bin/geard"]
|
|
|
92ac25a |
--
|
|
|
92ac25a |
2.31.1
|
|
|
92ac25a |
|