Update CI to fix error of "ct lint" command #243
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR fixes the following two issues.
Error of
ct lint
command in the CIAt this time, the
helm lint
command that is called in thect lint
command fail as follows.The root cause is
the ct command cannot treat extra args properly
. In other words,ct lint
command passes the invalid option--timeout
to thehelm lint
command. The--timeout
is supported inhelm install
orhelm uninstall
etc. But,helm lint
does not support--timeout
option. So, thehelm lint
command that called viact lint
with--timeout
option (invalid option) failed as above.This issue is fixed in the following PR on the
ct
side. The latest (v3.10.1)ct
command can treat extra args forhelm install
andhelm lint
respectively. In other words,ct lint
command does not pass the invalid option--timeout
to thehelm lint
command.https://github.com/helm/chart-testing/pull/605/files
Also, it seems that the latest action of
helm/chart-testing-action@v2
does not supportct v3.10.1
yet. So, to fix this issue, I specified the latest version explicitly in the CI.(I think we can remove this specifying version in the future after the latest action supports the latest ct (v3.10.1).)
CI don't test all charts when we trigger CI from Web UI
If we run this CI via Web UI (i.e., run with the
workflow_dispatch
trigger), we assume that thect
command checks all charts.In the current CI,
ct install
(testing for actual deployment) works against all charts. However,ct lint
(testing for yaml syntax check) does not work against all charts.So, I added a new
if
statement to run thect lint
against all charts when we trigger this CI withworkflow_dispatch
.Related issues and/or PRs
N/A
Changes made
ct
command explicitly.if
statement to run thect
command against all charts when we run this CI with theworkflow_dispatch
trigger.Checklist
Additional notes (optional)
I ran this new CI manually, and it worked properly as follows.
https://github.com/scalar-labs/helm-charts/actions/runs/6807941663/job/18511581758
You can see the result of the
ct lint
command against all charts in theRun chart-testing (all charts)
section as follows.Release notes
N/A