]> git.ipfire.org Git - pakfire.git/commitdiff
jenkins: Create a Debian Release file
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 30 Nov 2024 15:50:37 +0000 (15:50 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 5 Dec 2024 17:03:49 +0000 (17:03 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Jenkinsfile

index 41adab70c22866e18cb5799241575c7e82c03f5d..9b66263fedcd0a0719134746bc91b7e712ef43d3 100644 (file)
@@ -326,8 +326,8 @@ pipeline {
                                                                        // Create a repository and generate Packages
                                                                        sh "mkdir -pv \
                                                                                dists/${DISTRO}/main/binary-${ARCH} \
-                                                                               pool/${DISTRO}/main/${ARCH} \
-                                                                               pool/${DISTRO}/main/source"
+                                                                               dists/${DISTRO}/main/source \
+                                                                               pool/${DISTRO}/main/${ARCH}"
 
                                                                        // Copy all packages
                                                                        sh "cp -v uploads/*.deb pool/${DISTRO}/main/${ARCH}"
@@ -368,6 +368,29 @@ pipeline {
                                                                for (arch in ["amd64", "arm64"]) {
                                                                        unstash "${distro}-${arch}"
                                                                }
+
+                                                               // Create the Release file
+                                                               sh """
+                                                                       (
+                                                                               echo "Origin: Pakfire Repository"
+                                                                               echo "Label: Pakfire Repository"
+                                                                               echo "Suite: stable"
+                                                                               echo "Codename: $distro"
+                                                                               echo "Version: 1.0"
+                                                                               echo "Architectures: amd64 arm64"
+                                                                               echo "Components: main"
+                                                                               echo "Description: Pakfire Jenkins Repository"
+                                                                               echo "Date: $(date -Ru)"
+
+                                                                               # MD5
+                                                                               echo "MD5Sum:"
+                                                                               for arch in amd64 arm64; do
+                                                                                       echo -n " \$(md5sum dists/$distro/main/binary-\${arch}/Packages.gz | awk '{ print \$1 }')"
+                                                                                       echo -n " \$(stat --format="%s" dists/$distro/main/binary-\${arch}/Packages.gz)"
+                                                                                       echo " main/binary-\${arch}/Packages.gz"
+                                                                               done
+                                                                       ) >> dists/${distro}/Release
+                                                               """
                                                        }
                                                }