diff --git a/.github/actions/slack-notification-failed-workflow/action.yaml b/.github/actions/slack-notification-failed-workflow/action.yaml index 7a88832ec4..da2c2b5d11 100644 --- a/.github/actions/slack-notification-failed-workflow/action.yaml +++ b/.github/actions/slack-notification-failed-workflow/action.yaml @@ -12,10 +12,9 @@ runs: - name: Notify uses: slackapi/slack-github-action@e28cf165c92ffef168d23c5c9000cffc8a25e117 # v1.24.0 with: + webhook: ${{ secrets.SLACK_WEBHOOK_URL }} + webhook-type: webhook-trigger + payload-templated: true payload: | - { - "repository": "${{ github.repository }}", - "workflow": "${{ github.workflow }}" - } - env: - SLACK_WEBHOOK_URL: ${{ inputs.SLACK_WEBHOOK_URL }} + repository: ${{ github.repository }}, + workflow: ${{ github.workflow }} \ No newline at end of file diff --git a/.github/workflows/pull-integration-gardener-release.yaml b/.github/workflows/call-release-pr-integration-gardener.yaml similarity index 99% rename from .github/workflows/pull-integration-gardener-release.yaml rename to .github/workflows/call-release-pr-integration-gardener.yaml index 9892a5fa83..618304bde3 100644 --- a/.github/workflows/pull-integration-gardener-release.yaml +++ b/.github/workflows/call-release-pr-integration-gardener.yaml @@ -1,4 +1,4 @@ -name: PR-release Integration Gardener +name: "Release PR Integration Gardener" on: workflow_call: diff --git a/.github/workflows/pull-integration-release.yaml b/.github/workflows/call-release-pr-integration.yaml similarity index 98% rename from .github/workflows/pull-integration-release.yaml rename to .github/workflows/call-release-pr-integration.yaml index 424b0c3bca..dff5fccba4 100644 --- a/.github/workflows/pull-integration-release.yaml +++ b/.github/workflows/call-release-pr-integration.yaml @@ -1,7 +1,7 @@ # This workflow is responsible for all kinds of integration tests run on pull request. # Those tests depend on a container image so in the first job we wait for the image build to succeed. -name: Release Pull Request integration tests +name: "Release PR Integration" on: workflow_call: diff --git a/.github/workflows/ui-tests.yaml b/.github/workflows/call-ui-tests.yaml similarity index 95% rename from .github/workflows/ui-tests.yaml rename to .github/workflows/call-ui-tests.yaml index 9c9d2a04e6..13fde03b56 100644 --- a/.github/workflows/ui-tests.yaml +++ b/.github/workflows/call-ui-tests.yaml @@ -18,7 +18,7 @@ jobs: config/ui-extensions/** config/crd/** tests/ui/** - .github/workflows/ui-tests.yaml + .github/workflows/call-ui-tests.yaml - uses: ./.github/actions/load-manager-image - uses: actions/setup-go@v5 with: diff --git a/.github/workflows/verify-commit-pins.yaml b/.github/workflows/call-verify-commit-pins.yaml similarity index 100% rename from .github/workflows/verify-commit-pins.yaml rename to .github/workflows/call-verify-commit-pins.yaml diff --git a/.github/workflows/pull-add-bot-prs-to-project.yaml b/.github/workflows/pull-add-bot-prs-to-project.yaml index f62eb16db3..f729f5b530 100644 --- a/.github/workflows/pull-add-bot-prs-to-project.yaml +++ b/.github/workflows/pull-add-bot-prs-to-project.yaml @@ -40,7 +40,7 @@ jobs: } } }' -f org=$ORGANIZATION -F number=$PROJECT_NUMBER > project_data.json - + echo 'PROJECT_ID='$(jq '.data.organization.projectV2.id' project_data.json) >> $GITHUB_ENV echo 'READY_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "Ready") | .id' project_data.json) >> $GITHUB_ENV diff --git a/.github/workflows/pull-request.yaml b/.github/workflows/pull-request.yaml index 77ef4d818f..2935f3a128 100644 --- a/.github/workflows/pull-request.yaml +++ b/.github/workflows/pull-request.yaml @@ -48,13 +48,13 @@ jobs: ui-tests: name: Dispatch UI tests needs: [build-image] - uses: ./.github/workflows/ui-tests.yaml + uses: ./.github/workflows/call-ui-tests.yaml if: github.event.pull_request.draft == false secrets: inherit verify-pins: name: Dispatch verify-commit-pins - uses: ./.github/workflows/verify-commit-pins.yaml + uses: ./.github/workflows/call-verify-commit-pins.yaml if: github.event.pull_request.draft == false secrets: inherit diff --git a/.github/workflows/create-release.yaml b/.github/workflows/release-create-release.yaml similarity index 73% rename from .github/workflows/create-release.yaml rename to .github/workflows/release-create-release.yaml index 43ed039f91..9976de629f 100644 --- a/.github/workflows/create-release.yaml +++ b/.github/workflows/release-create-release.yaml @@ -1,10 +1,10 @@ -name: "Create release" +name: "Create Release" on: workflow_dispatch: inputs: - name: - description: "Create release" + version: + description: "Version" default: "" required: true since: @@ -32,10 +32,10 @@ jobs: - name: Check security-scanner config shell: bash run: | - if [[ $( yq eval ".protecode[0]" sec-scanners-config.yaml ) == "europe-docker.pkg.dev/kyma-project/prod/istio/releases/istio-manager:${{ github.event.inputs.name }}" ]]; then + if [[ $( yq eval ".protecode[0]" sec-scanners-config.yaml ) == "europe-docker.pkg.dev/kyma-project/prod/istio/releases/istio-manager:${{ github.event.inputs.version }}" ]]; then exit 0 else - echo "Error: istio-manager image tag in sec-scanners-config doesn't match release ${{ github.event.inputs.name }}" + echo "Error: istio-manager image tag in sec-scanners-config doesn't match release ${{ github.event.inputs.version }}" exit 1 fi @@ -47,8 +47,8 @@ jobs: dockerfile: Dockerfile context: . build-args: | - VERSION=${{ github.event.inputs.name }} - tags: "${{ github.event.inputs.name }}" + VERSION=${{ github.event.inputs.version }} + tags: "${{ github.event.inputs.version }}" build-image-experimental: uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main @@ -58,9 +58,9 @@ jobs: dockerfile: Dockerfile context: . build-args: | - VERSION=${{ github.event.inputs.name }}-experimental + VERSION=${{ github.event.inputs.version }}-experimental GO_BUILD_TAGS=experimental - tags: "${{ github.event.inputs.name }}-experimental" + tags: "${{ github.event.inputs.version }}-experimental" unit-tests: uses: ./.github/workflows/call-unit-lint.yaml @@ -69,7 +69,7 @@ jobs: needs: [build-image, build-image-experimental, unit-tests] uses: ./.github/workflows/call-integration-tests.yaml with: - image: "europe-docker.pkg.dev/kyma-project/prod/istio/releases/istio-manager:${{ github.event.inputs.name }}" + image: "europe-docker.pkg.dev/kyma-project/prod/istio/releases/istio-manager:${{ github.event.inputs.version }}" secrets: inherit create-draft: @@ -85,22 +85,22 @@ jobs: - name: Create changelog env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: ./scripts/create_changelog.sh ${{ github.event.inputs.name }} ${{ github.event.inputs.since }} + run: ./scripts/create_changelog.sh ${{ github.event.inputs.version }} ${{ github.event.inputs.since }} - name: Create draft release id: create-draft env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - RELEASE_ID=$(./scripts/create_draft_release.sh ${{ github.event.inputs.name }}) + RELEASE_ID=$(./scripts/create_draft_release.sh ${{ github.event.inputs.version }}) echo "release_id=$RELEASE_ID" >> $GITHUB_OUTPUT - name: Create lightweight tag run: | - git tag ${{ github.event.inputs.name }} - git push origin ${{ github.event.inputs.name }} - git tag ${{ github.event.inputs.name }}-experimental - git push origin ${{ github.event.inputs.name }}-experimental + git tag ${{ github.event.inputs.version }} + git push origin ${{ github.event.inputs.version }} + git tag ${{ github.event.inputs.version }}-experimental + git push origin ${{ github.event.inputs.version }}-experimental outputs: release_id: ${{ steps.create-draft.outputs.release_id }} @@ -118,7 +118,7 @@ jobs: - name: Publish release assets env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: ./scripts/publish_assets.sh ${{ github.event.inputs.name }} ${{ needs.create-draft.outputs.release_id }} + run: ./scripts/publish_assets.sh ${{ github.event.inputs.version }} ${{ needs.create-draft.outputs.release_id }} - name: Publish release env: @@ -131,12 +131,11 @@ jobs: if: success() steps: - name: Notify - uses: slackapi/slack-github-action@e28cf165c92ffef168d23c5c9000cffc8a25e117 # v1.24.0 + uses: slackapi/slack-github-action@485a9d42d3a73031f12ec201c457e2162c45d02d # v2.0.0 with: + webhook: ${{ secrets.SLACK_RELEASE_WEBHOOK }} + webhook-type: webhook-trigger + payload-templated: true payload: | - { - "repository": "${{ github.repository }}", - "release": "${{ inputs.name }}" - } - env: - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_RELEASE_WEBHOOK }} \ No newline at end of file + repository: ${{ github.repository }}, + release: ${{ inputs.version }} diff --git a/.github/workflows/pull-request-release.yaml b/.github/workflows/release-pr.yaml similarity index 89% rename from .github/workflows/pull-request-release.yaml rename to .github/workflows/release-pr.yaml index e63c8bdccc..213e311397 100644 --- a/.github/workflows/pull-request-release.yaml +++ b/.github/workflows/release-pr.yaml @@ -1,4 +1,4 @@ -name: Release Pull Request pipeline +name: "Release PR" on: pull_request_target: types: [ synchronize, opened, reopened, ready_for_review ] @@ -43,27 +43,27 @@ jobs: integration-tests: name: Dispatch integration tests needs: [upload-image] - uses: ./.github/workflows/pull-integration-release.yaml + uses: ./.github/workflows/call-release-pr-integration.yaml if: github.event.pull_request.draft == false secrets: inherit integration-tests-gardener: name: Dispatch Gardener integration tests needs: [upload-image] - uses: ./.github/workflows/pull-integration-gardener-release.yaml + uses: ./.github/workflows/call-release-pr-integration-gardener.yaml if: github.event.pull_request.draft == false secrets: inherit ui-tests: name: Dispatch UI tests needs: [upload-image] - uses: ./.github/workflows/ui-tests.yaml + uses: ./.github/workflows/call-ui-tests.yaml if: github.event.pull_request.draft == false secrets: inherit verify-pins: name: Dispatch verify-commit-pins - uses: ./.github/workflows/verify-commit-pins.yaml + uses: ./.github/workflows/call-verify-commit-pins.yaml if: github.event.pull_request.draft == false secrets: inherit diff --git a/.github/workflows/rollout-module.yaml b/.github/workflows/release-rollout-module.yaml similarity index 98% rename from .github/workflows/rollout-module.yaml rename to .github/workflows/release-rollout-module.yaml index ee91a12e68..210a44c767 100644 --- a/.github/workflows/rollout-module.yaml +++ b/.github/workflows/release-rollout-module.yaml @@ -1,5 +1,5 @@ -name: Rollout to channel via module-manifests +name: Release rollout to channel via module-manifests # Workflow requires the following variables to be defined # GIT_USER_NAME - user creating head branch and PR # GIT_USER_EMAIL - this user email @@ -73,13 +73,13 @@ jobs: shell: bash run: | tags=$(curl -s -H "Accept: application/vnd.github+json" ${ISTIO_API_URL}/tags | jq -r '.[] | .name') - + if echo $tags | tr " " '\n' | grep -F -q -x ${{ inputs.releaseTag }}; then echo "TAG=${{ inputs.releaseTag }}" >> $GITHUB_ENV echo "tag found" else echo "tag not found: ${{ inputs.releaseTag }}" - exit 1 + exit 1 fi - name: Set branch name shell: bash @@ -130,7 +130,7 @@ jobs: MODULE_VERSION="${TAG}" FILE_NAME="${MANIFEST_FILENAME}" fi - + cat <