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 regression in api-versions and flux-local test #259

Merged
merged 8 commits into from
Jul 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 6 additions & 0 deletions .github/workflows/flux-local-diff.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ jobs:
matrix:
cluster_path:
- tests/testdata/cluster
- tests/testdata/cluster2
- tests/testdata/cluster3
- tests/testdata/cluster4
- tests/testdata/cluster5
- tests/testdata/cluster6
resource:
- helmrelease
- kustomization
Expand All @@ -30,6 +35,7 @@ jobs:
resource: ${{ matrix.resource }}
debug: true
sources: cluster=tests/testdata/cluster3
api-versions: batch/v1/CronJob
- name: PR Comments
uses: mshick/add-pr-comment@v2
if: ${{ steps.diff.outputs.diff != '' }}
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/flux-local-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,21 @@ on:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
cluster_path:
- tests/testdata/cluster
- tests/testdata/cluster2
- tests/testdata/cluster3
- tests/testdata/cluster5
- tests/testdata/cluster4
- tests/testdata/cluster6
steps:
- uses: actions/checkout@v3
- uses: ./action/test
with:
enable-helm: true
enable-kyverno: false
sources: cluster=tests/testdata/cluster3
path: ${{ matrix.cluster_path }}
api-versions: batch/v1/CronJob
7 changes: 6 additions & 1 deletion action/diff/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ runs:
run: |
delimiter="$(openssl rand -hex 8)"
echo "diff<<${delimiter}" >> $GITHUB_OUTPUT
if [[ "${{ inputs.resource }}" == "helmrelease" ]]; then
extra_flags="--api-versions=${{ inputs.api-versions}}"
else
extra_flags=""
fi
flux-local \
--log-level ${{ inputs.debug != 'true' && 'INFO' || 'DEBUG' }} \
diff \
Expand All @@ -85,9 +90,9 @@ runs:
--${{ inputs.skip-secrets != 'true' && 'no-' || '' }}skip-secrets \
--limit-bytes ${{ inputs.limit-bytes }} \
--all-namespaces \
${{ inputs.resource == 'helmrelease' && join('--api-versions=', inputs.api-versions) || '' }} \
--kustomize-build-flags="${{ inputs.kustomize-build-flags }}" \
--sources "${{ inputs.sources }}" \
${extra_flags} \
>> $GITHUB_OUTPUT
echo "${delimiter}" >> $GITHUB_OUTPUT
shell: bash
2 changes: 0 additions & 2 deletions flux_local/tool/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,8 +389,6 @@ async def run( # type: ignore[no-untyped-def]
enable_kyverno: bool,
test_path: str | None,
verbosity: int,
kube_version: str | None,
api_versions: str | None,
**kwargs, # pylint: disable=unused-argument
) -> None:
"""Async Action implementation."""
Expand Down