[gnome-music/ci-review-apps: 5/6] CI: Improve the review apps setup
- From: Jean Felder <jfelder src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/ci-review-apps: 5/6] CI: Improve the review apps setup
- Date: Sat, 28 Jul 2018 08:43:25 +0000 (UTC)
commit 4b62dc2e5f37e4abe5d7f7199bca2b6e6f0a26e1
Author: Jordan Petridis <jordanpetridis protonmail com>
Date: Fri Jul 27 16:50:25 2018 +0000
CI: Improve the review apps setup
We create a gitlab enviroment where we deploy the flatpak
bundle. But it was lacking a stop action and enviroments
were never cleaned up.
Add a stop_review action that will automatically
stop the enviroment when the Merge Request is closed or merged.
https://docs.gitlab.com/ce/ci/yaml/README.html#environment
.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]