xxx
dustin/sshca-cli/pipeline/pr-master This commit looks good
Details
dustin/sshca-cli/pipeline/pr-master This commit looks good
Details
parent
93135d4a6a
commit
34048fc4d0
|
@ -2,85 +2,6 @@ pipeline {
|
||||||
agent none
|
agent none
|
||||||
|
|
||||||
stages {
|
stages {
|
||||||
stage('RPM') {
|
|
||||||
matrix {
|
|
||||||
axes {
|
|
||||||
axis {
|
|
||||||
name 'ARCH'
|
|
||||||
values 'amd64', 'arm64'
|
|
||||||
}
|
|
||||||
axis {
|
|
||||||
name 'FEDORA'
|
|
||||||
values '38', '39'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
stages {
|
|
||||||
stage('Build RPM') {
|
|
||||||
agent {
|
|
||||||
kubernetes {
|
|
||||||
yamlFile 'ci/podTemplate.yaml'
|
|
||||||
yamlMergeStrategy merge()
|
|
||||||
defaultContainer 'fedora'
|
|
||||||
nodeSelector "kubernetes.io/arch=${ARCH}"
|
|
||||||
containerTemplate {
|
|
||||||
name 'fedora'
|
|
||||||
image "registry.fedoraproject.org/fedora:${FEDORA}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
environment {
|
|
||||||
GNUPGHOME = "${env.WORKSPACE_TMP}/gnupg"
|
|
||||||
}
|
|
||||||
stages {
|
|
||||||
stage('Prepare') {
|
|
||||||
steps {
|
|
||||||
sh '. ci/prepare.sh'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
stage('Build') {
|
|
||||||
steps {
|
|
||||||
sh '. ci/build.sh'
|
|
||||||
script {
|
|
||||||
if (env.BRANCH_NAME == 'master') {
|
|
||||||
withCredentials([
|
|
||||||
file(
|
|
||||||
credentialsId: 'rpm-gpg-key',
|
|
||||||
variable: 'RPM_GPG_PRIVATE_KEY',
|
|
||||||
),
|
|
||||||
file(
|
|
||||||
credentialsId: 'rpm-gpg-key-passphrase',
|
|
||||||
variable: 'RPM_GPG_KEY_PASSPHRASE',
|
|
||||||
),
|
|
||||||
]) {
|
|
||||||
sh '. ci/sign-rpms.sh'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
post {
|
|
||||||
success {
|
|
||||||
archiveArtifacts '*.rpm'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
stage('Publish') {
|
|
||||||
when {
|
|
||||||
branch 'master'
|
|
||||||
}
|
|
||||||
steps {
|
|
||||||
sshagent(['jenkins-repohost']) {
|
|
||||||
sh '. ci/publish.sh'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
stage('Container') {
|
stage('Container') {
|
||||||
matrix {
|
matrix {
|
||||||
|
|
Loading…
Reference in New Issue