[extensions-web] Add CI jobs for building and pushing Docker image to Quay




commit 5deaff8448a18e48c2fbf922ee3e29018469a667
Author: Bartłomiej Piotrowski <bpiotrowski gnome org>
Date:   Mon May 23 15:47:56 2022 +0200

    Add CI jobs for building and pushing Docker image to Quay
    
    As part of migration to OpenShift 4, GNOME infrastructure is switching
    from internal Docker registry and OpenShift-based builds to Quay and
    GitLab CI. After this MR is merged, a new deployment can be created by
    launching a manually triggered push-to-quay job. After the new image is
    pushed to Quay, OCP4 will pick up a new image within 20 minutes and
    start a new deployment automatically.

 .gitlab-ci.yml | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 3e902ff..efae0e6 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -4,6 +4,7 @@ variables:
 
 stages:
   - test
+  - deploy
 
 .pip cache:
   cache:
@@ -65,3 +66,20 @@ security (safety):
     - safety check -r requirements.txt
     - safety check -r requirements.ego.txt
   allow_failure: true
+
+buildah:
+  stage: test
+  image: quay.io/gnome_infrastructure/buildah:latest
+  script:
+    - buildah bud -t quay.io/gnome_infrastructure/extensions:latest -f openshift/docker/Dockerfile
+
+push-to-quay:
+  stage: deploy
+  image: quay.io/gnome_infrastructure/buildah:latest
+  rules:
+    - if: ($CI_COMMIT_REF_PROTECTED == "true")
+      when: manual
+  script:
+    - buildah bud -t quay.io/gnome_infrastructure/extensions:latest -f openshift/docker/Dockerfile
+    - buildah login -u ${OCI_REGISTRY_USER} -p ${OCI_REGISTRY_PASSWORD} quay.io
+    - buildah push quay.io/gnome_infrastructure/extensions:latest


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]