Skip to content

Commit 2c6cac1

Browse files
committed
added build workflow and el9 support
1 parent 5b9ca68 commit 2c6cac1

File tree

5 files changed

+228
-11
lines changed

5 files changed

+228
-11
lines changed

.github/workflows/build.yml

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
---
2+
name: Create packages and test installation
3+
4+
on:
5+
pull_request:
6+
7+
jobs:
8+
centos7:
9+
name: Build CentOS 7 RPMs
10+
runs-on: ubuntu-latest
11+
container: quay.io/centos/centos:7
12+
steps:
13+
- uses: actions/checkout@v3
14+
with:
15+
fetch-depth: 0
16+
- name: Install build requisites
17+
run: |
18+
yum install -y rpm-build rpmlint make rsync
19+
- name: build rpm
20+
run: |
21+
make rpm
22+
rpmlint --file .rpmlint.ini build/RPMS/noarch/*.rpm
23+
- name: Upload rpms
24+
uses: actions/upload-artifact@v3
25+
with:
26+
name: rpms7
27+
path: |
28+
build/RPMS/noarch/nagios-*.el7.x86_64.rpm
29+
30+
build-almalinux9:
31+
name: Build AlmaLinux 9 RPMs
32+
runs-on: ubuntu-latest
33+
container: almalinux:9
34+
steps:
35+
- uses: actions/checkout@v4
36+
with:
37+
fetch-depth: 0
38+
- name: Install build requisites
39+
run: |
40+
dnf install -y rpm-build rpmlint make rsync systemd-rpm-macros
41+
- name: build rpm
42+
run: |
43+
make clean rpm
44+
rpmlint --file .rpmlint.ini build/RPMS/noarch/*.rpm
45+
- name: Upload RPMs
46+
uses: actions/upload-artifact@v3
47+
with:
48+
name: rpms9
49+
path: |
50+
build/RPMS/noarch/nagios-*.el9.x86_64.rpm
51+
52+
centos7-install:
53+
name: Install CentOS 7 RPMs
54+
needs: centos7
55+
runs-on: ubuntu-latest
56+
container: quay.io/centos/centos:7
57+
steps:
58+
- uses: actions/download-artifact@v3
59+
with:
60+
name: rpms7
61+
- name: Install generated RPMs
62+
run: |
63+
yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
64+
yum install -y http://repository.egi.eu/sw/production/umd/4/centos7/x86_64/updates/umd-release-4.1.3-1.el7.centos.noarch.rpm
65+
yum localinstall -y ui-*.rpm
66+
67+
install-almalinux9:
68+
name: Install AlmaLinux 9 RPMs
69+
needs: build-almalinux9
70+
runs-on: ubuntu-latest
71+
container: almalinux:9
72+
steps:
73+
- uses: actions/download-artifact@v3
74+
with:
75+
name: rpms9
76+
- name: Install generated RPMs
77+
run: |
78+
# FIXME: remove external repo when UMD5 is available
79+
dnf install -y epel-release
80+
dnf localinstall -y nagios-*.rpm

.github/workflows/check-links.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
name: Check links
3+
4+
on: [push, pull_request]
5+
6+
jobs:
7+
markdown-link-check:
8+
name: Check links using markdown-link-check
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
# Checks out a copy of your repository on the ubuntu-latest machine
13+
- name: Checkout code
14+
uses: actions/checkout@v3
15+
with:
16+
# Make sure the actual branch is checked out when running on PR
17+
ref: ${{ github.event.pull_request.head.sha }}
18+
# Full git history needed to get proper list of changed files
19+
fetch-depth: 0
20+
21+
- name: Check links on new changes
22+
uses: gaurav-nelson/github-action-markdown-link-check@v1
23+
with:
24+
config-file: ".github/linters/mlc_config.json"
25+
check-modified-files-only: "yes"
26+
use-quiet-mode: "yes"
27+
use-verbose-mode: "yes"
28+
base-branch: "main"

.github/workflows/lint.yml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
---
22
name: Lint
33

4-
on:
5-
pull_request:
4+
on: [pull_request]
65

76
jobs:
87
super-lint:
@@ -20,17 +19,14 @@ jobs:
2019
fetch-depth: 0
2120

2221
# Runs the Super-Linter action
23-
- name: Run Super-Linter
22+
- name: Run Super-Linter on new changes
2423
uses: docker://ghcr.io/github/super-linter:slim-v4
2524
env:
26-
DEFAULT_BRANCH: master
25+
DEFAULT_BRANCH: main
2726
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27+
MARKDOWN_CONFIG_FILE: .markdownlint.json
2828
# XXX gitleaks is currently not using exception file: #511
29-
VALIDATE_GITLEAKS: false
30-
# Only check changed files
31-
VALIDATE_ALL_CODEBASE: false
32-
# Debug super-linter
33-
ACTIONS_RUNNER_DEBUG: false
29+
# Always check all the content
30+
VALIDATE_ALL_CODEBASE: true
3431
# Fail on errors
3532
DISABLE_ERRORS: false
36-
FILTER_REGEX_EXCLUDE: "(layouts/)|(.*/egi.js)|(assets/scss/)|(static/css/)"

.github/workflows/release.yml

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
---
2+
# When a tag is created
3+
# - create a new release from the tag
4+
# - build and attach packages to the release
5+
name: Create packages and release
6+
7+
on:
8+
push:
9+
tags:
10+
- "v*"
11+
12+
jobs:
13+
centos7:
14+
name: Build centOS 7 RPMs
15+
runs-on: ubuntu-latest
16+
container: centos:7
17+
steps:
18+
- uses: actions/checkout@v3
19+
with:
20+
fetch-depth: 0
21+
- name: install build requisites
22+
run: |
23+
yum install -y rpm-build rpmlint make rsync
24+
- name: build rpm
25+
run: |
26+
make rpm
27+
rpmlint --file .rpmlint.ini build/RPMS/x86_64/*.rpm
28+
- name: Upload rpms
29+
uses: actions/upload-artifact@v3
30+
with:
31+
name: rpms7
32+
path: |
33+
build/RPMS/x86_64/ui-*.el7.x86_64.rpm
34+
build/SRPMS/ui-*.el7.src.rpm
35+
36+
almalinux9:
37+
name: Build AlmaLinux 9 RPMs
38+
runs-on: ubuntu-latest
39+
container: almalinux:9
40+
steps:
41+
- uses: actions/checkout@v4
42+
with:
43+
fetch-depth: 0
44+
- name: Install build requisites
45+
run: |
46+
dnf install -y rpm-build make rsync systemd-rpm-macros
47+
- name: build rpm
48+
run: |
49+
make clean rpm
50+
- name: Upload RPMs
51+
uses: actions/upload-artifact@v4
52+
with:
53+
name: rpms9
54+
path: |
55+
build/RPMS/x86_64/ui-*.el9.x86_64.rpm
56+
build/SRPMS/ui-*.el9.src.rpm
57+
58+
release7:
59+
name: Upload CentOS 7 release artefacts
60+
needs: centos7
61+
runs-on: ubuntu-latest
62+
steps:
63+
- uses: actions/download-artifact@v3
64+
with:
65+
name: rpms7
66+
67+
- name: Find package name
68+
id: package_name_centos7
69+
run: |
70+
rpm_path=$(find . -name 'ui-*.el7.x86_64.rpm')
71+
src_path=$(find . -name 'ui-*.el7.src.rpm')
72+
echo "rpm_path=${rpm_path}" >> "$GITHUB_OUTPUT"
73+
echo "src_path=${src_path}" >> "$GITHUB_OUTPUT"
74+
75+
- name: Attach CentOS 7 RPMs to the release
76+
uses: softprops/action-gh-release@v1
77+
env:
78+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
79+
with:
80+
fail_on_unmatched_files: true
81+
files: |
82+
${{ steps.package_name_centos7.outputs.rpm_path }}
83+
${{ steps.package_name_centos7.outputs.src_path }}
84+
85+
release9:
86+
name: Upload AlmaLinux 9 release artefacts
87+
permissions:
88+
contents: write # to upload release asset (softprops/action-gh-release)
89+
needs: almalinux9
90+
runs-on: ubuntu-latest
91+
steps:
92+
- uses: actions/download-artifact@v4
93+
with:
94+
name: rpms9
95+
- name: Find package name
96+
id: package_name_almalinux9
97+
run: |
98+
rpm_path=$(find . -name 'ui-*.el9.x86_64.rpm')
99+
src_path=$(find . -name 'ui-*.el9.src.rpm')
100+
echo "rpm_path=${rpm_path}" >> "$GITHUB_OUTPUT"
101+
echo "src_path=${src_path}" >> "$GITHUB_OUTPUT"
102+
- name: Attach AlmaLinux 9 RPMs to the release
103+
uses: softprops/action-gh-release@v2
104+
env:
105+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
106+
with:
107+
fail_on_unmatched_files: true
108+
files: |
109+
${{ steps.package_name_almalinux9.outputs.rpm_path }}
110+
${{ steps.package_name_almalinux9.outputs.src_path }}

nagios-plugins-srm.spec

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
%define nagios_plugins_dir %{_libdir}/nagios/plugins
66

77
Name: nagios-plugins-srm
8-
Version: 0.0.7
8+
Version: 0.1.0
99
Release: 1%{?dist}
1010
Summary: Nagios probes to be run remotely against SRM mendpoints
1111
License: ASL 2.0
@@ -55,6 +55,9 @@ rm -rf %{buildroot}
5555
%doc LICENSE README.md
5656

5757
%changelog
58+
* Tue Jun 11 2024 Andrea Manzi <andrea.manzi@egi.eu> - 0.1.0-0
59+
- support for el9
60+
5861
* Mon Jun 19 2023 Andrea Manzi <andrea.manzi@egi.eu> - 0.0.7-0
5962
- updated default top BDII adress
6063

0 commit comments

Comments
 (0)