Skip to content

Commit

Permalink
Drop EL7 (#266)
Browse files Browse the repository at this point in the history
  • Loading branch information
treydock authored Jan 25, 2024
1 parent 31b939e commit 1d9bc48
Show file tree
Hide file tree
Showing 33 changed files with 22 additions and 1,466 deletions.
17 changes: 0 additions & 17 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ jobs:
matrix:
os: [ubuntu-22.04]
dist:
- el7
- el8
- el9
- ubuntu-20.04
Expand Down Expand Up @@ -65,7 +64,6 @@ jobs:
matrix:
os: [ubuntu-22.04]
dist:
- el7
- el8
- el9
- amzn2023
Expand All @@ -85,16 +83,6 @@ jobs:
- python-websockify
- turbovnc
include:
- dist: el7
arch: x86_64
os: ubuntu-22.04
package: sqlite
# Github actions for multi arch run as root and
# this seems to break the sqlite tests
#- dist: el7
# arch: aarch64
# os: ubuntu-22.04
# package: sqlite
- dist: amzn2023
arch: x86_64
os: ubuntu-22.04
Expand Down Expand Up @@ -255,7 +243,6 @@ jobs:
matrix:
os: [ubuntu-22.04]
dist:
- el7
- el8
- el9
- ubuntu-20.04
Expand All @@ -269,10 +256,6 @@ jobs:
package:
- ondemand
include:
- dist: el7
arch: x86_64
os: ubuntu-22.04
package: bc_osc_rstudio_server
- dist: el8
arch: x86_64
os: ubuntu-22.04
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ jobs:
fail-fast: false
matrix:
dist:
- el7
- el8
- el9
- amzn2023
Expand Down
43 changes: 11 additions & 32 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ build-image:
- bundle exec rake ood_packaging:buildbox:build
parallel:
matrix:
- OOD_PACKAGING_DIST: [el7, el8]
- OOD_PACKAGING_DIST: [el8]
OOD_PACKAGING_ARCH: [x86_64, aarch64, ppc64le]
OOD_PACKAGING_GPG_PRIVATE_KEY: /systems/osc_certs/gpg/ondemand/ondemand.sec
- OOD_PACKAGING_DIST: [el9, debian-12]
Expand All @@ -50,7 +50,7 @@ build-ondemand-release:
- bundle exec rake ood_packaging:package:ondemand-release
parallel:
matrix:
- OOD_PACKAGING_DIST: [el7, el8, el9, amzn2023]
- OOD_PACKAGING_DIST: [el8, el9, amzn2023]
- OOD_PACKAGING_DIST: [ubuntu-20.04, ubuntu-22.04, debian-12]
artifacts:
paths:
Expand All @@ -68,7 +68,7 @@ build-ondemand-release-latest:
- bundle exec rake ood_packaging:package:ondemand-release-latest
parallel:
matrix:
- OOD_PACKAGING_DIST: [el7, el8, el9, amzn2023]
- OOD_PACKAGING_DIST: [el8, el9, amzn2023]
- OOD_PACKAGING_DIST: [ubuntu-20.04, ubuntu-22.04, debian-12]
artifacts:
paths:
Expand All @@ -86,7 +86,7 @@ build-ondemand-runtime:
- bundle exec rake ood_packaging:package:ondemand-runtime
parallel:
matrix:
- OOD_PACKAGING_DIST: [el7, el8]
- OOD_PACKAGING_DIST: [el8]
OOD_PACKAGING_ARCH: [x86_64, aarch64, ppc64le]
OOD_PACKAGING_GPG_PRIVATE_KEY: /systems/osc_certs/gpg/ondemand/ondemand.sec
- OOD_PACKAGING_DIST: [el9]
Expand Down Expand Up @@ -127,7 +127,7 @@ build-passenger:
- bundle exec rake ood_packaging:package:passenger[$DIST]
parallel:
matrix:
- OOD_PACKAGING_DIST: [el7, el8]
- OOD_PACKAGING_DIST: [el8]
OOD_PACKAGING_ARCH: [x86_64, aarch64, ppc64le]
OOD_PACKAGING_GPG_PRIVATE_KEY: /systems/osc_certs/gpg/ondemand/ondemand.sec
- OOD_PACKAGING_DIST: [el9, debian-12]
Expand All @@ -144,26 +144,6 @@ build-passenger:
- tmp/output
name: "$CI_PROJECT_NAME-$CI_COMMIT_TAG"

build-sqlite:
stage: build
rules:
# Re-enable once Gitlab instance using plugin to integrate with Github
# - if: '$CI_PIPELINE_SOURCE == "external_pull_request_event"'
- if: '$CI_COMMIT_BRANCH !~ /^(main|[0-9]\.[0-9])$/ && $CI_COMMIT_TAG == null'
- if: '$CI_COMMIT_TAG =~ /^sqlite-/'
script:
- bundle exec rake ood_packaging:package:sqlite[$DIST]
parallel:
matrix:
- OOD_PACKAGING_DIST: el7
OOD_PACKAGING_ARCH: [x86_64, aarch64, ppc64le]
OOD_PACKAGING_GPG_PRIVATE_KEY: /systems/osc_certs/gpg/ondemand/ondemand.sec
timeout: 2h
artifacts:
paths:
- tmp/output
name: "$CI_PROJECT_NAME-$CI_COMMIT_TAG"

build-cjose:
stage: build
rules:
Expand All @@ -175,7 +155,7 @@ build-cjose:
- bundle exec rake ood_packaging:package:cjose[$DIST]
parallel:
matrix:
- OOD_PACKAGING_DIST: [el7, el8]
- OOD_PACKAGING_DIST: [el8]
OOD_PACKAGING_ARCH: [x86_64, aarch64, ppc64le]
OOD_PACKAGING_GPG_PRIVATE_KEY: /systems/osc_certs/gpg/ondemand/ondemand.sec
- OOD_PACKAGING_DIST: [amzn2023]
Expand All @@ -196,7 +176,7 @@ build-mod_auth_openidc:
- bundle exec rake ood_packaging:package:mod_auth_openidc[$DIST]
parallel:
matrix:
- OOD_PACKAGING_DIST: [el7, el8]
- OOD_PACKAGING_DIST: [el8]
OOD_PACKAGING_ARCH: [x86_64, aarch64, ppc64le]
OOD_PACKAGING_GPG_PRIVATE_KEY: /systems/osc_certs/gpg/ondemand/ondemand.sec
- OOD_PACKAGING_DIST: [amzn2023]
Expand All @@ -217,7 +197,7 @@ build-ondemand_exporter:
- bundle exec rake ood_packaging:package:ondemand_exporter[$DIST]
parallel:
matrix:
- OOD_PACKAGING_DIST: [el7, el8]
- OOD_PACKAGING_DIST: [el8]
OOD_PACKAGING_ARCH: [x86_64, aarch64, ppc64le]
OOD_PACKAGING_GPG_PRIVATE_KEY: /systems/osc_certs/gpg/ondemand/ondemand.sec
- OOD_PACKAGING_DIST: [el9]
Expand All @@ -242,7 +222,7 @@ build-ondemand-compute:
- cp -r tmp/output/$OOD_PACKAGING_DIST-x86_64 tmp/output/$OOD_PACKAGING_DIST-ppc64le
parallel:
matrix:
- OOD_PACKAGING_DIST: [el7, el8]
- OOD_PACKAGING_DIST: [el8]
OOD_PACKAGING_GPG_PRIVATE_KEY: /systems/osc_certs/gpg/ondemand/ondemand.sec
- OOD_PACKAGING_DIST: [el9, amzn2023]
artifacts:
Expand All @@ -261,7 +241,7 @@ build-python-websockify:
- bundle exec rake ood_packaging:package:python-websockify[$DIST]
parallel:
matrix:
- OOD_PACKAGING_DIST: [el7, el8]
- OOD_PACKAGING_DIST: [el8]
OOD_PACKAGING_ARCH: [x86_64, aarch64, ppc64le]
OOD_PACKAGING_GPG_PRIVATE_KEY: /systems/osc_certs/gpg/ondemand/ondemand.sec
- OOD_PACKAGING_DIST: [el9]
Expand All @@ -284,7 +264,7 @@ build-turbovnc:
- bundle exec rake ood_packaging:package:turbovnc
parallel:
matrix:
- OOD_PACKAGING_DIST: [el7, el8]
- OOD_PACKAGING_DIST: [el8]
OOD_PACKAGING_ARCH: [x86_64, aarch64, ppc64le]
OOD_PACKAGING_GPG_PRIVATE_KEY: /systems/osc_certs/gpg/ondemand/ondemand.sec
- OOD_PACKAGING_DIST: [el9]
Expand Down Expand Up @@ -326,7 +306,6 @@ package-deploy-build:
- if: '$CI_COMMIT_TAG =~ /^ondemand-runtime-/'
- if: '$CI_COMMIT_TAG =~ /^scl-utils-/'
- if: '$CI_COMMIT_TAG =~ /^passenger-/'
- if: '$CI_COMMIT_TAG =~ /^sqlite-/'
- if: '$CI_COMMIT_TAG =~ /^cjose-/'
- if: '$CI_COMMIT_TAG =~ /^mod_auth_openidc-/'
script:
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
ood_packaging (0.13.5)
ood_packaging (0.14.0)
rake (~> 13.0.1)

GEM
Expand Down
10 changes: 1 addition & 9 deletions lib/ood_packaging/build_box.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ class OodPackaging::BuildBox
include FileUtils

BASE_IMAGES = {
'el7' => 'centos:7',
'el8' => 'almalinux:8',
'el9' => 'almalinux:9',
'ubuntu-20.04' => 'ubuntu:20.04',
Expand Down Expand Up @@ -63,19 +62,12 @@ def deb?

def dnf?
return false unless rpm?
return false if dist == 'el7'

true
end

def scl?
return true if dist == 'el7'

false
end

def legacy_gpg?
return true if ['el7', 'el8'].include?(dist)
return true if ['el8'].include?(dist)

false
end
Expand Down
12 changes: 1 addition & 11 deletions lib/ood_packaging/build_box/docker-image/Dockerfile.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,7 @@ ENV LC_CTYPE=en_US.UTF-8
ENV LC_ALL=en_US.UTF-8
ENV USER=<%= ctr_user %>
ENV GEM_PATH=<%= ctr_gems_dir %>:
<% if dist == 'el7' -%>
RUN yum update -y && yum clean all && rm -rf /var/cache/yum/*
RUN yum install -y yum-utils epel-release centos-release-scl && yum clean all && rm -rf /var/cache/yum/*
RUN yum install -y <%= scl_ruby %>-ruby sudo which wget @buildsys-build \
rpm-build rpmdevtools rpm-sign scl-utils-build && \
yum clean all && rm -rf /var/cache/yum/*
RUN rm -f /etc/yum.repos.d/CentOS-Vault.repo /etc/yum.repos.d/CentOS-Sources.repo
RUN head -n 13 /etc/yum.repos.d/CentOS-SCLo-scl.repo > /etc/yum.repos.d/CentOS-SCLo.repo
RUN head -n 13 /etc/yum.repos.d/CentOS-SCLo-scl-rh.repo >> /etc/yum.repos.d/CentOS-SCLo.repo
RUN rm -f /etc/yum.repos.d/CentOS-SCLo-scl-rh.repo /etc/yum.repos.d/CentOS-SCLo-scl.repo
<% elsif dnf? -%>
<% if dnf? -%>
RUN dnf update -y && dnf clean all && rm -rf /var/cache/dnf/*
RUN dnf install -y dnf-utils <%= dist =~ /^el/ ? 'epel-release' : '' %> langpacks-en glibc-langpack-en && dnf clean all && rm -rf /var/cache/dnf/*
<% if dist == 'el8' -%>
Expand Down
5 changes: 0 additions & 5 deletions lib/ood_packaging/build_box/docker-image/inituidgid.sh.erb
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@ chown -R "$OOD_UID:$OOD_GID" <%= ctr_home %>
groupmod -o -g "$OOD_GID" <%= ctr_user %>
usermod -o -u "$OOD_UID" -g "$OOD_GID" <%= ctr_user %> 2>/dev/null 1>/dev/null

set +e
SCL_SOURCE="$(command -v scl_source)"
[[ "${SCL_SOURCE}" ]] && source "${SCL_SOURCE}" enable "<%= scl_ruby %>" &> /dev/null
set -e

if [[ $# -gt 0 ]]; then
exec "$@"
fi
8 changes: 0 additions & 8 deletions lib/ood_packaging/build_box/docker-image/install.sh.erb
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,6 @@ run chmod 440 /etc/sudoers.d/ood
header "Setup RPM env"
sudo -u <%= ctr_user %> -H cat > <%= ctr_rpmmacros %> <<EOF
%_topdir <%= work_dir %>
<%- # Workaround to weird issue with debuginfo stripping -%>
<% if dist == 'el7' -%>
%_builddir %{_topdir}/rpmbuild/BUILD
<% end -%>
%_signature gpg
%_gpg_path <%= ctr_gpg_dir %>
%_gpg /usr/bin/gpg
Expand All @@ -76,11 +72,7 @@ echo "allow-loopback-pinentry" >> <%= ctr_gpg_dir %>/gpg-agent.conf
<%- end -%>

header "Install ood_packaging gem"
<%- if scl? -%>
run scl enable <%= scl_ruby %> -- gem install --no-doc --bindir <%= ctr_scripts_dir %> --install-dir <%= ctr_gems_dir %> /build/*.gem
<%- else -%>
run gem install --no-doc --bindir <%= ctr_scripts_dir %> --install-dir <%= ctr_gems_dir %> /build/*.gem
<%- end -%>

header "Copy in launch scripts"
run mkdir -p <%= ctr_scripts_dir %>
Expand Down
1 change: 0 additions & 1 deletion lib/ood_packaging/package.rb
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,6 @@ def exec_launchers
def exec_rake
cmd = []
cmd.concat exec_launchers if docker_runtime?
cmd.concat ['scl', 'enable', scl_ruby, '--'] if podman_runtime? && build_box.scl?
cmd.concat [File.join(ctr_scripts_dir, 'rake')]
cmd.concat ['-q'] unless debug?
cmd.concat ['-f', File.join(ctr_scripts_dir, 'Rakefile'), 'ood_packaging:package:build']
Expand Down
5 changes: 0 additions & 5 deletions lib/ood_packaging/tasks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,6 @@
Rake::Task['ood_packaging:package:internal'].invoke(t.name, args[:dist], args[:arch])
end

desc 'Package sqlite'
task :sqlite, [:dist, :arch] do |t, args|
Rake::Task['ood_packaging:package:internal'].invoke(t.name, args[:dist], args[:arch])
end

desc 'Package ondemand_exporter'
task :ondemand_exporter, [:dist, :arch] do |t, args|
Rake::Task['ood_packaging:package:internal'].invoke(t.name, args[:dist], args[:arch])
Expand Down
6 changes: 0 additions & 6 deletions lib/ood_packaging/utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,9 @@ def ondemand_rpm_repo_baseurl
end

def ruby_version
return '3.0' if dist == 'el7'

'3.1'
end

def scl_ruby
"rh-ruby#{ruby_version.tr('.', '')}"
end

def nodejs_version
'18'
end
Expand Down
5 changes: 2 additions & 3 deletions lib/ood_packaging/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Version code for OodPackaging
module OodPackaging
VERSION = '0.13.5'
VERSION = '0.14.0'
PACKAGE_VERSION = {
'ondemand-release' => {
'(ubuntu|debian)' => '3.1.1',
Expand All @@ -12,12 +12,11 @@ module OodPackaging
'(ubuntu|debian)' => '3',
'default' => '1-8'
},
'ondemand-runtime' => '3.1.3',
'ondemand-runtime' => '3.1.4',
'scl-utils' => '2.0.3',
'passenger' => '6.0.17',
'cjose' => '0.6.1',
'mod_auth_openidc' => '2.4.14.1',
'sqlite' => '3.26.0-4',
'ondemand_exporter' => '0.10.0',
'ondemand-compute' => {
'(ubuntu|debian)' => '3.1.0',
Expand Down
2 changes: 0 additions & 2 deletions packages/mod_auth_openidc/rpm/packaging.yaml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -52,19 +52,16 @@ mkdir -p %{buildroot}%{_docdir}/%{name}
exit 0

%post
if [ -L %{_sysconfdir}/yum.repos.d/ondemand-centos-scl.repo ]; then
unlink %{_sysconfdir}/yum.repos.d/ondemand-centos-scl.repo
fi
source /etc/os-release
if [[ "$VERSION_ID" =~ ^7 || "$VERSION_ID" =~ ^8 ]] ; then
if [[ "$VERSION_ID" =~ ^8 ]] ; then
install -m 0644 %{_datadir}/%{name}/RPM-GPG-KEY-ondemand %{_sysconfdir}/pki/rpm-gpg/RPM-GPG-KEY-ondemand
else
install -m 0644 %{_datadir}/%{name}/RPM-GPG-KEY-ondemand-SHA512 %{_sysconfdir}/pki/rpm-gpg/RPM-GPG-KEY-ondemand
fi

%post -n ondemand-release-compute-latest
source /etc/os-release
if [[ "$VERSION_ID" =~ ^7 || "$VERSION_ID" =~ ^8 ]] ; then
if [[ "$VERSION_ID" =~ ^8 ]] ; then
install -m 0644 %{_datadir}/ondemand-release-compute/RPM-GPG-KEY-ondemand-compute %{_sysconfdir}/pki/rpm-gpg/RPM-GPG-KEY-ondemand-compute
else
install -m 0644 %{_datadir}/ondemand-release-compute/RPM-GPG-KEY-ondemand-compute-SHA512 %{_sysconfdir}/pki/rpm-gpg/RPM-GPG-KEY-ondemand-compute
Expand Down
7 changes: 2 additions & 5 deletions packages/ondemand-release/rpm/ondemand-release.spec
Original file line number Diff line number Diff line change
Expand Up @@ -55,19 +55,16 @@ mkdir -p %{buildroot}%{_docdir}/%{name}
exit 0

%post
if [ -L %{_sysconfdir}/yum.repos.d/ondemand-centos-scl.repo ]; then
unlink %{_sysconfdir}/yum.repos.d/ondemand-centos-scl.repo
fi
source /etc/os-release
if [[ "$VERSION_ID" =~ ^7 || "$VERSION_ID" =~ ^8 ]] ; then
if [[ "$VERSION_ID" =~ ^8 ]] ; then
install -m 0644 %{_datadir}/%{name}/RPM-GPG-KEY-ondemand %{_sysconfdir}/pki/rpm-gpg/RPM-GPG-KEY-ondemand
else
install -m 0644 %{_datadir}/%{name}/RPM-GPG-KEY-ondemand-SHA512 %{_sysconfdir}/pki/rpm-gpg/RPM-GPG-KEY-ondemand
fi

%post -n ondemand-release-compute
source /etc/os-release
if [[ "$VERSION_ID" =~ ^7 || "$VERSION_ID" =~ ^8 ]] ; then
if [[ "$VERSION_ID" =~ ^8 ]] ; then
install -m 0644 %{_datadir}/ondemand-release-compute/RPM-GPG-KEY-ondemand-compute %{_sysconfdir}/pki/rpm-gpg/RPM-GPG-KEY-ondemand-compute
else
install -m 0644 %{_datadir}/ondemand-release-compute/RPM-GPG-KEY-ondemand-compute-SHA512 %{_sysconfdir}/pki/rpm-gpg/RPM-GPG-KEY-ondemand-compute
Expand Down
Loading

0 comments on commit 1d9bc48

Please sign in to comment.