From dab9e5c8883fc7c44bf359afb690d27e0c078ef4 Mon Sep 17 00:00:00 2001 From: BigfootACA Date: Thu, 14 Dec 2023 15:07:41 +0800 Subject: [PATCH] Add Jenkinsfile --- Jenkinsfile | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..a2105e7 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,44 @@ +pipeline { + agent { + label 'aarch64 && archlinux' + } + stages { + stage('Download Config') { + steps { + dir('jenkins-utils') { + git 'https://gitlab.classfun.cn:4443/renegade-project/jenkins-utils' + } + } + } + stage('Cleanup packages') { + steps { + sh 'rm -f *.pkg.tar.*' + } + } + stage('Build') { + steps { + sh 'makepkg --config jenkins-utils/makepkg-aarch64.conf --syncdeps --force' + } + } + stage('Signature packages') { + steps { + withCredentials([ + file(credentialsId: 'gpg-file', variable: 'GPG_FILE'), + string(credentialsId: 'gpg-secret', variable: 'GPG_SECRET') + ]) { + sh 'python3 jenkins-utils/sign-pkg.py -d . -k "$GPG_FILE" -p "$GPG_SECRET"' + } + } + } + stage('Upload packages') { + steps { + sh 'python3 jenkins-utils/upload-pkg.py -d . -a aarch64' + } + } + stage('Archive') { + steps { + archiveArtifacts artifacts: '*.pkg.tar.*', fingerprint: true + } + } + } +}