unstable: Generalize the BSP publish process
This will allow us to publish the bsp for n different boards instead of just
enterprise.
Change-Id: I0f23cba2e5f2e6afd8383157d02866f2bb1c43af
diff --git a/cicd/pipelines/tasks/task_publish_unstable.jenkins b/cicd/pipelines/tasks/task_publish_unstable.jenkins
index 107a24a..600be6b 100644
--- a/cicd/pipelines/tasks/task_publish_unstable.jenkins
+++ b/cicd/pipelines/tasks/task_publish_unstable.jenkins
@@ -37,6 +37,11 @@
def aptlyVolume = persistentVolumeClaim(claimName: 'aptly-state', mountPath: '/var/lib/aptly')
def gpgVolume = secretVolume(secretName: 'mendel-release-credentials', mountPath: '/var/lib/aptly/keyring')
+def boards = [
+ "enterprise",
+ "excelsior"
+]
+
podTemplate(label: buildLabel, containers: [jnlpContainer, debianContainer], volumes: [aptlyVolume, gpgVolume], envVars: []) {
node(buildLabel) {
dir(sourcePath) {
@@ -47,7 +52,6 @@
def debianContribMirrorSnapshotName = getLatestSnapshot('debian-buster-contrib')
def debianNonfreeMirrorSnapshotName = getLatestSnapshot('debian-buster-nonfree')
def coreSnapshotName = getLatestSnapshot('unstable-core')
- def bspSnapshotName = getLatestSnapshot('unstable-bsp-enterprise')
def date = new Date()
String stamp = date.format("yyyyMMdd-HHmmss")
@@ -56,8 +60,12 @@
sh """
aptly snapshot merge core-full-unstable-${stamp} ${debianMainMirrorSnapshotName} ${debianContribMirrorSnapshotName} ${debianNonfreeMirrorSnapshotName} ${coreSnapshotName}
aptly publish snapshot --batch --force-overwrite --passphrase-file=/var/lib/aptly/keyring/passphrase.txt --architectures=source,amd64,arm64,armhf --distribution=unstable core-full-unstable-${stamp} filesystem:public:unstable
- aptly publish snapshot --batch --force-overwrite --passphrase-file=/var/lib/aptly/keyring/passphrase.txt --architectures=source,amd64,arm64,armhf --distribution=unstable ${bspSnapshotName} filesystem:public:unstable-bsp-enterprise
"""
+
+ for (board in boards) {
+ def bspSnapshotName = getLatestSnapshot("unstable-bsp-${board}")
+ sh "aptly publish snapshot --batch --force-overwrite --passphrase-file=/var/lib/aptly/keyring/passphrase.txt --architectures=source,amd64,arm64,armhf --distribution=unstable ${bspSnapshotName} filesystem:public:unstable-bsp-${board}"
+ }
}
}
}