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

enh(ci): manage apt internal repository #2038

Merged
merged 2 commits into from
Jan 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 3 additions & 2 deletions .github/actions/deb-delivery/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,9 @@ runs:
exit 1
fi

# Handle either standard debian or ubuntu repository path
if [[ "${{ inputs.distrib }}" == "jammy" ]]; then
if [[ "${{ inputs.is_cloud }}" == "true" ]]; then
ROOT_REPO_PATH="apt-standard-internal-${{ inputs.stability }}"
elif [[ "${{ inputs.distrib }}" == "jammy" ]]; then
ROOT_REPO_PATH="ubuntu-standard-${{ inputs.version }}-${{ inputs.stability }}"
else
ROOT_REPO_PATH="apt-standard-${{ inputs.version }}-${{ inputs.stability }}"
Expand Down
4 changes: 3 additions & 1 deletion .github/actions/delivery/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,9 @@ runs:

echo "[DEBUG] - Major version: $VERSION"

if [[ "${{ inputs.distrib }}" == "jammy" ]]; then
if [[ "${{ inputs.is_cloud }}" == "true" ]]; then
ROOT_REPO_PATH="apt-standard-internal-${{ inputs.stability }}"
elif [[ "${{ inputs.distrib }}" == "jammy" ]]; then
ROOT_REPO_PATH="ubuntu-standard-${{ inputs.major_version }}-${{ inputs.stability }}"
else
ROOT_REPO_PATH="apt-standard-${{ inputs.major_version }}-${{ inputs.stability }}"
Expand Down
15 changes: 11 additions & 4 deletions .github/docker/Dockerfile.gorgone-testing-bookworm
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
FROM debian:bookworm

ARG VERSION
ARG IS_CLOUD

ENV DEBIAN_FRONTEND=noninteractive

RUN bash -e <<EOF
RUN --mount=type=secret,id=ARTIFACTORY_INTERNAL_REPO_USERNAME \
--mount=type=secret,id=ARTIFACTORY_INTERNAL_REPO_PASSWORD \
bash -e <<EOF

apt-get update

Expand All @@ -25,9 +28,13 @@ VERSION_CODENAME=\$(
echo \$VERSION_CODENAME
)

echo "deb https://packages.centreon.com/apt-standard-${VERSION}-stable/ \$VERSION_CODENAME main" | tee -a /etc/apt/sources.list.d/centreon-stable.list
echo "deb https://packages.centreon.com/apt-standard-${VERSION}-testing/ \$VERSION_CODENAME main" | tee -a /etc/apt/sources.list.d/centreon-testing.list
echo "deb https://packages.centreon.com/apt-standard-${VERSION}-unstable/ \$VERSION_CODENAME main" | tee -a /etc/apt/sources.list.d/centreon-unstable.list
if [[ "${IS_CLOUD}" == "true" ]]; then
echo "deb https://$(cat /run/secrets/ARTIFACTORY_INTERNAL_REPO_USERNAME):$(cat /run/secrets/ARTIFACTORY_INTERNAL_REPO_PASSWORD)@packages.centreon.com/apt-standard-internal-unstable/ \$VERSION_CODENAME main" | tee -a /etc/apt/sources.list.d/centreon-unstable.list
else
echo "deb https://packages.centreon.com/apt-standard-${VERSION}-stable/ \$VERSION_CODENAME main" | tee -a /etc/apt/sources.list.d/centreon-stable.list
echo "deb https://packages.centreon.com/apt-standard-${VERSION}-testing/ \$VERSION_CODENAME main" | tee -a /etc/apt/sources.list.d/centreon-testing.list
echo "deb https://packages.centreon.com/apt-standard-${VERSION}-unstable/ \$VERSION_CODENAME main" | tee -a /etc/apt/sources.list.d/centreon-unstable.list
fi
echo "deb https://packages.centreon.com/apt-plugins-stable/ \$VERSION_CODENAME main" | tee -a /etc/apt/sources.list.d/centreon-plugins-stable.list
echo "deb https://packages.centreon.com/apt-plugins-testing/ \$VERSION_CODENAME main" | tee -a /etc/apt/sources.list.d/centreon-plugins-testing.list
echo "deb https://packages.centreon.com/apt-plugins-unstable/ \$VERSION_CODENAME main" | tee -a /etc/apt/sources.list.d/centreon-plugins-unstable.list
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/centreon-collect.yml
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,8 @@ jobs:
! cancelled() &&
! contains(needs.*.result, 'failure') &&
! contains(needs.*.result, 'cancelled') &&
github.repository == 'centreon/centreon-collect'
github.repository == 'centreon/centreon-collect' &&
(needs.get-environment.outputs.is_cloud == 'false' || needs.get-environment.outputs.stability == 'unstable')

needs: [get-environment, robot-test]
runs-on: [self-hosted, common]
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/centreon-common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ jobs:
contains(fromJson('["unstable", "testing"]'), needs.get-environment.outputs.stability) &&
! cancelled() &&
! contains(needs.*.result, 'failure') &&
! contains(needs.*.result, 'cancelled')
! contains(needs.*.result, 'cancelled') &&
(needs.get-environment.outputs.is_cloud == 'false' || needs.get-environment.outputs.stability == 'unstable')

strategy:
matrix:
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/gorgone-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ on:
paths:
- ".version"
- ".version.centreon-gorgone"
- ".github/workflows/gorgone.yml"
- "gorgone/**"
- "perl-libs/**"
- "!gorgone/tests/**"
Expand All @@ -36,7 +35,6 @@ on:
paths:
- ".version"
- ".version.centreon-gorgone"
- ".github/workflows/gorgone.yml"
- "gorgone/**"
- "perl-libs/**"
- "!gorgone/tests/**"
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/gorgone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ on:
paths:
- ".version"
- ".version.centreon-gorgone"
- ".github/workflows/gorgone.yml"
- "gorgone/**"
- "perl-libs/**"
- "!gorgone/tests/**"
Expand All @@ -31,7 +30,6 @@ on:
paths:
- ".version"
- ".version.centreon-gorgone"
- ".github/workflows/gorgone.yml"
- "gorgone/**"
- "perl-libs/**"
- "!gorgone/tests/**"
Expand Down Expand Up @@ -377,7 +375,8 @@ jobs:
contains(fromJson('["unstable", "testing"]'), needs.get-environment.outputs.stability) &&
! cancelled() &&
! contains(needs.*.result, 'failure') &&
! contains(needs.*.result, 'cancelled')
! contains(needs.*.result, 'cancelled') &&
(needs.get-environment.outputs.is_cloud == 'false' || needs.get-environment.outputs.stability == 'unstable')

strategy:
matrix:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/libzmq.yml
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,8 @@ jobs:
contains(fromJson('["unstable", "testing"]'), needs.get-environment.outputs.stability) &&
! cancelled() &&
! contains(needs.*.result, 'failure') &&
! contains(needs.*.result, 'cancelled')
! contains(needs.*.result, 'cancelled') &&
(needs.get-environment.outputs.is_cloud == 'false' || needs.get-environment.outputs.stability == 'unstable')
runs-on: [self-hosted, common]
strategy:
matrix:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/lua-curl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,8 @@ jobs:
contains(fromJson('["unstable", "testing"]'), needs.get-environment.outputs.stability) &&
! cancelled() &&
! contains(needs.*.result, 'failure') &&
! contains(needs.*.result, 'cancelled')
! contains(needs.*.result, 'cancelled') &&
(needs.get-environment.outputs.is_cloud == 'false' || needs.get-environment.outputs.stability == 'unstable')
needs: [get-environment, package]
runs-on: ubuntu-24.04
strategy:
Expand Down