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

fix: Proper release workflow #727

Merged
Show file tree
Hide file tree
Changes from 34 commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
7c43581
refactor(release): Release workflow now updates docs
ds-pweick Jun 25, 2024
b8a7ac9
refactor(release): made release workflow name more consistent
ds-pweick Jun 25, 2024
42b4a45
Merge pull request #116 from ds-pweick/refactor/release-workflow
ds-pweick Jun 25, 2024
97b58cc
feat(dummy): dummy changes helm changelog
ds-pweick Jun 25, 2024
0aa2da4
fix(release): fixed syntax error in release workflow
ds-pweick Jun 25, 2024
4db3c7e
fix(release): fixed syntax error in release workflow
ds-pweick Jun 25, 2024
880ebcf
fix(release): fixed syntax error in release workflow
ds-pweick Jun 25, 2024
fd29920
fix(release): fixed syntax error in release workflow
ds-pweick Jun 25, 2024
9b10e39
refactor(release): changed auto-generated pr title for consistency
ds-pweick Jun 25, 2024
615057e
refactor(release): changed auto-generated pr title for consistency
ds-pweick Jun 25, 2024
293821d
Merge remote-tracking branch 'origin/refactor/release-workflow' into …
ds-pweick Jun 25, 2024
62dc3b0
refactor(release): cleaned up leftover dummy text in Helm Chart chang…
ds-pweick Jun 25, 2024
3ea21da
fix(release): fix syntax error in release workflow step
ds-pweick Jun 26, 2024
11c1780
fix(release): fixed syntax error in release workflow step
ds-pweick Jun 26, 2024
c37b2a4
fix(release): fixed release workflow not generating release body again
ds-pweick Jun 26, 2024
704a71c
chore(docs): updated docs and Helm chart for IRS release 5.1.5
ds-pweick Jun 27, 2024
deab236
Merge pull request #126 from ds-pweick/action/update-for-release-5.1.5
ds-pweick Jun 27, 2024
e07608d
Update CHANGELOG.md
ds-pweick Jun 27, 2024
51b506c
refactor(release): removed superfluous step from release workflow again
ds-pweick Jun 27, 2024
0dff368
refactor(release): removed superfluous step from release workflow again
ds-pweick Jun 27, 2024
72dadc8
fix(release): release workflow makes sure to call other workflows
ds-pweick Jun 27, 2024
989c2ca
fix(release): release workflow makes sure to call other workflows
ds-pweick Jun 27, 2024
155f9fa
chore(docs): updated docs and Helm chart for IRS release 5.1.9
ds-pweick Jun 27, 2024
22caea8
Merge pull request #131 from ds-pweick/action/update-for-release-5.1.9
ds-pweick Jun 27, 2024
4f20c14
chore(docs): update CONTRIBUTING.md for new release workflow
ds-pweick Jun 27, 2024
be40ec4
chore(docs): update CONTRIBUTING.md for new release workflow
ds-pweick Jul 3, 2024
8817030
chore(docs): updated CONTRIBUTING.md for new release workflow
ds-pweick Jul 3, 2024
6814df4
Merge branch 'main' of https://github.com/eclipse-tractusx/item-relat…
ds-pweick Jul 3, 2024
7a274d3
Merge branch 'refs/heads/main' into refactor/release-workflow
ds-pweick Jul 3, 2024
8afb635
fix(release): release workflow executes subsequent workflows correctly
ds-pweick Jul 3, 2024
b83d697
refactor(docs): cleaned up dummy changes in CHANGELOG.md
ds-pweick Jul 3, 2024
66fae6b
fix(release): release workflow executes subsequent workflows correctly
ds-pweick Jul 3, 2024
663adfe
refactor(release): clean up dummy changes from various files
ds-pweick Jul 3, 2024
1d498d4
fix(release): release workflow executes subsequent workflows correctly
ds-pweick Jul 3, 2024
536fe07
fix(release): cleanup dummy changes
ds-pweick Jul 3, 2024
a235cf5
refactor(release): finally re-simplify release workflows
ds-pweick Jul 3, 2024
f275d49
refactor(release): finally re-simplify release workflows
ds-pweick Jul 3, 2024
5490161
refactor(release): rollback formatting of openapi file
ds-pweick Jul 3, 2024
12360f7
refactor(release): rollback formatting of openapi file
ds-pweick Jul 3, 2024
104b489
refactor(release): rollback formatting of openapi file
ds-pweick Jul 3, 2024
33b5ae1
refactor(release): rollback version number
ds-pweick Jul 3, 2024
cbbb105
Merge branch 'main' into refactor/release-workflow
ds-pweick Jul 10, 2024
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
33 changes: 32 additions & 1 deletion .github/workflows/helm-chart-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,41 @@ name: Release Helm Charts

on:
workflow_dispatch: # Trigger manually
workflow_call:
inputs:
checkout-tag:
description: 'Whether to check out a tag'
required: false
type: boolean
default: false

ref-to-checkout:
description: 'Ref of branch/tag from which to execute workflow'
required: true
type: string
push:
branches:
- main
paths:
- 'charts/**'

jobs:
determine-ref:
runs-on: ubuntu-latest
outputs:
ref: ${{ steps.determine-ref.outputs.ref }}
steps:
- name: Determine ref to check out
id: determine-ref
run: |
if [[ "${{ inputs.checkout-tag }}" == "false" ]]; then
echo "ref=${{ github.ref }}" >> "$GITHUB_OUTPUT"
else
echo "ref=${{ inputs.ref-to-checkout }}" >> "$GITHUB_OUTPUT"
fi

get-helm-charts-versions-irs:
needs: determine-ref
outputs:
latest_version: ${{ steps.step1.outputs.latest_version }}
current_version: ${{ steps.step2.outputs.current_version }}
Expand All @@ -21,6 +48,8 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: 'true'
ref: ${{ needs.determine-ref.outputs.ref }}

- name: Get helm charts latest tag version
id: step1
Expand All @@ -36,7 +65,7 @@ jobs:
echo "Exported $chartVersion helm charts version"

release:
needs: "get-helm-charts-versions-irs"
needs: [get-helm-charts-versions-irs, determine-ref]
if: needs.get-helm-charts-versions-irs.outputs.latest_version != needs.get-helm-charts-versions-irs.outputs.current_version
# depending on default permission settings for your org (contents being read-only or read-write for workloads), you will have to add permissions
# see: https://docs.github.com/en/actions/security-guides/automatic-token-authentication#modifying-the-permissions-for-the-github_token
Expand All @@ -48,6 +77,8 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: 'true'
ref: ${{ needs.determine-ref.outputs.ref }}

- name: Configure Git
run: |
Expand Down
40 changes: 38 additions & 2 deletions .github/workflows/irs-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,19 @@ name: IRS build

on:
workflow_dispatch: # Trigger manually
workflow_call:
inputs:
checkout-tag:
description: 'Whether to check out a tag'
required: false
type: boolean
default: false

ref-to-checkout:
description: 'Ref of branch/tag from which to execute workflow'
required: true
type: string

pull_request:
paths-ignore:
- '**/*.md'
Expand All @@ -19,6 +32,20 @@ on:
- '**'

jobs:
determine-ref:
runs-on: ubuntu-latest
outputs:
ref: ${{ steps.determine-ref.outputs.ref }}
steps:
- name: Determine ref to check out
id: determine-ref
run: |
if [[ "${{ inputs.checkout-tag }}" == "false" ]]; then
echo "ref=${{ github.ref }}" >> "$GITHUB_OUTPUT"
else
echo "ref=${{ inputs.ref-to-checkout }}" >> "$GITHUB_OUTPUT"
fi

init:
runs-on: ubuntu-latest
outputs:
Expand All @@ -34,9 +61,13 @@ jobs:

build:
runs-on: ubuntu-latest
needs: determine-ref
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-tags: 'true'
ref: ${{ needs.determine-ref.outputs.ref }}

- name: Set up JDK 17
uses: actions/setup-java@v4
Expand All @@ -56,7 +87,7 @@ jobs:
mvn clean verify --batch-mode

analyze_with_Sonar:
needs: [init]
needs: [init, determine-ref]
# No need to run if we cannot use the sonar token
if: >-
needs.init.outputs.sonar_configured == 'true'
Expand All @@ -67,6 +98,8 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of sonar analysis
fetch-tags: 'true'
ref: ${{ needs.determine-ref.outputs.ref }}

- name: Set up JDK 17
uses: actions/setup-java@v4
Expand Down Expand Up @@ -99,7 +132,7 @@ jobs:
-Dcheckstyle.skip -Dpmd.skip=true

build_images:
needs: [init]
needs: [init, determine-ref]
strategy:
matrix:
image:
Expand All @@ -109,6 +142,9 @@ jobs:
image-tag: ${{ steps.version.outputs.image_tag }}
steps:
- uses: actions/checkout@v4
with:
fetch-tags: 'true'
ref: ${{ needs.determine-ref.outputs.ref }}

- name: Build image to make sure Dockerfile is valid
run: |
Expand Down
50 changes: 0 additions & 50 deletions .github/workflows/publish-swagger-hub.yml

This file was deleted.

Loading
Loading