]> git.ipfire.org Git - pakfire.git/commitdiff
jenkins: Try importing the GPG key from Jenkins credentials
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 5 Dec 2024 10:43:28 +0000 (10:43 +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 d15a09132228974242c05dc2561e56d4221129b3..1932571428528f1852ae3c595b0249c9f17271b6 100644 (file)
@@ -415,16 +415,24 @@ pipeline {
 
                                        environment {
                                                GNUPGHOME = "${WORKSPACE}/.gnupg"
+
+                                               // Our signing key
+                                               GPG_KEY_ID = "E4D20FA6FAA108D54ABDFC6541836ADF9D5E2AD9"
                                        }
 
                                        steps {
-                                               // Import the GPG key
+                                               // Create the GPG stash directory
                                                sh """
                                                        mkdir -p $GNUPGHOME
                                                        chmod 700 $GNUPGHOME
                                                        printenv
                                                """
 
+                                               // Import the GPG key
+                                               withCredentials([file(credentialsId: "${env.GPG_KEY_ID}", variable: "GPG_KEY_FILE")]) {
+                                                       sh "gpg --import --batch < $GPG_KEY_FILE"
+                                               }
+
                                                // Unstash all stashed packages from the matrix build
                                                script {
                                                        for (distro in ["trixie", "bookworm"]) {
@@ -458,7 +466,7 @@ pipeline {
                                                archiveArtifacts artifacts: "packages/debian/**/*"
 
                                                // Fetch a Kerberos ticket
-                                               sh "kinit -kV"
+                                               //sh "kinit -kV"
 
                                                // XXX This needs to be published on a mirror server somewhere
                                        }