[neon/snap-packaging/gwenview-snap/Neon/release-24.08] debian: pass through the build env and move the logic into runner script section

Carlos De Maine null at kde.org
Mon Nov 11 08:46:24 GMT 2024


Git commit 8a7137b3dad3c8dec385cc87aec182c2f68cba21 by Carlos De Maine.
Committed on 11/11/2024 at 08:46.
Pushed by carlosdem into branch 'Neon/release-24.08'.

pass through the build env and move the logic into runner script section

M  +5    -26   debian/snap-base-proto.yml
M  +18   -0    debian/snap-snapcraft-lxd-proto.yml

https://invent.kde.org/neon/snap-packaging/gwenview-snap/-/commit/8a7137b3dad3c8dec385cc87aec182c2f68cba21

diff --git a/debian/snap-base-proto.yml b/debian/snap-base-proto.yml
index 379ca23..d69a4b7 100644
--- a/debian/snap-base-proto.yml
+++ b/debian/snap-base-proto.yml
@@ -22,6 +22,8 @@
       - "kde-ci-packages/"
       - "task.log"
       - "task-debug.log"
+    reports:
+      dotenv: build.env
     expire_in: 7 days
 
 .snap_deploy:
@@ -39,30 +41,7 @@
     GIT_STRATEGY: none
   interruptible: true
   script:
-  - |
-    # set the channel for the snap dependent on which branch we are building
-    # master = edge
-    if [ $KDE_SNAP_BRANCH == "master" ]; then
-        export KDE_SNAP_CHANNEL="edge"
-    # RC branch = beta
-    elif [ $KDE_SNAP_BRANCH == "Neon/release-24.12" ]; then
-        export KDE_SNAP_CHANNEL="beta"
-    # Branch tags = candidate
-    elif [ $KDE_SNAP_BRANCH == "Neon/release-24.08" ]; then
-        export KDE_SNAP_CHANNEL="candidate"
-    # new release tag (new tarball release) = stable needs to be set off manually until ephemeral vm's are a thing
-    #elif [ $KDE_SNAP_BRANCH == "v24.08.3" ]; then
-    elif [ $SNAP_PUBLISH_TYPE" == "manual" ]; then
-        export KDE_SNAP_CHANNEL="stable"
-    else
-        echo "this is not a publishable branch"
-    fi
 #artifacts:
-    #name: Snap deploy artifacts
-    #expose_as: 'KDE neon snaps deploy'
-    #when: always
-    #paths:
-    #  - "kde-ci-packages/"
-    #  - "task.log"
-    #  - "task-debug.log"
-    #expire_in: 7 days
+#    name: Snap deploy artifacts
+#    expose_as: 'KDE neon snaps deploy'
+#    when: always
diff --git a/debian/snap-snapcraft-lxd-proto.yml b/debian/snap-snapcraft-lxd-proto.yml
index bd0ef09..9b19c80 100644
--- a/debian/snap-snapcraft-lxd-proto.yml
+++ b/debian/snap-snapcraft-lxd-proto.yml
@@ -75,6 +75,24 @@ snap_snapcraft_deploy:
   inherit:
     default: true
   script:
+    - |
+      # set the channel for the snap dependent on which branch we are building
+      # master = edge
+      if [ $KDE_SNAP_BRANCH == "master" ]; then
+          export KDE_SNAP_CHANNEL="edge"
+      # RC branch = beta
+      elif [ $KDE_SNAP_BRANCH == "Neon/release-24.12" ]; then
+          export KDE_SNAP_CHANNEL="beta"
+      # Branch tags = candidate
+      elif [ $KDE_SNAP_BRANCH == "Neon/release-24.08" ]; then
+          export KDE_SNAP_CHANNEL="candidate"
+      # new release tag (new tarball release) = stable needs to be set off manually until ephemeral vm's are a thing
+      #elif [ $KDE_SNAP_BRANCH == "v24.08.3" ]; then
+      elif [ $SNAP_PUBLISH_TYPE" == "manual" ]; then
+          export KDE_SNAP_CHANNEL="stable"
+      else
+          echo "this is not a publishable branch"
+      fi
     - echo "KDE_SNAP_BRANCH is $KDE_SNAP_BRANCH and KDE_SNAP_CHANNEL IS $KDE_SNAP_CHANNEL"
     - snapcraft push --release=$KDE_SNAP_CHANNEL *.snap
   allow_failure: true


More information about the Neon-commits mailing list