-
Notifications
You must be signed in to change notification settings - Fork 680
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
WIP: add helm test step to gh-actions #895
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
chart-dirs: | ||
- charts | ||
helm-extra-args: "--timeout=5m" | ||
helm-extra-set-args: "--set=kind=Deployment --set=podSecurityPolicy.create=false" | ||
check-version-increment: false | ||
target-branch: master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,9 +7,11 @@ on: | |
- release-* | ||
paths: | ||
- 'charts/**' | ||
- '.github/workflows/helm.yaml' | ||
pull_request: | ||
paths: | ||
- 'charts/**' | ||
- '.github/workflows/helm.yaml' | ||
|
||
jobs: | ||
lint-and-test: | ||
|
@@ -23,14 +25,16 @@ jobs: | |
- name: Set up Helm | ||
uses: azure/[email protected] | ||
with: | ||
version: v3.4.2 | ||
version: v3.9.2 | ||
|
||
- uses: actions/[email protected] | ||
with: | ||
python-version: 3.7 | ||
|
||
- name: Set up chart-testing | ||
uses: helm/[email protected] | ||
with: | ||
version: v3.7.0 | ||
|
||
- name: Run chart-testing (list-changed) | ||
id: list-changed | ||
|
@@ -39,6 +43,26 @@ jobs: | |
if [[ -n "$changed" ]]; then | ||
echo "::set-output name=changed::true" | ||
fi | ||
|
||
# Force linting/test in debug runs with a change (this action only runs on chart and helm.yaml workflow diffs anyways) | ||
- name: Change Kind to deployment | ||
run: "sed -i \"s|kind: [^ ]*|kind: Deployment|g\" charts/descheduler/values.yaml" | ||
|
||
- name: Run chart-testing (lint) | ||
run: ct lint --config=.github/ci/ct.yaml --validate-maintainers=false | ||
|
||
# Need a multi node cluster so descheduler runs until evictions | ||
- name: Create multi node Kind cluster | ||
run: | | ||
kind create cluster --name kind --config ./hack/kind_config.yaml --wait 2m | ||
|
||
# helm-extra-set-args only available after ct 3.6.0 | ||
- name: Run chart-testing (install) | ||
run: ct install --config=.github/ci/ct.yaml | ||
|
||
- name: E2E after chart install | ||
env: | ||
KUBERNETES_VERSION: "v1.24.0" | ||
KIND_E2E: true | ||
SKIP_INSTALL: true | ||
run: make test-e2e |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 0 additions & 30 deletions
30
charts/descheduler/templates/tests/test-descheduler-pod.yaml
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
|
||
docker run -it --rm --network host --workdir=/data --volume ~/.kube/config:/root/.kube/config:ro --volume $(pwd):/data quay.io/helmpack/chart-testing:v3.7.0 /bin/bash -c "git config --global --add safe.directory /data; ct install --config=.github/ci/ct.yaml --helm-extra-set-args=\"--set=kind=Deployment --set=podSecurityPolicy.create=false\"" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For some reason when calling from make the helm-extra-set-args from .github/ci/ct.yaml are being ignored... had to set them manually here as arguments of ct. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this seems odd to do, when we can have a specific values file that can do this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was only to force ct lint and ct install to show changes, it is unrelated to this value change itself. I want to remove this when the work is finished.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Initially I was planning on leaving this, but now I see it is too ugly/confusing 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will wait for lgtms and approves, but /hold so I remember to remove this line when reviews are done