Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/refactor maintenance #6378

Merged
merged 45 commits into from
Jun 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
db92e34
[Vagrant] add Debian 11 and RHEL 8 boxes
nqb May 21, 2021
5f9c737
[Vagrant] add a pristine Debian 9 box
nqb May 21, 2021
6f1d101
[tests] extract version and pass it to Ansible
nqb May 21, 2021
920c94c
next devel version is 11.0.0
nqb May 21, 2021
187d2ad
move PF version variables in config.mk
nqb May 21, 2021
b05503a
get release from ci scripts
nqb May 26, 2021
468280f
[ci] deploy rpm in a specific directory
nqb May 26, 2021
6a20a08
[ci] deploy deb in a specific directory
nqb May 26, 2021
bb9e5e6
[ci] deploy packefence-release in a specific directory
nqb May 26, 2021
b85e676
build using Makefile
nqb May 26, 2021
6b75c05
[ci] rpm: create target directory
nqb May 27, 2021
f8786f5
[ci] rename PF_RELEASE variable and update Ansible inventory
nqb May 27, 2021
d280ac1
[ci] reflect changes in ci-repo-deploy script
nqb May 27, 2021
151676c
[ci] minor fixes to ci scripts
nqb May 28, 2021
999b9f1
[ci] upload packetfence-release for el7 and el8 with same GitLab jobs
nqb Jun 1, 2021
d1aea96
[Ansible] update paths to repositories
nqb Jun 1, 2021
03b4608
[vagrant_img] only use packetfence repo
nqb Jun 3, 2021
a69ec79
fix Makefile paths
nqb Jun 3, 2021
26347c0
[vagrant_img] use pf_version from config.mk
nqb Jun 3, 2021
f58d4dc
[zen] adjust build to reflect changes
nqb Jun 3, 2021
33c89c1
[vagrant_img] pass PF_MINOR_RELEASE into environment
nqb Jun 4, 2021
b5923d0
[Ansible] always install pkgs from local repositories
nqb Jun 8, 2021
bdc418c
[Ansible] add comments in requirements to develop locally
nqb Jun 8, 2021
5b57e24
script to make patch release more simple
nqb Jun 11, 2021
27a4c30
put files in correct state for new release
nqb Jun 11, 2021
a9ab9e4
build directly native pkgs due to update of changelog
nqb Jun 11, 2021
b11bdbe
don't include patch release in pf_version table
nqb Jun 14, 2021
e8439d5
use a more explicit name for packetfence-release
nqb Jun 18, 2021
33266e1
don't change directory to update changelog
nqb Jun 18, 2021
055d5c2
[ci] build pkg on maintenance
nqb Jun 18, 2021
d7185c1
deprecate maintenance script
nqb Jun 18, 2021
4dbbb0b
[pfbuild] use new repository layout to build Docker images
nqb Jun 18, 2021
3fd84c7
deprecate maintenance sign
nqb Jun 18, 2021
19ffb1a
[ci] run maintenance jobs nightly with rules:
nqb Jun 18, 2021
76f3226
[ci] adjust release script
nqb Jun 22, 2021
db08739
fix wrong name in ZEN build
nqb Jun 22, 2021
14b1f9f
deprecate maintenance patches and packetfence-devel repo
nqb Jun 22, 2021
58b74d2
fix typos
nqb Jun 22, 2021
e1f0efb
put back git_commit_id during build
nqb Jun 23, 2021
1fadac4
minor adjustements for new release procedure
nqb Jun 23, 2021
0871afb
[Ansible] use new collection version
nqb Jun 24, 2021
38120b9
[docs] provide instructions to migrate
nqb Jun 25, 2021
85df202
Update addons/vagrant/requirements.yml
nqb Jun 28, 2021
8e214fd
Update addons/vagrant/requirements.yml
nqb Jun 28, 2021
03c8031
[pkg] build sources using tar in place of git archive
nqb Jun 28, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
287 changes: 172 additions & 115 deletions .gitlab-ci.yml

Large diffs are not rendered by default.

57 changes: 53 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ docs/%.pdf: docs/%.asciidoc
asciidoctor-pdf \
-a pdf-theme=docs/asciidoctor-pdf-theme.yml \
-a pdf-fontsdir=docs/fonts \
-a release_version=`cat conf/pf-release | cut -d' ' -f 2` \
-a release_version=$(PF_PATCH_RELEASE) \
-a release_minor=$(PF_MINOR_RELEASE) \
-a release_month=`date +%B` \
$<

Expand All @@ -36,7 +37,8 @@ docs/%.html: docs/%.asciidoc
-r ./docs/asciidoctor-html.rb \
-a stylesdir=../html/pfappserver/root/dist/css \
-a stylesheet=$(notdir $(wildcard ./html/pfappserver/root/dist/css/app*.css)) \
-a release_version=`cat conf/pf-release | cut -d' ' -f 2` \
-a release_version=$(PF_PATCH_RELEASE) \
-a release_minor=$(PF_MINOR_RELEASE) \
-a release_month=`date +%B` \
$<

Expand Down Expand Up @@ -214,5 +216,52 @@ html_install:

.PHONY: conf/git_commit_id
conf/git_commit_id:
echo $$CI_COMMIT_SHA > $@

git rev-parse HEAD > $@

.PHONY: rpm/.rpmmacros
rpm/.rpmmacros:
echo "%systemddir /usr/lib/systemd" > $(SRC_RPMDIR)/.rpmmacros
echo "%pf_minor_release $(PF_MINOR_RELEASE)" >> $(SRC_RPMDIR)/.rpmmacros

.PHONY: build_rpm
build_rpm: conf/git_commit_id rpm/.rpmmacros dist
cp $(SRC_RPMDIR)/.rpmmacros $(HOME)
ci-build-pkg $(SRC_RPMDIR)/packetfence-release.spec
ci-build-pkg $(SRC_RPMDIR)/packetfence.spec

.PHONY: build_deb
build_deb: conf/git_commit_id
cp $(SRC_CIDIR)/debian/.devscripts $(HOME)
QUILT_PATCHES=$(SRC_DEBDIR)/patches quilt push
ci-build-pkg $(SRC_DEBDIR)

.PHONY: patch_release
patch_release:
$(SRC_CIDIR)/lib/release/prep-release.sh

.PHONY: distclean
distclean: go_clean vagrant_clean npm_clean clean
rm -rf packetfence-$(PF_PATCH_RELEASE).tar

.PHONY: go_clean
go_clean:
$(MAKE) -C $(SRC_GODIR) clean

# to remove Ansible files from addons/vagrant/
.PHONY: vagrant_clean
vagrant_clean:
$(MAKE) -C $(SRC_CI_TESTDIR) delete

.PHONY: npm_clean
npm_clean:
$(MAKE) -C $(SRC_HTML_COMMONDIR) clean
$(MAKE) -C $(SRC_HTML_PFAPPDIR_ROOT) clean

.PHONY: dist
dist: distclean
mkdir -p packetfence-$(PF_PATCH_RELEASE)
# preserve, recursive and symlinks
cp -pRH $(files_to_include) packetfence-$(PF_PATCH_RELEASE)
tar c --exclude-from=$(SRC_ROOT_DIR)/dist_ignore \
-f packetfence-$(PF_PATCH_RELEASE).tar packetfence-$(PF_PATCH_RELEASE)
rm -rf packetfence-$(PF_PATCH_RELEASE)
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/bin/bash

#This is will attempt to install all the packages
#from the spec file using just packetfence-devel repo
#from the spec file using just packetfence repo
#

PFDIR=${PFDIR:-/usr/local/pf}
SPEC=${SPEC:-"$PFDIR/rpm/packetfence.spec"}
REPO=${REPO:-packetfence-devel}
REPO=${REPO:-packetfence}
PF_REPO="--enablerepo=$REPO"
STD_REPOS="--enablerepo=base --enablerepo=updates --enablerepo=extras"

Expand Down
14 changes: 0 additions & 14 deletions addons/monit/monit_checks_configurations/00_packetfence.tt
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
# PacketFence system checks


# - Alert every day at 6AM
# - Do not use Monit alerting since calling external 'mail' command
CHECK PROGRAM patch WITH PATH /usr/local/pf/addons/pf-maint.pl -t
group PacketFence
every "0 6 * * *"
[% FOREACH email IN EMAILS %]
noalert [% email %]
if status != 0 then exec "[% MAIL_BIN %] -s '[% SUBJECT_IDENTIFIER %] - PacketFence maintenance patch available' [% email %]"
[% END %]


# PacketFence services checks

CHECK PROCESS packetfence-config MATCHING "pfconfig"
Expand Down
Loading