[neon/snap-packaging/kf6-snap-runtime/ci-prototype] debian: get a build out

Carlos De Maine null at kde.org
Tue May 7 15:05:08 BST 2024


Git commit c6bc2d57bf339ceb06143f5c2209e106cc838b1b by Carlos De Maine.
Committed on 07/05/2024 at 14:05.
Pushed by carlosdem into branch 'ci-prototype'.

get a build out

M  +2    -2    debian/.gitlab-ci-neon.yml
A  +23   -0    debian/snap-base-proto.yml
A  +32   -0    debian/snap-snapcraft-lxd-proto.yml

https://invent.kde.org/neon/snap-packaging/kf6-snap-runtime/-/commit/c6bc2d57bf339ceb06143f5c2209e106cc838b1b

diff --git a/debian/.gitlab-ci-neon.yml b/debian/.gitlab-ci-neon.yml
index a4177c2..6857ead 100644
--- a/debian/.gitlab-ci-neon.yml
+++ b/debian/.gitlab-ci-neon.yml
@@ -3,5 +3,5 @@
 
 include:
   - project: sysadmin/ci-utilities
-    file:
-      - /gitlab-templates/snap-snapcraft-lxd.yml
+  - local: debian/snap-snapcraft-lxd-proto.yml
+  - local: debian/snap-base-proto.yml
\ No newline at end of file
diff --git a/debian/snap-base-proto.yml b/debian/snap-base-proto.yml
new file mode 100644
index 0000000..1500139
--- /dev/null
+++ b/debian/snap-base-proto.yml
@@ -0,0 +1,23 @@
+.snap_base_proto:
+  stage: deploy
+  tags:
+    - Snap
+  variables:
+    KDE_SNAP_MODULE_NAME: ${CI_PROJECT_NAME}
+    SNAPCRAFT_BUILD_ENVIRONMENT: "host"
+    SNAPCRAFT_MANAGED_MODE: "y"
+  interruptible: true
+  before_script:
+    - git clone https://invent.kde.org/sysadmin/ci-utilities.git --depth=1
+    - git clone https://invent.kde.org/sysadmin/repo-metadata.git ci-utilities/repo-metadata/ --depth=1
+  script:
+    - git config --global --add safe.directory $CI_PROJECT_DIR
+  artifacts:
+    name: Snap artifacts
+    expose_as: 'KDE neon snaps'
+    when: always
+    paths:
+      - ".kde-ci-packages/"
+      - "task.log"
+      - "task-debug.log"
+    expire_in: 7 days
diff --git a/debian/snap-snapcraft-lxd-proto.yml b/debian/snap-snapcraft-lxd-proto.yml
new file mode 100644
index 0000000..fea07b6
--- /dev/null
+++ b/debian/snap-snapcraft-lxd-proto.yml
@@ -0,0 +1,32 @@
+include:
+  #- /gitlab-templates/blocks/snap-base.yml
+  - project: sysadmin/ci-utilities
+    file: 
+      - gitlab-templates/blocks/workflow.yml
+
+snap_snapcraft_lxd:
+  extends: .snap_base_proto
+  inherit:
+    default: true
+  script:
+    # clean
+    - snapcraft clean
+    # choose modern or legacy snapcraft build type
+    - |
+      if [ "$KDE_SNAP_MODULE_NAME" == "plasma-desktop-session-snap" ]; then
+        export SNAPCRAFT_BUILD_ENVIRONMENT=lxd
+        echo building $KDE_SNAP_MODULE_NAME with SNAPCRAFT_BUILD_ENVIRONMENT=lxd ...
+        snapcraft --verbose
+      else
+        echo building $KDE_SNAP_MODULE_NAME with --use-lxd build flag ...
+        snapcraft  --use-lxd --verbosity=verbose
+      fi
+    
+    # make the artifacts dir
+    - mkdir -p .kde-ci-packages/
+    # copy the snap to the artifacts dir
+    - cp -vf *.snap  .kde-ci-packages/
+  #after_script:
+    # - snapcraft push --release=edge *.snap
+  #allow_failure: true
+  interruptible: true


More information about the Neon-commits mailing list