From eac202011ceb52c137cdf304f7af3ee8c310528e Mon Sep 17 00:00:00 2001 From: tuntoja Date: Mon, 8 Apr 2024 17:22:16 +0200 Subject: [PATCH] force release and promote --- .github/actions/release/action.yml | 2 +- .github/workflows/centreon-collect.yml | 2 +- .github/workflows/get-version.yml | 9 +++++++-- .github/workflows/release.yml | 16 ++++++++-------- 4 files changed, 17 insertions(+), 12 deletions(-) diff --git a/.github/actions/release/action.yml b/.github/actions/release/action.yml index 7b3f8cb2f0b..21be06250cd 100644 --- a/.github/actions/release/action.yml +++ b/.github/actions/release/action.yml @@ -237,7 +237,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') diff --git a/.github/workflows/centreon-collect.yml b/.github/workflows/centreon-collect.yml index bf2009f5ac2..60cc7d19e34 100644 --- a/.github/workflows/centreon-collect.yml +++ b/.github/workflows/centreon-collect.yml @@ -163,7 +163,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: diff --git a/.github/workflows/get-version.yml b/.github/workflows/get-version.yml index bf783a2923e..e21ddf03bf9 100644 --- a/.github/workflows/get-version.yml +++ b/.github/workflows/get-version.yml @@ -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.04.x-tun) echo "release=1" >> $GITHUB_OUTPUT echo "release_cloud=$GITHUB_RELEASE_CLOUD" >> $GITHUB_OUTPUT echo "release_type=$GITHUB_RELEASE_TYPE" >> $GITHUB_OUTPUT @@ -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.04.x-tun) STABILITY="stable" ENV="production" ;; diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e20fa63d9d6..ecc4d949a41 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,7 +20,7 @@ on: jobs: release: - if: ${{ github.event.pull_request.merged == true }} + #if: ${{ github.event.pull_request.merged == true }} runs-on: ubuntu-22.04 steps: - name: Check base_ref @@ -28,12 +28,12 @@ jobs: 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 @@ -45,7 +45,7 @@ jobs: 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 }}