2023-12-14 15:07:41 +08:00
|
|
|
pipeline {
|
|
|
|
agent {
|
|
|
|
label 'aarch64 && archlinux'
|
|
|
|
}
|
|
|
|
stages {
|
|
|
|
stage('Download Config') {
|
|
|
|
steps {
|
|
|
|
dir('jenkins-utils') {
|
2024-04-27 01:24:29 +08:00
|
|
|
git 'https://gitea.classfun.cn:4443/ci/jenkins-utils'
|
2023-12-14 15:07:41 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Cleanup packages') {
|
|
|
|
steps {
|
|
|
|
sh 'rm -f *.pkg.tar.*'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Build') {
|
|
|
|
steps {
|
2024-04-27 01:33:31 +08:00
|
|
|
sh 'makepkg --config jenkins-utils/makepkg-aarch64.conf --syncdeps --noconfirm --force'
|
2023-12-14 15:07:41 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
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
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|