Skip to content

Commit

Permalink
Merge pull request eclipse-tractusx#450 from FraunhoferISST/ci/helm-v…
Browse files Browse the repository at this point in the history
…ersion-warning

Ci(helm-test): don't fail on chart version check failure
  • Loading branch information
mhellmeier authored Jun 21, 2024
2 parents 8263810 + a48a72d commit faed123
Show file tree
Hide file tree
Showing 8 changed files with 64 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .act/pr_event.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"repository": {
"default_branch": "main"
}
}
26 changes: 26 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<!--
Thanks for your contribution!
Please follow the instructions on your PRs title and description.
aligned title description: '(feat|fix|chore|doc): _description of introduced change_'
Important: Contributing Guidelines can be found here: https://eclipse-tractusx.github.io/docs/oss/how-to-contribute
Info: <!- text comments -> will be hidden from the rendered preview of your PR.
-->

## Description
<!--
Please describe your PR:
- What does this PR introduce?
- Does it fix a bug?
- Does it add a new feature?
- Is it enhancing documentation?
-->

<!-- Please tag the related issue `Fixes or Updates #issue_number`, if applicable. -->

## Pre-review checks

Please ensure to do as many of the following checks as possible, before asking for committer review:

- [ ] DEPENDENCIES are up-to-date. [Dash license tool](https://github.com/eclipse/dash-licenses). Committers can open IP issues for restricted libs.
- [ ] [Copyright and license header](https://eclipse-tractusx.github.io/docs/release/trg-7/trg-7-02) are present on all affected files
- [ ] If helm chart has been changed, the chart version has been bumped to either next major, minor or patch level (compared to released chart).
2 changes: 1 addition & 1 deletion .github/workflows/build-image-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ env:
IMAGE_NAME: "app-puris-backend"

jobs:
docker:
docker-backend:
if: github.repository_owner == 'eclipse-tractusx' # prevent running on forks
runs-on: ubuntu-latest
permissions:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-image-frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ env:
REPOSITORY: "${{ github.repository }}"

jobs:
docker:
docker-frontend:
if: github.repository_owner == 'eclipse-tractusx' # prevent running on forks
runs-on: ubuntu-latest
permissions:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ on:

jobs:
analyze:
name: Analyze
name: Analyze CodeQl
# Runner size impacts CodeQL analysis time. To learn more, please see:
# - https://gh.io/recommended-hardware-resources-for-running-codeql
# - https://gh.io/supported-runners-and-hardware-resources
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/helm-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ jobs:
fi
- name: Run chart-testing (lint)
run: ct lint --validate-maintainers=false --target-branch ${{ github.event.repository.default_branch }}
run: ct lint --validate-maintainers=false --check-version-increment=false --target-branch ${{ github.event.repository.default_branch }}

- name: Run chart-testing (install)
run: |
Expand All @@ -126,3 +126,11 @@ jobs:
helm dependency update charts/puris
helm upgrade puris charts/puris
if: github.event_name != 'pull_request' || steps.list-changed.outputs.changed == 'true'

# check version increment should fail separately
# we don't directly release a chart and thus maybe don't need to increase the version.
# to enable this behaviour otterdog has been reconfigured
- name: Run chart-testing (version update)
id: version-check
run: |
ct lint --validate-maintainers=false --check-version-increment=true --target-branch ${{ github.event.repository.default_branch }}
2 changes: 1 addition & 1 deletion .github/workflows/kics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ on:

jobs:
analyze:
name: Analyze
name: Analyze KICS
runs-on: ubuntu-latest
permissions:
actions: read
Expand Down
20 changes: 20 additions & 0 deletions docs/DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,26 @@ docker exec -it {container-id} crictl rmi puris-backend:dev
docker exec -it {container-id} crictl rmi puris-frontend:dev
```

## Testing Workflows locally

[act](https://github.com/nektos/act) is a tool to run jobs within `./workflows` locally. Configuration of events can
be stored in `./act`

Install by downloading the released binaries and add them to your path.

```shell
cd <root dir of repo>

act --list
>> Stage Job ID Job name Workflow name Workflow file Events
>> 0 check-dependencies-backend check-dependencies-backend 3rd Party Dependency Check (Eclipse Dash Tool) dash-dependency-check.yml workflow_dispatch,pull_request
>> 0 check-dependencies-frontend check-dependencies-frontend 3rd Party Dependency Check (Eclipse Dash Tool) dash-dependency-check.yml workflow_dispatch,pull_request
>> 0 lint-test lint-test Lint and Test Charts helm-test.yml pull_request,workflow_dispatch

# run action with job-id lint-test for event as defined in pr-event.json
act --job lint-test -e .act/pr-event.json
```

## NOTICE

This work is licensed under the [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0).
Expand Down

0 comments on commit faed123

Please sign in to comment.