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

MON-69155 Centreon next 24.05 (Jira release #19846#) #1325

Merged
merged 44 commits into from
Jun 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
f2645fe
fix(ci): replace job conditional by dedicated step (#1169)
tuntoja Mar 4, 2024
f9f2195
fix(tests): Centreon keywords prefixed with Ctn
bouda1 Mar 6, 2024
055f3c4
fix(ci): handle concurrent hotfix and release (#1191)
tuntoja Mar 7, 2024
38c65f6
fix(delivery): fix missing inputs for rpm split delivery (#1195)
tuntoja Mar 8, 2024
26d01bb
fix(delivery): use root_repo_paths instead of fixed values (#1196)
tuntoja Mar 8, 2024
f10611f
add pb_instance_configuration (#1198)
jean-christophe81 Mar 12, 2024
cb7d8af
restore bbdo v2 instance_configuration and (pb_)instance_configuratio…
jean-christophe81 Mar 15, 2024
303887d
enh(bam): sometimes kpi creation may break BA's consistency
bouda1 Mar 18, 2024
e53646f
fix(ci): fix release workflow and action issues (#1214)
tuntoja Mar 22, 2024
613aee0
Mon 33778 sql errors if desactivated ba with timeperiods are configu…
jean-christophe81 Mar 26, 2024
868b2f8
fix(broker): multiplexing/engine needs to check weak_ptr<muxer> befor…
jean-christophe81 Mar 26, 2024
3310b19
fix: use perl-base for debian and perl-interpreter for alma (#1219)
a-eljazouly Mar 26, 2024
09fa470
fix(ci): remove extra dir level from testing delivery (#1232)
tuntoja Mar 29, 2024
fad99a4
enh(tests): First attempt to link robot tests with xRay tests to disp…
sfarouq-ext Mar 29, 2024
f33745e
enh(tests): little cleanup in tests
bouda1 Mar 29, 2024
9cee35d
fix(ci): fix release pipelines issues (#1250)
tuntoja Apr 2, 2024
3b841b8
fix(ci): remove PR_NUMBER from get-version (#1257) (#1259)
tuntoja Apr 2, 2024
1649951
updated file rights in centreon-broker & centreon-engine (#1267)
mushroomempires Apr 8, 2024
2fcfacd
fix(packaging): add symbolic link from /usr/lib64/nagios/plugins to /…
mushroomempires Apr 8, 2024
00e3bda
Merge branch 'master' into MON-37061-sync-release-collect
tuntoja Apr 9, 2024
7780bfc
Update .github/actions/release/action.yml
tuntoja Apr 9, 2024
c8a1b1a
MON-37061 Sync Centreon COLLECT next 24.04 (Jira release #37061#) (#1…
tuntoja Apr 9, 2024
a916f56
fix permission rights on systemd files packaged on centreon (#1280)
mushroomempires Apr 16, 2024
7123790
enh(ci): deliver develop packages to cloud internal repositories (#1279)
tuntoja Apr 17, 2024
1da1ab1
chore(release): prepare 24.05.0 (#1278)
tuntoja Apr 17, 2024
3741a70
fix(permissions): fix permissions on centengine log files (#1282)
mushroomempires Apr 19, 2024
18e6b8e
Revert "updated file rights in centreon-broker & centreon-engine (#12…
tuntoja Apr 19, 2024
b3fa0e7
enh(promote): handle debian package promotion for multiple distributi…
tuntoja Apr 22, 2024
e169d84
fix(broker/bam): multi-insert issue that occurs when run_query thows …
jean-christophe81 Apr 23, 2024
34feab0
enh(ci): add debian12 arm builds and tests triggers (#1281)
tuntoja Apr 23, 2024
a39e9d3
Mon 24745 the lua cache does not update fields on service_status/host…
sfarouq-ext Apr 23, 2024
393ddf3
fix(ci): minor fixes to release pipelines 042024 (#1290)
tuntoja Apr 24, 2024
8adcab3
switch around source and destination in nagios plugins symlink (#1297)
mushroomempires Apr 24, 2024
fdc339f
fix(broker/grpc): Stream rewritten, it works better and is far simple…
jean-christophe81 Apr 29, 2024
0a07e3b
chore(ci): override veracode 3rd party ignore (#1315)
sc979 May 2, 2024
577c843
Mon 21239 new notification test1 (#1314)
sfarouq-ext May 2, 2024
1fa08b6
chore(ci): prevent override file from triggering a build (#1320)
sc979 May 3, 2024
069baaf
Empty-Commit
pkippes May 7, 2024
40fede8
fix(ci): minor fixes to promote and release actions (#1340)
tuntoja May 21, 2024
1c7e826
fix promote action on debian (#1363) (#1364)
mushroomempires May 27, 2024
e007258
fix(ci): add missing semicolons in debian promote action (#1371) (#1372)
mushroomempires May 28, 2024
5b7f954
fix(release): fix release action divergence (#1423)
tuntoja Jun 12, 2024
71f52ce
fix(release): add release_id to data sent to JIRA release (#1450) (#1…
tuntoja Jun 19, 2024
bd9613b
fix(release): fix checkout depth in release action (#1459)
tuntoja Jun 20, 2024
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
3 changes: 2 additions & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ Please include a short resume of the changes and what is the purpose of PR. Any
- [ ] 22.10.x
- [ ] 23.04.x
- [ ] 23.10.x
- [ ] 24.04.x (master)
- [ ] 24.04.x
- [ ] master

<h2> How this pull request can be tested ? </h2>

Expand Down
71 changes: 42 additions & 29 deletions .github/actions/delivery/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ inputs:
description: "The distribution used for packaging"
required: true
version:
description: "Centreon packaged version"
description: "Centreon packaged major version"
required: true
cache_key:
description: "The cached package key"
Expand Down Expand Up @@ -59,25 +59,19 @@ runs:

FILES="*.${{ env.extfile }}"

echo "[DEBUG] - Version: ${{ inputs.version }}"
echo "[DEBUG] - Distrib: ${{ inputs.distrib }}"

if [ -z "${{ inputs.module_name }}" ]; then
echo "module name is required"
exit 1
fi

if [ -z "${{ inputs.distrib }}" ]; then
echo "distrib is required"
exit 1
fi

# DEBUG
echo "[DEBUG] - Version: ${{ inputs.version }}"
echo "[DEBUG] - Distrib: ${{ inputs.distrib }}"
echo "[DEBUG] - module_name: ${{ inputs.module_name }}"
echo "[DEBUG] - release_cloud: ${{ inputs.release_cloud }}"
echo "[DEBUG] - release_type: ${{ inputs.release_type }}"
echo "[DEBUG] - stability: ${{ inputs.stability }}"

# Make sure all required inputs are NOT empty
if [[ -z "${{ inputs.module_name }}" || -z "${{ inputs.distrib }}" || -z ${{ inputs.stability }} || -z ${{ inputs.version }} || -z ${{ inputs.release_cloud }} || -z ${{ inputs.release_type }} ]]; then
echo "Some mandatory inputs are empty, please check the logs."
exit 1
fi

# Create ARCH dirs
mkdir noarch x86_64
Expand All @@ -94,18 +88,31 @@ runs:
done

# Build upload target path based on release_cloud and release_type values
# if cloud, deliver to testing-<release_type>
# if non-cloud, delivery to testing as usual
# if cloud + hotfix or cloud + release, deliver to internal testing-<release_type>
# if cloud + develop, delivery to internal unstable
# if non-cloud, delivery to onprem testing or unstable

# CLOUD + HOTFIX + REPO STANDARD INTERNAL OR CLOUD + RELEASE + REPO STANDARD INTERNAL
if [[ ${{ inputs.release_cloud }} -eq 1 && ${{ inputs.release_type }} == "hotfix" ]] || [[ ${{ inputs.release_cloud }} -eq 1 && ${{ inputs.release_type }} == "release" ]]; then
if [[ ${{ inputs.release_cloud }} -eq 1 && ( ${{ inputs.release_type }} == "hotfix" || ${{ inputs.release_type }} == "release" ) ]]; then
echo "[DEBUG] : Release cloud + ${{ inputs.release_type }}, using rpm-standard-internal."
ROOT_REPO_PATHS="rpm-standard-internal"
UPLOAD_REPO_PATH="${{ inputs.version }}/${{ inputs.distrib }}/${{ inputs.stability }}-${{ inputs.release_type }}/$ARCH/RPMS/${{ inputs.module_name }}/"
UPLOAD_REPO_PATH="${{ inputs.version }}/${{ inputs.distrib }}/${{ inputs.stability }}-${{ inputs.release_type }}/$ARCH/${{ inputs.module_name }}/"

# CLOUD + NOT HOTFIX OR CLOUD + NOT RELEASE + REPO STANDARD INTERNAL
elif [[ ${{ inputs.release_cloud }} -eq 1 && ( ${{ inputs.release_type }} != "hotfix" && ${{ inputs.release_type }} != "release" ) ]]; then
echo "[DEBUG] : Release cloud + NOT ${{ inputs.release_type }}, using rpm-standard-internal."
ROOT_REPO_PATHS="rpm-standard-internal"
UPLOAD_REPO_PATH="${{ inputs.version }}/${{ inputs.distrib }}/${{ inputs.stability }}-${{ inputs.release_type }}/$ARCH/${{ inputs.module_name }}/"

# NON-CLOUD + (HOTFIX OR RELEASE) + REPO STANDARD
elif [[ ${{ inputs.release_cloud }} -eq 0 ]]; then
echo "[DEBUG] : NOT Release cloud + ${{ inputs.release_type }}, using rpm-standard."
ROOT_REPO_PATHS="rpm-standard"
UPLOAD_REPO_PATH="${{ inputs.version }}/${{ inputs.distrib }}/${{ inputs.stability }}/$ARCH/${{ inputs.module_name }}/"

# NOT VALID, DO NOT DELIVER
else
echo "Invalid combination of release_type and release_cloud"
echo "::error:: Invalid combination of release_type [${{ inputs.release_type }}] and release_cloud [${{ inputs.release_cloud }}]"
exit 1
fi

Expand All @@ -115,8 +122,10 @@ runs:
if [ "$(ls -A $ARCH)" ]; then
if [ "${{ inputs.stability }}" == "stable" ]; then
echo "[DEBUG] - Stability is ${{ inputs.stability }}, not delivering."
else
elif [ "${{ inputs.stability }}" == "testing" ]; then
jf rt upload "$ARCH/*.rpm" "$ROOT_REPO_PATH/$UPLOAD_REPO_PATH" --sync-deletes="$ROOT_REPO_PATH/$UPLOAD_REPO_PATH" --flat
else
jf rt upload "$ARCH/*.rpm" "$ROOT_REPO_PATH/${{ inputs.version }}/${{ inputs.distrib }}/${{ inputs.stability }}/$ARCH/${{ inputs.module_name }}/" --sync-deletes="$ROOT_REPO_PATH/${{ inputs.version }}/${{ inputs.distrib }}/${{ inputs.stability }}/$ARCH/${{ inputs.module_name }}/" --flat
fi
fi
done
Expand All @@ -128,13 +137,17 @@ runs:
run: |
FILES="*.${{ env.extfile }}"

if [ -z "${{ inputs.module_name }}" ]; then
echo "module name is required"
exit 1
fi
# DEBUG
echo "[DEBUG] - Version: ${{ inputs.version }}"
echo "[DEBUG] - Distrib: ${{ inputs.distrib }}"
echo "[DEBUG] - module_name: ${{ inputs.module_name }}"
echo "[DEBUG] - release_cloud: ${{ inputs.release_cloud }}"
echo "[DEBUG] - release_type: ${{ inputs.release_type }}"
echo "[DEBUG] - stability: ${{ inputs.stability }}"

if [ -z "${{ inputs.distrib }}" ]; then
echo "distrib is required"
# Make sure all required inputs are NOT empty
if [[ -z "${{ inputs.module_name }}" || -z "${{ inputs.distrib }}" || -z ${{ inputs.stability }} || -z ${{ inputs.version }} || -z ${{ inputs.release_cloud }} || -z ${{ inputs.release_type }} ]]; then
echo "Some mandatory inputs are empty, please check the logs."
exit 1
fi

Expand All @@ -148,11 +161,11 @@ runs:
echo "[DEBUG] - Version: $VERSION"

if [[ "${{ inputs.distrib }}" == "jammy" ]]; then
REPO_PREFIX="ubuntu"
ROOT_REPO_PATH="ubuntu-standard-${{ inputs.version }}-${{ inputs.stability }}"
else
REPO_PREFIX="apt"
ROOT_REPO_PATH="apt-standard-${{ inputs.version }}-${{ inputs.stability }}"
fi

jf rt upload "$FILE" "${REPO_PREFIX}-standard-${{ inputs.version }}-${{ inputs.stability }}/pool/${{ inputs.module_name }}/" --deb "${{ inputs.distrib }}/main/$ARCH"
jf rt upload "$FILE" "$ROOT_REPO_PATH/pool/${{ inputs.module_name }}/" --deb "${{ inputs.distrib }}/main/$ARCH"
done
shell: bash
35 changes: 28 additions & 7 deletions .github/actions/promote-to-stable/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ inputs:
stability:
description: "The package stability (stable, testing, unstable)"
required: true
repository_name:
description: "The repository name"
required: true
github_ref_name:
description: "Release base ref name for push event"
required: true
Expand Down Expand Up @@ -54,7 +51,7 @@ runs:

# Cloud specific promote
# delivery by default to onprem, override to internal if base branch is master
if [[ ${{ inputs.github_base_ref }} == "master" ]]; then
if [[ ${{ inputs.github_ref_name }} == "master" ]]; then
ROOT_REPO_PATH="rpm-standard-internal"
else
ROOT_REPO_PATH="rpm-standard"
Expand Down Expand Up @@ -113,12 +110,27 @@ runs:
- name: Promote DEB packages to stable
if: ${{ contains(fromJSON('["bullseye", "bookworm"]'), inputs.distrib) }}
run: |
set -eux

echo "[DEBUG] - Major version: ${{ inputs.major_version }}"
echo "[DEBUG] - Minor version: ${{ inputs.minor_version }}"
echo "[DEBUG] - Distrib: ${{ inputs.distrib }}"

# Define ROOT_REPO_PATH for debian
# There is no cloud ROOT_REPO_PATH for debian, only onprem
# Should there be a need to deploy debian to cloud repositories, please use the same condition as RPM promotion
ROOT_REPO_PATH="apt-standard-${{ inputs.major_version }}"

echo "[DEBUG] - Get path of testing DEB packages to promote to stable."
SRC_PATHS=$(jf rt s --include-dirs apt-standard-${{ inputs.major_version }}-testing/pool/${{ inputs.module_name }}/*.deb | jq -r '.[].path')

case "${{ inputs.major_version }}" in
"22.10"|"23.04"|"23.10")
SRC_PATHS=$(jf rt search --include-dirs $ROOT_REPO_PATH-testing/pool/${{ inputs.module_name }}/*.deb | jq -r '.[].path')
;;
*)
SRC_PATHS=$(jf rt search --include-dirs $ROOT_REPO_PATH-testing/pool/${{ inputs.module_name }}/*${{ inputs.distrib }}*.deb | jq -r '.[].path')
;;
esac

if [[ ${SRC_PATHS[@]} ]]; then
for SRC_PATH in ${SRC_PATHS[@]}; do
Expand All @@ -130,7 +142,7 @@ runs:
fi

echo "[DEBUG] - Build target path."
TARGET_PATH="apt-standard-${{ inputs.major_version }}-${{ inputs.stability }}/pool/${{ inputs.module_name }}/"
TARGET_PATH="$ROOT_REPO_PATH-${{ inputs.stability }}/pool/${{ inputs.module_name }}/"
echo "[DEBUG] - Target path: $TARGET_PATH"

echo "[DEBUG] - Promoting DEB testing artifacts to stable."
Expand All @@ -139,7 +151,16 @@ runs:
jf rt download $ARTIFACT --flat
done

for ARTIFACT_DL in $(dir|grep -E "*.deb"); do
case "${{ inputs.major_version }}" in
"22.10"|"23.04"|"23.10")
ARTIFACT_SEARCH_PATTERN=".+\.deb"
;;
*)
ARTIFACT_SEARCH_PATTERN=".+${{ inputs.distrib }}.+\.deb"
;;
esac

for ARTIFACT_DL in $(dir -1|grep -E $ARTIFACT_SEARCH_PATTERN); do
ARCH=$(echo $ARTIFACT_DL | cut -d '_' -f3 | cut -d '.' -f1)
echo "[DEBUG] - Promoting (upload) $ARTIFACT_DL to stable $TARGET_PATH."
jf rt upload "$ARTIFACT_DL" "$TARGET_PATH" --deb "${{ inputs.distrib }}/main/$ARCH" --flat
Expand Down
Loading
Loading