From 6ba1c9c827c2bfde8175b1b573b0ca9e997331bb Mon Sep 17 00:00:00 2001 From: Themis Zamani Date: Mon, 14 Mar 2022 21:01:37 +0200 Subject: [PATCH 1/3] Update and rename nagios-plugins-eudat-b2share.spec to argo-probe-eudat-b2share.spec --- ...hare.spec => argo-probe-eudat-b2share.spec | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) rename nagios-plugins-eudat-b2share.spec => argo-probe-eudat-b2share.spec (58%) diff --git a/nagios-plugins-eudat-b2share.spec b/argo-probe-eudat-b2share.spec similarity index 58% rename from nagios-plugins-eudat-b2share.spec rename to argo-probe-eudat-b2share.spec index 3e12834..2093787 100644 --- a/nagios-plugins-eudat-b2share.spec +++ b/argo-probe-eudat-b2share.spec @@ -1,7 +1,7 @@ -Name: nagios-plugins-eudat-b2share +Name: argo-probe-eudat-b2share Version: 0.5 Release: 1%{?dist} -Summary: Nagios probe for B2SHARE +Summary: Monitoring scripts that check the functionalities of B2SHARE License: GPLv3+ Packager: Themis Zamani @@ -20,21 +20,20 @@ Nagios probe to check functionality of B2SHARE service %define _unpackaged_files_terminate_build 0 %install - -install -d %{buildroot}/%{_libexecdir}/argo-monitoring/probes/eudat-b2share -install -d %{buildroot}/%{_sysconfdir}/nagios/plugins/eudat-b2share -install -m 755 check_b2share.py %{buildroot}/%{_libexecdir}/argo-monitoring/probes/eudat-b2share/check_b2share.py +install -d %{buildroot}/%{_libexecdir}/argo/probes/eudat-b2share +install -m 755 check_b2share.py %{buildroot}/%{_libexecdir}/argo/probes/eudat-b2share/check_b2share.py %files -%dir /%{_libexecdir}/argo-monitoring -%dir /%{_libexecdir}/argo-monitoring/probes/ -%dir /%{_libexecdir}/argo-monitoring/probes/eudat-b2share +%dir /%{_libexecdir}/argo +%dir /%{_libexecdir}/argo/probes/ +%dir /%{_libexecdir}/argo/probes/eudat-b2share -%attr(0755,root,root) /%{_libexecdir}/argo-monitoring/probes//eudat-b2share/check_b2share.py +%attr(0755,root,root) /%{_libexecdir}/argo/probes/eudat-b2share/check_b2share.py %changelog +* Mon Mar 14 2022 Themis Zamani - 0.5 +- Update package prerequisites based on argo monitoring. * Tue Nov 27 2018 Themis Zamani - 0.1-1 - Initial version of the package. * Tue Nov 27 2018 Harri Hirvonsalo - 0.1-1 - Initial version of the package. - From a55c0ed03080a20d128170a08d9d9a9648c60f0c Mon Sep 17 00:00:00 2001 From: Themis Zamani Date: Mon, 14 Mar 2022 21:02:41 +0200 Subject: [PATCH 2/3] Update Makefile --- Makefile | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 782c2a7..df2a0e4 100644 --- a/Makefile +++ b/Makefile @@ -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 @@ -22,4 +19,4 @@ sources: dist clean: rm -rf ${PKGNAME}-${PKGVERSION}.tar.gz - rm -rf dist \ No newline at end of file + rm -rf dist From 3ce7e37f2f90714a45b3ee332536e85cdff1b461 Mon Sep 17 00:00:00 2001 From: Themis Zamani Date: Mon, 14 Mar 2022 21:03:16 +0200 Subject: [PATCH 3/3] Update Jenkinsfile --- Jenkinsfile | 26 +++----------------------- 1 file changed, 3 insertions(+), 23 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index a4114fb..8b848e5 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -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() @@ -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 {