Skip to content

Commit

Permalink
Rename Release workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
videlov committed Dec 9, 2024
1 parent 142c2a6 commit 23e3360
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pull-add-bot-prs-to-project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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:
Expand All @@ -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 }}
Expand All @@ -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:
Expand All @@ -136,7 +136,7 @@ jobs:
payload: |
{
"repository": "${{ github.repository }}",
"release": "${{ inputs.name }}"
"release": "${{ inputs.version }}"
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_RELEASE_WEBHOOK }}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: PR-release Integration Gardener
name: "Release: PR Integration Gardener"

on:
workflow_call:
Expand Down
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release Pull Request pipeline
name: "Release: PR"
on:
pull_request_target:
types: [ synchronize, opened, reopened, ready_for_review ]
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 23e3360

Please sign in to comment.