From dddc7f98d3b6c82b29d18e249e96f2005ce39909 Mon Sep 17 00:00:00 2001 From: JeGoi <13801368+JeGoi@users.noreply.github.com> Date: Tue, 24 Sep 2024 08:41:12 -0400 Subject: [PATCH] Fix/8300 Remove radiusd from building in docker and use the one on repos (#8305) * Clean container/radiusd dockerfile to keep essential and install from repo * Move radiusd to previous stage and change ci dependencies * Update radius version to install * CI wake up --- .gitlab-ci.yml | 64 ++++++++++++++++++++++++++++++----- containers/radiusd/Dockerfile | 58 ++----------------------------- 2 files changed, 58 insertions(+), 64 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4821d4e6c98e..0d5399c60a60 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -630,7 +630,6 @@ pfdeb_based_dev: - "httpd.aaa" - "httpd.admin_dispatcher" - "httpd.webservices" - - "radiusd" - "pfsetacls" - "pfsso" - "pfperl-api" @@ -661,7 +660,20 @@ rad_based_dev: extends: - .build_img_container_job_dev - .build_img_container_devel_rules - needs: ["pfdeb_based_dev"] + needs: ["pfdeb_dev"] + variables: + IMAGE_TAGS: "${CI_COMMIT_REF_SLUG},latest" + parallel: + # /!\ Be sure to update this list in all other matrix /!\ + matrix: + - IMAGE_NAME: + - "radiusd" + +rad_extend_dev: + extends: + - .build_img_container_job_dev + - .build_img_container_devel_rules + needs: ["rad_based_dev"] variables: IMAGE_TAGS: "${CI_COMMIT_REF_SLUG},latest" parallel: @@ -713,7 +725,6 @@ pfdeb_based_br_maint: - "httpd.aaa" - "httpd.admin_dispatcher" - "httpd.webservices" - - "radiusd" - "pfsetacls" - "pfsso" - "pfperl-api" @@ -744,7 +755,20 @@ rad_based_br_maint: extends: - .build_img_container_job_br_maint - .build_img_container_branches_and_maintenance_rules - needs: ["pfdeb_based_br_maint"] + needs: ["pfdeb_br_maint"] + variables: + IMAGE_TAGS: ${CI_COMMIT_REF_SLUG} + parallel: + # /!\ Be sure to update this list in all other matrix /!\ + matrix: + - IMAGE_NAME: + - "radiusd" + +rad_extend_br_maint: + extends: + - .build_img_container_job_br_maint + - .build_img_container_branches_and_maintenance_rules + needs: ["rad_based_br_maint"] variables: IMAGE_TAGS: ${CI_COMMIT_REF_SLUG} parallel: @@ -796,7 +820,6 @@ pfdeb_based_cloud_nac: - "httpd.aaa" - "httpd.admin_dispatcher" - "httpd.webservices" - - "radiusd" - "pfsetacls" - "pfsso" - "pfperl-api" @@ -827,7 +850,20 @@ rad_based_cloud_nac: extends: - .build_img_container_job_cloud_nac - .build_img_container_cloud_nac_rules - needs: ["pfdeb_based_cloud_nac"] + needs: ["pfdeb_cloud_nac"] + variables: + IMAGE_TAGS: ${CI_COMMIT_REF_SLUG}-${CI_PIPELINE_ID} + parallel: + # /!\ Be sure to update this list in all other matrix /!\ + matrix: + - IMAGE_NAME: + - "radiusd" + +rad_extend_cloud_nac: + extends: + - .build_img_container_job_cloud_nac + - .build_img_container_cloud_nac_rules + needs: ["rad_based_cloud_nac"] variables: IMAGE_TAGS: ${CI_COMMIT_REF_SLUG}-${CI_PIPELINE_ID} parallel: @@ -879,7 +915,6 @@ pfdeb_based_rel: - "httpd.aaa" - "httpd.admin_dispatcher" - "httpd.webservices" - - "radiusd" - "pfsetacls" - "pfsso" - "pfperl-api" @@ -910,7 +945,20 @@ rad_based_rel: extends: - .build_img_container_job_rel - .release_only_rules - needs: ["pfdeb_based_rel"] + needs: ["pfdeb_rel"] + variables: + IMAGE_TAGS: ${CI_COMMIT_TAG} + parallel: + # /!\ Be sure to update this list in all other matrix /!\ + matrix: + - IMAGE_NAME: + - "radiusd" + +rad_extend_rel: + extends: + - .build_img_container_job_rel + - .release_only_rules + needs: ["rad_based_rel"] variables: IMAGE_TAGS: ${CI_COMMIT_TAG} parallel: diff --git a/containers/radiusd/Dockerfile b/containers/radiusd/Dockerfile index e42fbe261d7e..6ae212513612 100644 --- a/containers/radiusd/Dockerfile +++ b/containers/radiusd/Dockerfile @@ -1,65 +1,11 @@ -ARG from=debian:bookworm ARG KNK_REGISTRY_URL ARG IMAGE_TAG - -FROM ${from} as build - -ARG DEBIAN_FRONTEND=noninteractive - -# -# Install build tools -# -RUN apt-get -qq update -RUN apt-get -qq install -y devscripts equivs git quilt gcc libcollectdclient-dev - -# -# Create build directory -# -RUN mkdir -p /usr/local/src/repositories -WORKDIR /usr/local/src/repositories - -# -# Shallow clone the FreeRADIUS source -# -ARG source=https://github.com/inverse-inc/freeradius-server.git -ARG release=feature/PacketFence_3.2.6 - -RUN git clone -qq --depth 1 --single-branch --branch ${release} ${source} -WORKDIR freeradius-server - -# -# Install build dependencies -# -RUN git checkout ${release}; \ - if [ -e ./debian/control.in ]; then \ - debian/rules debian/control; \ - fi; \ - echo 'y' | mk-build-deps -irt'apt-get -yV' debian/control - -# -# Build the server -# -# RUN make -j2 deb >/dev/null || make -j2 deb -RUN make -j2 deb - -# -# Clean environment and run the server -# FROM ${KNK_REGISTRY_URL}/pfdebian:${IMAGE_TAG} -# Copy debian packages -COPY --from=build /usr/local/src/repositories/*.deb /tmp/ - -RUN apt-get -qq -y remove freeradius-common - - RUN apt-get -qq update \ && apt-get clean \ - && apt-get -qq install -y /tmp/*.deb \ - && apt-get clean \ - && rm -r /var/lib/apt/lists/* /tmp/*.deb \ - \ - && ln -s /etc/freeradius /etc/raddb + && apt-get -qq install -y freeradius=3:3.2.6+git \ + && apt-get clean WORKDIR /usr/local/pf/