Skip to content

Commit

Permalink
Merge pull request #5 from ARGOeu-Metrics/devel
Browse files Browse the repository at this point in the history
Devel
  • Loading branch information
themiszamani authored Apr 4, 2022
2 parents 4a56cd3 + 0d83d90 commit 3dc0908
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 28 deletions.
26 changes: 3 additions & 23 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
pipeline {
agent any
options {
checkoutToSubdirectory('nagios-plugins-eudat-b2share')
checkoutToSubdirectory('argo-probe-eudat-b2share')
}
environment {
PROJECT_DIR="nagios-plugins-eudat-b2share"
PROJECT_DIR="argo-probe-eudat-b2share"
GIT_COMMIT=sh(script: "cd ${WORKSPACE}/$PROJECT_DIR && git log -1 --format=\"%H\"",returnStdout: true).trim()
GIT_COMMIT_HASH=sh(script: "cd ${WORKSPACE}/$PROJECT_DIR && git log -1 --format=\"%H\" | cut -c1-7",returnStdout: true).trim()
GIT_COMMIT_DATE=sh(script: "date -d \"\$(cd ${WORKSPACE}/$PROJECT_DIR && git show -s --format=%ci ${GIT_COMMIT_HASH})\" \"+%Y%m%d%H%M%S\"",returnStdout: true).trim()
Expand All @@ -13,27 +13,7 @@ pipeline {
stages {
stage ('Build'){
parallel {
stage ('Build Centos 6') {
agent {
docker {
image 'argo.registry:5000/epel-6-ams'
args '-u jenkins:jenkins'
}
}
steps {
echo 'Building Rpm...'
withCredentials(bindings: [sshUserPrivateKey(credentialsId: 'jenkins-rpm-repo', usernameVariable: 'REPOUSER', \
keyFileVariable: 'REPOKEY')]) {
sh "/home/jenkins/build-rpm.sh -w ${WORKSPACE} -b ${BRANCH_NAME} -d centos6 -p ${PROJECT_DIR} -s ${REPOKEY}"
}
archiveArtifacts artifacts: '**/*.rpm', fingerprint: true
}
post {
always {
cleanWs()
}
}
}

stage ('Build Centos 7') {
agent {
docker {
Expand Down
7 changes: 2 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
PKGNAME=nagios-plugins-eudat-b2share
PKGNAME=argo-probe-eudat-b2share
SPECFILE=${PKGNAME}.spec
FILES=check_b2share.py ${SPECFILE}

PKGVERSION=$(shell grep -s '^Version:' $(SPECFILE) | sed -e 's/Version:\s*//')

srpm: dist
rpmbuild -ts --define='dist .el6' ${PKGNAME}-${PKGVERSION}.tar.gz

rpm: dist
rpmbuild -ta ${PKGNAME}-${PKGVERSION}.tar.gz

Expand All @@ -22,4 +19,4 @@ sources: dist

clean:
rm -rf ${PKGNAME}-${PKGVERSION}.tar.gz
rm -rf dist
rm -rf dist

0 comments on commit 3dc0908

Please sign in to comment.