Skip to content

Commit

Permalink
Update Jenkinsfile
Browse files Browse the repository at this point in the history
  • Loading branch information
themiszamani authored Jul 31, 2024
1 parent a63a171 commit 6e827a3
Showing 1 changed file with 18 additions and 32 deletions.
50 changes: 18 additions & 32 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,39 +11,25 @@ pipeline {

}
stages {
stage ('Build'){
parallel {
stage ('Build Rocky 9 RPM') {
steps {
echo 'Building Rocky 9 RPM...'
withCredentials(bindings: [sshUserPrivateKey(credentialsId: 'jenkins-rpm-repo', usernameVariable: 'REPOUSER', \
keyFileVariable: 'REPOKEY')]) {
sh "/home/jenkins/build-rpm.sh -w ${WORKSPACE} -b ${BRANCH_NAME} -d rocky9 -p ${PROJECT_DIR} -s ${REPOKEY}"
}
archiveArtifacts artifacts: '**/*.rpm', fingerprint: true
}
stage ('Build Centos 9 RPM') {
agent {
docker {
image 'argo.registry:5000/epel-9-ams'
args '-u jenkins:jenkins'
}
stage ('Build Centos 7') {
agent {
docker {
image 'argo.registry:5000/epel-7-ams'
args '-u jenkins:jenkins'
}
}
steps {
echo 'Building Rpm...'
withCredentials(bindings: [sshUserPrivateKey(credentialsId: 'jenkins-rpm-repo', usernameVariable: 'REPOUSER', \
}
steps {
echo 'Building Rocky 9 RPM...'
withCredentials(bindings: [sshUserPrivateKey(credentialsId: 'jenkins-rpm-repo', usernameVariable: 'REPOUSER', \
keyFileVariable: 'REPOKEY')]) {
sh "/home/jenkins/build-rpm.sh -w ${WORKSPACE} -b ${BRANCH_NAME} -d centos7 -p ${PROJECT_DIR} -s ${REPOKEY}"
}
archiveArtifacts artifacts: '**/*.rpm', fingerprint: true
}
post {
always {
cleanWs()
}
}
}
sh "/home/jenkins/build-rpm.sh -w ${WORKSPACE} -b ${BRANCH_NAME} -d rocky9 -p ${PROJECT_DIR} -s ${REPOKEY}"
}
archiveArtifacts artifacts: '**/*.rpm', fingerprint: true
}
post {
always {
cleanWs()
}
}
}
}
Expand All @@ -63,7 +49,7 @@ pipeline {
if ( env.BRANCH_NAME == 'master' || env.BRANCH_NAME == 'devel' ) {
slackSend( message: ":rain_cloud: Build Failed for <$BUILD_URL|$PROJECT_DIR>:$BRANCH_NAME Job: $JOB_NAME")
}
}
}
}
}
}

0 comments on commit 6e827a3

Please sign in to comment.