From 23e33602acc5ea9a096ae31ab531175bdfac4570 Mon Sep 17 00:00:00 2001 From: Vladimir Videlov Date: Mon, 9 Dec 2024 09:33:10 +0100 Subject: [PATCH] Rename Release workflows --- .../pull-add-bot-prs-to-project.yaml | 2 +- ...e.yaml => release-create-new-release.yaml} | 36 +++++++++---------- ...l => release-pr-integration-gardener.yaml} | 2 +- ...lease.yaml => release-pr-integration.yaml} | 2 +- ...l-request-release.yaml => release-pr.yaml} | 6 ++-- 5 files changed, 24 insertions(+), 24 deletions(-) rename .github/workflows/{create-release.yaml => release-create-new-release.yaml} (79%) rename .github/workflows/{pull-integration-gardener-release.yaml => release-pr-integration-gardener.yaml} (99%) rename .github/workflows/{pull-integration-release.yaml => release-pr-integration.yaml} (98%) rename .github/workflows/{pull-request-release.yaml => release-pr.yaml} (93%) diff --git a/.github/workflows/pull-add-bot-prs-to-project.yaml b/.github/workflows/pull-add-bot-prs-to-project.yaml index f62eb16db..f729f5b53 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/create-release.yaml b/.github/workflows/release-create-new-release.yaml similarity index 79% rename from .github/workflows/create-release.yaml rename to .github/workflows/release-create-new-release.yaml index 43ed039f9..1aa63ce7e 100644 --- a/.github/workflows/create-release.yaml +++ b/.github/workflows/release-create-new-release.yaml @@ -1,10 +1,10 @@ -name: "Create release" +name: "Release: Create new 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: @@ -136,7 +136,7 @@ jobs: payload: | { "repository": "${{ github.repository }}", - "release": "${{ inputs.name }}" + "release": "${{ inputs.version }}" } env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_RELEASE_WEBHOOK }} \ No newline at end of file diff --git a/.github/workflows/pull-integration-gardener-release.yaml b/.github/workflows/release-pr-integration-gardener.yaml similarity index 99% rename from .github/workflows/pull-integration-gardener-release.yaml rename to .github/workflows/release-pr-integration-gardener.yaml index 9892a5fa8..e3dc93912 100644 --- a/.github/workflows/pull-integration-gardener-release.yaml +++ b/.github/workflows/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/release-pr-integration.yaml similarity index 98% rename from .github/workflows/pull-integration-release.yaml rename to .github/workflows/release-pr-integration.yaml index 424b0c3bc..9e4ac5dde 100644 --- a/.github/workflows/pull-integration-release.yaml +++ b/.github/workflows/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/pull-request-release.yaml b/.github/workflows/release-pr.yaml similarity index 93% rename from .github/workflows/pull-request-release.yaml rename to .github/workflows/release-pr.yaml index e63c8bdcc..bbd80082a 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,14 +43,14 @@ jobs: integration-tests: name: Dispatch integration tests needs: [upload-image] - uses: ./.github/workflows/pull-integration-release.yaml + uses: ./.github/workflows/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/release-pr-integration-gardener.yaml if: github.event.pull_request.draft == false secrets: inherit