Skip to content

Commit

Permalink
Merge pull request #11 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 0751ea8 + 0d3d18b commit cc70459
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 39 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-b2access')
checkoutToSubdirectory('argo-probe-eudat-b2access')
}
environment {
PROJECT_DIR="nagios-plugins-eudat-b2access"
PROJECT_DIR="argo-probe-eudat-b2access"
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
5 changes: 1 addition & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
PKGNAME=nagios-plugins-eudat-b2access
PKGNAME=argo-probe-eudat-b2access
SPECFILE=${PKGNAME}.spec
FILES=check_b2access.py check_b2access_simple.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 Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.

Name: nagios-plugins-eudat-b2access
Name: argo-probe-eudat-b2access
Version: 0.4
Release: 2%{?dist}
Summary: Nagios B2ACCESS probes
Summary: Monitoring metrics for B2ACCESS
License: Apache License, Version 2.0
Packager: Shiraz Memon <[email protected]>

Expand All @@ -36,7 +36,7 @@ Requires: python2-validators


%description
Nagios probes to check functionality of B2ACCESS Service
Monitoring metrics to check functionality of B2ACCESS Service

%prep
%setup -q
Expand All @@ -46,20 +46,22 @@ Nagios probes to check functionality of B2ACCESS Service

%install

install -d %{buildroot}/%{_libexecdir}/argo-monitoring/probes/%{probe_namespace}
install -m 755 check_b2access.py %{buildroot}/%{_libexecdir}/argo-monitoring/probes/%{probe_namespace}/check_b2access.py
install -m 755 check_b2access_simple.py %{buildroot}/%{_libexecdir}/argo-monitoring/probes/%{probe_namespace}/check_b2access_simple.py
install -d %{buildroot}/%{_libexecdir}/argo/probes/%{probe_namespace}
install -m 755 check_b2access.py %{buildroot}/%{_libexecdir}/argo/probes/%{probe_namespace}/check_b2access.py
install -m 755 check_b2access_simple.py %{buildroot}/%{_libexecdir}/argo/probes/%{probe_namespace}/check_b2access_simple.py

%files
%dir /%{_libexecdir}/argo-monitoring
%dir /%{_libexecdir}/argo-monitoring/probes/
%dir /%{_libexecdir}/argo-monitoring/probes/%{probe_namespace}
%dir /%{_libexecdir}/argo
%dir /%{_libexecdir}/argo/probes/
%dir /%{_libexecdir}/argo/probes/%{probe_namespace}

%attr(0755,root,root) /%{_libexecdir}/argo-monitoring/probes/%{probe_namespace}/check_b2access.py
%attr(0755,root,root) /%{_libexecdir}/argo-monitoring/probes/%{probe_namespace}/check_b2access_simple.py
%attr(0755,root,root) /%{_libexecdir}/argo/probes/%{probe_namespace}/check_b2access.py
%attr(0755,root,root) /%{_libexecdir}/argo/probes/%{probe_namespace}/check_b2access_simple.py

%changelog
* Mon Jan 24 2022 Themis Zamani <[email protected]> - 0.4-2
* Tue Mar 15 2022 Themis Zamani <[email protected]> - 0.4-2
- Update the spec file requirements
* Mon Jan 24 2022 Themis Zamani <[email protected]> - 0.4-2
- Update the spec file requirements
* Tue Jun 05 2018 Shiraz Memon <[email protected]> - 0.4-1
- Adapted to Unity v2.x.x REST API
Expand Down

0 comments on commit cc70459

Please sign in to comment.