[gnome-music/ci-review-apps] CI: Improve the review apps setup



commit 761c1ba68438b291655e78fe62dbb6783fd7d473
Author: Jordan Petridis <jordanpetridis protonmail com>
Date:   Fri Jul 27 16:50:25 2018 +0000

    CI: Improve the review apps setup

 .gitlab-ci.yml | 32 +++++++++++++++++++++++++++++---
 1 file changed, 29 insertions(+), 3 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 782d5e05..a671e3ee 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -2,6 +2,7 @@ image: registry.gitlab.gnome.org/gnome/gnome-nightly-oci/nightly:master
 stages:
   - check
   - build-flatpak
+  - deploy
 
 variables:
   BUNDLE: "gnome-music-dev.flatpak"
@@ -27,9 +28,34 @@ flatpak:
   cache:
     paths:
       - .flatpak-builder/cache
-  environment:
-    name: review/$CI_COMMIT_REF_NAME
-    url: https://gitlab.gnome.org/$CI_PROJECT_PATH/-/jobs/$CI_JOB_ID/artifacts/raw/${BUNDLE}
+
+review:
+    stage: deploy
+    dependencies:
+        - flatpak
+    script:
+        - echo "Generating flatpak deployment"
+    artifacts:
+        paths:
+            - ${BUNDLE}
+        expire_in: 30 days
+    environment:
+        name: review/$CI_COMMIT_REF_NAME
+        url: https://gitlab.gnome.org/$CI_PROJECT_PATH/-/jobs/$CI_JOB_ID/artifacts/raw/${BUNDLE}
+        on_stop: stop_review
+    except:
+        - master@GNOME/gnome-music
+
+stop_review:
+    stage: deploy
+    script:
+        - echo "Stopping flatpak deployment"
+    when: manual
+    environment:
+        name: review/$CI_COMMIT_REF_NAME
+        action: stop
+    except:
+        - master@GNOME/gnome-music
 
 flake8:
   stage: check


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