diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c4667e4..7eadda6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,10 +1,9 @@ variables: CI_REGISTRY: registry.connectone.pro - CONTAINER_IMAGE: ${CI_REGISTRY}/${CI_PROJECT_PATH}:${CI_BUILD_REF_NAME}_${CI_BUILD_REF} + CONTAINER_IMAGE: ${CI_REGISTRY}/${CI_PROJECT_PATH}:${CI_COMMIT_REF_NAME}_${CI_COMMIT_SHORT_SHA} stages: - release - - deploy - release-deb - release-hosted @@ -12,12 +11,12 @@ release: stage: release image: docker:latest before_script: - - docker login -u gitlab-ci-token -p ${CI_BUILD_TOKEN} ${CI_REGISTRY} + - docker login -u ${CI_REGISTRY_USER} -p ${CI_REGISTRY_PASSWORD} ${CI_REGISTRY} script: - docker build -t ${CONTAINER_IMAGE} . - docker push ${CONTAINER_IMAGE} + when: manual only: - - develop - main release-deb: @@ -37,7 +36,7 @@ release-hosted: stage: release-hosted image: alpine:latest variables: - VERSION: "1.0.1" + VERSION: "1.0.2" script: - apk add --no-cache curl - chmod a+x hosted/install.sh @@ -46,38 +45,3 @@ release-hosted: when: manual only: - main - -deploy-staging: - stage: deploy - image: jar3b/deploh:${STAGING_DEPLOYER_VERSION} - variables: - KUBECONFIG_BASE64: ${STAGING_KUBECONFIG} - KUBECONFIG_CONTEXT_NAME: ${STAGING_KUBECONFIG_CONTEXT} - NAMESPACE: ${STAGING_NAMESPACE} - MAIN_DOMAIN: ${STAGING_MAIN_DOMAIN} - - STORAGE_BASE: ${STAGING_STORAGE_BASE} - script: - - he.sh . ${NAMESPACE} "freeradius" --set db.password=${PG_PROD_PASS} - environment: - name: staging - only: - - develop - -deploy-production: - stage: deploy - image: jar3b/deploh:${PRODUCTION_DEPLOYER_VERSION} - variables: - KUBECONFIG_BASE64: ${PRODUCTION_KUBECONFIG} - KUBECONFIG_CONTEXT_NAME: ${PRODUCTION_KUBECONFIG_CONTEXT} - NAMESPACE: ${PRODUCTION_NAMESPACE} - MAIN_DOMAIN: ${PRODUCTION_MAIN_DOMAIN} - - STORAGE_BASE: ${PRODUCTION_STORAGE_BASE} - script: - - he.sh . ${NAMESPACE} "freeradius" --set db.password=${PG_PROD_PASS} - environment: - name: production - when: manual - only: - - main \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 8eef07d..715e7b1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,14 +1,14 @@ -FROM ubuntu:18.04 +FROM ubuntu:24.04 WORKDIR /tmp ARG out_dir=/etc/freeradius -COPY local-bionic.list /etc/apt/sources.list +COPY local-noble.list /etc/apt/sources.list.d/ubuntu.sources RUN apt-get update && apt-get install -y apt-transport-https ca-certificates curl software-properties-common gpg RUN curl -fsSL http://connectone.pro/gpg | gpg --dearmor -o /usr/share/keyrings/connectone.gpg && \ echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/connectone.gpg] \ - https://nexus.connectone.pro/repository/radius bionic main" | tee /etc/apt/sources.list.d/connectone.list \ + https://nexus.connectone.pro/repository/radius noble main" | tee /etc/apt/sources.list.d/connectone.list \ > /dev/null -RUN apt-get update && apt-get install -y libfreeradius3=3.2.2+git freeradius-common=3.2.2+git \ - freeradius-postgresql=3.2.2+git freeradius-rest=3.2.2+git freeradius-utils=3.2.2+git freeradius=3.2.2+git && \ +RUN apt-get update && apt-get install -y libfreeradius3=3.2.8+git freeradius-common=3.2.8+git \ + freeradius-postgresql=3.2.8+git freeradius-rest=3.2.8+git freeradius-utils=3.2.8+git freeradius=3.2.8+git && \ apt autoremove --purge -y && apt-get clean COPY hosted /tmp/hosted RUN cp hosted/config/radiusd.conf $out_dir/radiusd.conf && \ diff --git a/build/Dockerfile b/build/Dockerfile index 32d5964..42ae1e3 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:18.04 +FROM ubuntu:24.04 ARG DEBIAN_FRONTEND=noninteractive ARG RADIUS_TAG="v3.2.x" @@ -11,7 +11,7 @@ ENV RLM_RAW_TAG="master" # Install build tools # -COPY local-bionic.list /etc/apt/sources.list +COPY local-noble.list /etc/apt/sources.list.d/ubuntu.sources RUN apt-get update && apt-get install -y devscripts equivs git quilt gcc diff --git a/build/local-bionic.list b/build/local-bionic.list deleted file mode 100644 index a2f8da0..0000000 --- a/build/local-bionic.list +++ /dev/null @@ -1,49 +0,0 @@ -# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to -# newer versions of the distribution. -deb http://mirror.yandex.ru/ubuntu/ bionic main restricted -# deb-src http://mirror.yandex.ru/ubuntu/ bionic main restricted - -## Major bug fix updates produced after the final release of the -## distribution. -deb http://mirror.yandex.ru/ubuntu/ bionic-updates main restricted -# deb-src http://mirror.yandex.ru/ubuntu/ bionic-updates main restricted - -## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu -## team. Also, please note that software in universe WILL NOT receive any -## review or updates from the Ubuntu security team. -deb http://mirror.yandex.ru/ubuntu/ bionic universe -# deb-src http://mirror.yandex.ru/ubuntu/ bionic universe -deb http://mirror.yandex.ru/ubuntu/ bionic-updates universe -# deb-src http://mirror.yandex.ru/ubuntu/ bionic-updates universe - -## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu -## team, and may not be under a free licence. Please satisfy yourself as to -## your rights to use the software. Also, please note that software in -## multiverse WILL NOT receive any review or updates from the Ubuntu -## security team. -deb http://mirror.yandex.ru/ubuntu/ bionic multiverse -# deb-src http://mirror.yandex.ru/ubuntu/ bionic multiverse -deb http://mirror.yandex.ru/ubuntu/ bionic-updates multiverse -# deb-src http://mirror.yandex.ru/ubuntu/ bionic-updates multiverse - -## N.B. software from this repository may not have been tested as -## extensively as that contained in the main release, although it includes -## newer versions of some applications which may provide useful features. -## Also, please note that software in backports WILL NOT receive any review -## or updates from the Ubuntu security team. -deb http://mirror.yandex.ru/ubuntu/ bionic-backports main restricted universe multiverse -# deb-src http://mirror.yandex.ru/ubuntu/ bionic-backports main restricted universe multiverse - -## Uncomment the following two lines to add software from Canonical's -## 'partner' repository. -## This software is not part of Ubuntu, but is offered by Canonical and the -## respective vendors as a service to Ubuntu users. -# deb http://archive.canonical.com/ubuntu bionic partner -# deb-src http://archive.canonical.com/ubuntu bionic partner - -deb http://security.ubuntu.com/ubuntu/ bionic-security main restricted -# deb-src http://security.ubuntu.com/ubuntu/ bionic-security main restricted -deb http://security.ubuntu.com/ubuntu/ bionic-security universe -# deb-src http://security.ubuntu.com/ubuntu/ bionic-security universe -deb http://security.ubuntu.com/ubuntu/ bionic-security multiverse -# deb-src http://security.ubuntu.com/ubuntu/ bionic-security multiverse diff --git a/build/local-noble.list b/build/local-noble.list new file mode 100644 index 0000000..da16c1a --- /dev/null +++ b/build/local-noble.list @@ -0,0 +1,13 @@ +Types: deb +URIs: http://ru.archive.ubuntu.com/ubuntu/ +Suites: noble noble-updates noble-backports +Components: main universe restricted multiverse +Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg + +## Ubuntu security updates. Aside from URIs and Suites, +## this should mirror your choices in the previous section. +Types: deb +URIs: http://ru.archive.ubuntu.com/ubuntu/ +Suites: noble-security +Components: main universe restricted multiverse +Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg \ No newline at end of file diff --git a/hosted/Dockerfile b/hosted/Dockerfile index 9317a1f..88c69c5 100644 --- a/hosted/Dockerfile +++ b/hosted/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:18.04 +FROM ubuntu:24.04 WORKDIR /test ADD . . diff --git a/hosted/install.sh b/hosted/install.sh index 664e803..1b81a91 100644 --- a/hosted/install.sh +++ b/hosted/install.sh @@ -16,10 +16,10 @@ apt-get install -y apt-transport-https ca-certificates curl software-properties- echo "Installing freeradius..." curl -fsSL http://connectone.pro/gpg | gpg --dearmor -o /usr/share/keyrings/connectone.gpg && \ echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/connectone.gpg] \ - https://nexus.connectone.pro/repository/radius bionic main" | tee /etc/apt/sources.list.d/connectone.list \ + https://nexus.connectone.pro/repository/radius noble main" | tee /etc/apt/sources.list.d/connectone.list \ > /dev/null -apt-get update && apt-get install -y libfreeradius3=3.2.2+git freeradius-common=3.2.2+git \ - freeradius-postgresql=3.2.2+git freeradius-rest=3.2.2+git freeradius-utils=3.2.2+git freeradius=3.2.2+git +apt-get update && apt-get install -y libfreeradius3=3.2.8+git freeradius-common=3.2.8+git \ + freeradius-postgresql=3.2.8+git freeradius-rest=3.2.8+git freeradius-utils=3.2.8+git freeradius=3.2.8+git echo "Stopping service..." service freeradius stop diff --git a/local-bionic.list b/local-bionic.list deleted file mode 100644 index a2f8da0..0000000 --- a/local-bionic.list +++ /dev/null @@ -1,49 +0,0 @@ -# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to -# newer versions of the distribution. -deb http://mirror.yandex.ru/ubuntu/ bionic main restricted -# deb-src http://mirror.yandex.ru/ubuntu/ bionic main restricted - -## Major bug fix updates produced after the final release of the -## distribution. -deb http://mirror.yandex.ru/ubuntu/ bionic-updates main restricted -# deb-src http://mirror.yandex.ru/ubuntu/ bionic-updates main restricted - -## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu -## team. Also, please note that software in universe WILL NOT receive any -## review or updates from the Ubuntu security team. -deb http://mirror.yandex.ru/ubuntu/ bionic universe -# deb-src http://mirror.yandex.ru/ubuntu/ bionic universe -deb http://mirror.yandex.ru/ubuntu/ bionic-updates universe -# deb-src http://mirror.yandex.ru/ubuntu/ bionic-updates universe - -## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu -## team, and may not be under a free licence. Please satisfy yourself as to -## your rights to use the software. Also, please note that software in -## multiverse WILL NOT receive any review or updates from the Ubuntu -## security team. -deb http://mirror.yandex.ru/ubuntu/ bionic multiverse -# deb-src http://mirror.yandex.ru/ubuntu/ bionic multiverse -deb http://mirror.yandex.ru/ubuntu/ bionic-updates multiverse -# deb-src http://mirror.yandex.ru/ubuntu/ bionic-updates multiverse - -## N.B. software from this repository may not have been tested as -## extensively as that contained in the main release, although it includes -## newer versions of some applications which may provide useful features. -## Also, please note that software in backports WILL NOT receive any review -## or updates from the Ubuntu security team. -deb http://mirror.yandex.ru/ubuntu/ bionic-backports main restricted universe multiverse -# deb-src http://mirror.yandex.ru/ubuntu/ bionic-backports main restricted universe multiverse - -## Uncomment the following two lines to add software from Canonical's -## 'partner' repository. -## This software is not part of Ubuntu, but is offered by Canonical and the -## respective vendors as a service to Ubuntu users. -# deb http://archive.canonical.com/ubuntu bionic partner -# deb-src http://archive.canonical.com/ubuntu bionic partner - -deb http://security.ubuntu.com/ubuntu/ bionic-security main restricted -# deb-src http://security.ubuntu.com/ubuntu/ bionic-security main restricted -deb http://security.ubuntu.com/ubuntu/ bionic-security universe -# deb-src http://security.ubuntu.com/ubuntu/ bionic-security universe -deb http://security.ubuntu.com/ubuntu/ bionic-security multiverse -# deb-src http://security.ubuntu.com/ubuntu/ bionic-security multiverse diff --git a/local-noble.list b/local-noble.list new file mode 100644 index 0000000..da16c1a --- /dev/null +++ b/local-noble.list @@ -0,0 +1,13 @@ +Types: deb +URIs: http://ru.archive.ubuntu.com/ubuntu/ +Suites: noble noble-updates noble-backports +Components: main universe restricted multiverse +Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg + +## Ubuntu security updates. Aside from URIs and Suites, +## this should mirror your choices in the previous section. +Types: deb +URIs: http://ru.archive.ubuntu.com/ubuntu/ +Suites: noble-security +Components: main universe restricted multiverse +Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg \ No newline at end of file