Skip to content

Commit

Permalink
MTL-1708 Build & Publish SP4 RPMs (#55)
Browse files Browse the repository at this point in the history
Continue to build and publish SP3 RPMs while publishing SP4 RPMs.
Include the correct, respective metadata in each RPM.
  • Loading branch information
rustydb authored Dec 2, 2022
1 parent fb4ddc3 commit 3f4d01c
Showing 1 changed file with 69 additions and 32 deletions.
101 changes: 69 additions & 32 deletions Jenkinsfile.github
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,8 @@
*/
@Library('csm-shared-library') _

def sleImage = 'artifactory.algol60.net/csm-docker/stable/csm-docker-sle'
def sleVersion = '15.3'
def isStable = env.TAG_NAME != null ? true : false
def sleImage = 'artifactory.algol60.net/csm-docker/stable/csm-docker-sle'
pipeline {

agent {
Expand All @@ -48,41 +47,79 @@ pipeline {

stages {

stage('Prepare: RPMs') {
agent {
docker {
image "${sleImage}:${sleVersion}"
reuseNode true
stage('Build & Publish') {

matrix {

agent {
node {
label "metal-gcp-builder"
customWorkspace "${env.WORKSPACE}/${sleVersion}"
}
}
}
steps {
runLibraryScript("addRpmMetaData.sh", "${env.NAME}.spec")
sh "make prepare"
sh "git update-index --assume-unchanged ${env.NAME}.spec"
}
}

stage('Build: RPM') {
agent {
docker {
image "${sleImage}:${sleVersion}"
reuseNode true
axes {
axis {
name 'sleVersion'
values 15.3, 15.4
}
}
}
steps {
sh "make rpm"
}
}

stage('Publish') {
steps {
script {
publishCsmRpms(component: env.NAME, pattern: "dist/rpmbuild/RPMS/noarch/*.rpm", os: "sle-15sp2", arch: "noarch", isStable: isStable)
publishCsmRpms(component: env.NAME, pattern: "dist/rpmbuild/RPMS/noarch/*.rpm", os: "sle-15sp3", arch: "noarch", isStable: isStable)
publishCsmRpms(component: env.NAME, pattern: "dist/rpmbuild/SRPMS/*.rpm", os: "sle-15sp2", arch: "src", isStable: isStable)
publishCsmRpms(component: env.NAME, pattern: "dist/rpmbuild/SRPMS/*.rpm", os: "sle-15sp3", arch: "src", isStable: isStable)
stages {

stage('Prepare: RPMs') {
agent {
docker {
label 'docker'
reuseNode true
image "${sleImage}:${sleVersion}"
}
}
steps {
runLibraryScript("addRpmMetaData.sh", "${env.NAME}.spec")
sh "make prepare"
sh "git update-index --assume-unchanged ${env.NAME}.spec"
}
}

stage('Build: RPMs') {
agent {
docker {
label 'docker'
reuseNode true
image "${sleImage}:${sleVersion}"
}
}
steps {
sh "make rpm"
}
}

stage('Publish: RPMs') {
steps {
script {
sles_version_parts = "${sleVersion}".tokenize('.')
sles_major = "${sles_version_parts[0]}"
sles_minor = "${sles_version_parts[1]}"
publishCsmRpms(
arch: "noarch",
component: env.NAME,
isStable: isStable,
os: "sle-${sles_major}sp${sles_minor}",
pattern: "dist/rpmbuild/RPMS/noarch/*.rpm",
)
publishCsmRpms(
arch: "src",
component: env.NAME,
isStable: isStable,
os: "sle-${sles_major}sp${sles_minor}",
pattern: "dist/rpmbuild/SRPMS/*.rpm",
)
}
}
}
}
}
}
}
}
}

0 comments on commit 3f4d01c

Please sign in to comment.