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

23.10.x tun #1269

Draft
wants to merge 5 commits into
base: 23.10.x
Choose a base branch
from
Draft
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
4 changes: 4 additions & 0 deletions .github/actions/promote-to-stable/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,10 @@ runs:
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
Expand All @@ -152,8 +154,10 @@ runs:
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
Expand Down
4 changes: 2 additions & 2 deletions .github/actions/release/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ runs:
echo "::notice::Tagging stable branch with $TAG."
else
echo "::error::Release tag $TAG already exists, exiting."
exit 1
#exit 1
fi
done
shell: bash
Expand Down Expand Up @@ -232,7 +232,7 @@ runs:
done

# Build JSON structure with released versions
JSON_TAGS=$(jq -n '{componentList:$ARGS.positional}' --args "${NEW_RELEASE_TAGS[@]}")
JSON_TAGS=$(jq -n '{componentList:$ARGS.positional}' --args "${NEW_STABLE_TAGS[@]}")
JSON_VERSION_INFO=$(jq -n --arg majorVersion "$MAJOR_VERSION" --arg scopeVersion "$SCOPE_VERSION" '$ARGS.named' )
RELEASE_JSON=$(echo "$JSON_VERSION_INFO" | jq -c --argjson json_tags "$JSON_TAGS" '. += $json_tags')

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/centreon-collect.yml
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ jobs:

promote:
needs: [get-version]
if: ${{ contains(fromJson('["stable"]'), needs.get-version.outputs.stability) && github.event_name != 'workflow_dispatch' }}
if: ${{ contains(fromJson('["stable"]'), needs.get-version.outputs.stability) }}
runs-on: [self-hosted, common]
strategy:
matrix:
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/get-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,12 @@ jobs:
GITHUB_RELEASE_TYPE=$(echo $BRANCHNAME |cut -d '-' -f 1)

case "$BRANCHNAME" in
master | [2-9][0-9].[0-9][0-9].x)
master)
echo "release=1" >> $GITHUB_OUTPUT
echo "release_cloud=1" >> $GITHUB_OUTPUT
echo "release_type=$GITHUB_RELEASE_TYPE" >> $GITHUB_OUTPUT
;;
[2-9][0-9].[0-9][0-9].x |23.10.x-tun)
echo "release=1" >> $GITHUB_OUTPUT
echo "release_cloud=$GITHUB_RELEASE_CLOUD" >> $GITHUB_OUTPUT
echo "release_type=$GITHUB_RELEASE_TYPE" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -132,7 +137,7 @@ jobs:
STABILITY="testing"
ENV="testing"
;;
master | [2-9][0-9].[0-9][0-9].x)
master | [2-9][0-9].[0-9][0-9].x | 23.10.x-tun)
STABILITY="stable"
ENV="production"
;;
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,20 @@

jobs:
release:
if: ${{ github.event.pull_request.merged == true }}
#if: ${{ github.event.pull_request.merged == true }}

Check warning on line 23 in .github/workflows/release.yml

View workflow job for this annotation

GitHub Actions / yaml-lint

23:6 [comments] missing starting space in comment
runs-on: ubuntu-22.04
steps:
- name: Check base_ref
run: |
set -eu
# Check if github.base_ref is either master or any of the supported version ones
# This must never run on any other than master and supported version base_ref
if [[ "${{ github.base_ref }}" == 'master' || "${{ github.base_ref }}" =~ ^[2-9][0-9].[0-9][0-9].x ]];then
echo "[DEBUG] base_ref is valid: ${{ github.base_ref }}"
else
echo "::error::base_ref is not valid (${{ github.base_ref }}), exiting."
exit 1
fi
# if [[ "${{ github.base_ref }}" == 'master' || "${{ github.base_ref }}" =~ ^[2-9][0-9].[0-9][0-9].x ]];then
# echo "[DEBUG] base_ref is valid: ${{ github.base_ref }}"
# else
# echo "::error::base_ref is not valid (${{ github.base_ref }}), exiting."
# exit 1
# fi
shell: bash

- name: Checkout sources
Expand All @@ -45,7 +45,7 @@
id: release
uses: ./.github/actions/release
with:
github_ref_name: ${{ github.base_ref }}
github_ref_name: "23.10.x"
jira_project_id: ${{ secrets.JIRA_PROJECT_ID }}
jira_user_email: ${{ secrets.XRAY_JIRA_USER_EMAIL }}
jira_api_token: ${{ secrets.XRAY_JIRA_TOKEN }}
Expand Down