[Initiatives.wiki] Update DevOps with Flatpak



commit 23eb24d347bdf4962710d6acaf0137df8490b12f
Author: Jordan Petridis <jordanpetridis protonmail com>
Date:   Sat Aug 4 05:43:43 2018 +0000

    Update DevOps with Flatpak

 DevOps-with-Flatpak.md | 26 ++++++++++++++++++++++----
 1 file changed, 22 insertions(+), 4 deletions(-)
---
diff --git a/DevOps-with-Flatpak.md b/DevOps-with-Flatpak.md
index a3d5847..83152cf 100644
--- a/DevOps-with-Flatpak.md
+++ b/DevOps-with-Flatpak.md
@@ -62,7 +62,7 @@ Adding the following lines to the `script` section will generate a Flatpak bundl
 - flatpak build-bundle repo ${BUNDLE} --runtime-repo=${RUNTIME_REPO} org.gnome.AppName
 ```
 
-`${BUNDLE}` is a placeholder variable for the resulting file name. It will also be used when defining a 
build artifact, so put this with the other variables:
+`${BUNDLE}` is a placeholder variable for the resulting file name. It will also be used when defining a 
build artifact, so set it up as global variable and not inside the scope of the flatpak job:
 
 ```yaml
 # The actual name is usually the name of the application.
@@ -77,7 +77,12 @@ artifacts:
     expire_in: 30 days
 ```
 
-And finally we want to expose the build in the MR using GitLab Review Apps. To do so we will add a new stage 
`review` and 2 new jobs one of whom will depend on the `flatpak` job defined above. This is just boilerplate 
and you can just copy paste it directly.
+And finally we want to expose the build in the MR using GitLab Review Apps. To do so we will add a new stage 
`review` and 2 new jobs one of whom will depend on the `flatpak` job defined above. This is just boilerplate 
for the most part but there will be 2 fields that you will have to adjusts.
+
+There are 2 `except:` keys with one of the values being `master@GNOME/project-url`. You will need to replace 
`project-url` with the path of you module, can be found by looking at the url of the project. For example for 
`nautilus`, with project url `gitlab.gnome.org/GNOME/nautilus`, this value is [set][except_master] to 
`master@GNOME/nautilus`.
+
+This is done so we can avoid setting up environments for the master branch of the project since there will 
be no Merge Requests made from it. Gitlab Environments can be expensive and long lived operations so make 
sure you get this right please. Note that the CI will still produce and make available flatpak bundles from 
the `master` branch. There will just not be a fancy link for it and you would have to look on the CI/job logs 
to get the bundle(s).
+
 ```yaml
 review:
     stage: review
@@ -93,6 +98,9 @@ review:
         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:
+        - tags
+        - master@GNOME/project-url
 
 stop_review:
     stage: review
@@ -102,6 +110,9 @@ stop_review:
     environment:
         name: review/$CI_COMMIT_REF_NAME
         action: stop
+    except:
+        - tags
+        - master@GNOME/project-url
 ```
 
 ### Saving build and test logs & cache builds
@@ -180,6 +191,9 @@ review:
         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:
+        - tags
+        - master@GNOME/project-url
 
 stop_review:
     stage: review
@@ -189,7 +203,9 @@ stop_review:
     environment:
         name: review/$CI_COMMIT_REF_NAME
         action: stop
-
+    except:
+        - tags
+        - master@GNOME/project-url
 ```
 
 # Parallel installation
@@ -447,4 +463,6 @@ Then in your application window code:
         gtk_style_context_add_class (style_context, "devel");
     }
 
-```
\ No newline at end of file
+```
+
+[except_master]: 
https://gitlab.gnome.org/GNOME/nautilus/blob/4ae0361342c5306ccfe1502e69bb430ac530005b/.gitlab-ci.yml#L65
\ No newline at end of file


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