[neon/snap-packaging/kde-qt6-core-sdk/work.core24-arm64-build-test] debian: consolidate into one deploy stage
Carlos De Maine
null at kde.org
Mon Jul 21 09:41:13 BST 2025
Git commit 26b575329d56266e14b8a330031c6c4fc64b9b91 by Carlos De Maine.
Committed on 21/07/2025 at 08:41.
Pushed by carlosdem into branch 'work.core24-arm64-build-test'.
consolidate into one deploy stage
M +0 -2 debian/.gitlab-ci-neon.yml
M +1 -23 debian/snap-base-proto.yml
M +38 -8 debian/snap-snapcraft-core-lxd-proto.yml
https://invent.kde.org/neon/snap-packaging/kde-qt6-core-sdk/-/commit/26b575329d56266e14b8a330031c6c4fc64b9b91
diff --git a/debian/.gitlab-ci-neon.yml b/debian/.gitlab-ci-neon.yml
index 6d10efc..5de379b 100644
--- a/debian/.gitlab-ci-neon.yml
+++ b/debian/.gitlab-ci-neon.yml
@@ -3,8 +3,6 @@
include:
- project: sysadmin/ci-utilities
- file:
- - /gitlab-templates/snap-snapcraft-core-lxd.yml
- local: debian/snap-snapcraft-core-lxd-proto.yml
- local: debian/snap-base-proto.yml
diff --git a/debian/snap-base-proto.yml b/debian/snap-base-proto.yml
index 9cd85b3..d9ba3a4 100644
--- a/debian/snap-base-proto.yml
+++ b/debian/snap-base-proto.yml
@@ -24,6 +24,7 @@
- "task.log"
- "task-debug.log"
- "deploy.env"
+ - "publish.log"
expire_in: 7 days
.snap_base-arm64:
@@ -52,28 +53,5 @@
- "task.log"
- "task-debug.log"
- "deploy.env"
- expire_in: 7 days
-
-.snap_publish:
- stage: publish
- image: storage.kde.org/vm-images/snap-builder-arm64
- tags:
- - VM
- - arm64
- rules:
- # run the job on mainline branches of mainline repositories
- - if: $KDECI_SECURE_SERVICES_KEY
- when: on_success
- # or when triggered manually we don't want the manual job to block the pipeline
- - when: manual
- allow_failure: true
- variables:
- GIT_STRATEGY: none
- interruptible: true
- artifacts:
- name: Snap publish artifacts
- expose_as: 'KDE neon snaps publishing artifacts'
- when: always
- paths:
- "publish.log"
expire_in: 7 days
diff --git a/debian/snap-snapcraft-core-lxd-proto.yml b/debian/snap-snapcraft-core-lxd-proto.yml
index 544d097..7cc14a2 100644
--- a/debian/snap-snapcraft-core-lxd-proto.yml
+++ b/debian/snap-snapcraft-core-lxd-proto.yml
@@ -1,7 +1,6 @@
include:
- project: sysadmin/ci-utilities
file:
- #- /gitlab-templates/blocks/snap-base.yml
- /gitlab-templates/blocks/workflow.yml
snap_snapcraft_core_lxd_proto:
@@ -17,11 +16,47 @@ snap_snapcraft_core_lxd_proto:
- snapcraft --use-lxd --verbose 2>&1 | tee task.log
# Make the artifacts dir
- mkdir -p $CI_PROJECT_DIR/kde-ci-packages/
- # copy the snap to the artifacts dir
+ # copy the snap to the artifacts
+.snap_publish:
+ stage: publish
+… expire_in: 7 days
+dir
- cp -vf ./*.snap $CI_PROJECT_DIR/kde-ci-packages/
- echo $KDE_SNAP_BRANCH >> deploy.env
allow_failure: true
interruptible: true
+ after_script:
+ - export KDE_SNAP_BRANCH=$(cat deploy.env)
+ - |
+ # 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"
+ # release.beta = beta
+ elif [ "$KDE_SNAP_BRANCH" == "release.beta" ]; then
+ export KDE_SNAP_CHANNEL="beta"
+ # release.candidate = candidate
+ elif [ "$KDE_SNAP_BRANCH" == "release.candidate" ]; then
+ export KDE_SNAP_CHANNEL="candidate"
+ # release.stable = stable
+ elif [ "$KDE_SNAP_BRANCH" == "release.stable" ]; then
+ export KDE_SNAP_CHANNEL="stable"
+ # don't publish work branches
+ elif [ "$KDE_SNAP_BRANCH" == "work.*" ]; then
+ export KDE_SNAP_CHANNEL="no_publish"
+ echo "we don't publish work branches to the snap store, you can download your snap from this jobs artifacts"
+ else
+ # don't publish anything else either
+ export KDE_SNAP_CHANNEL="no_publish"
+ echo "we only publish recognised branches to the snap store"
+ fi
+ # publish if we are on a recognised branch
+ if [ "$KDE_SNAP_CHANNEL" != "no_publish" ]; then
+ echo "KDE_SNAP_BRANCH is $KDE_SNAP_BRANCH thus KDE_SNAP_CHANNEL is publishing to $KDE_SNAP_CHANNEL"
+ snapcraft push --release=$KDE_SNAP_CHANNEL *.snap --verbose 2>&1 | tee publish.log
+ fi
+ allow_failure: true
+ interruptible: true
snap_snapcraft_core_lxd_proto_arm64:
extends: .snap_base-arm64
@@ -41,12 +76,7 @@ snap_snapcraft_core_lxd_proto_arm64:
- echo $KDE_SNAP_BRANCH >> deploy.env
allow_failure: true
interruptible: true
-
-snap_snapcraft_core_publish:
- extends: .snap_publish
- stage: publish
- needs: [snap_snapcraft_core_lxd]
- script:
+ after_script:
- export KDE_SNAP_BRANCH=$(cat deploy.env)
- |
# set the channel for the snap dependent on which branch we are building
More information about the Neon-commits
mailing list