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

Only run k8s smoke tests on 4.0 or later #182

Merged
merged 1 commit into from
Mar 22, 2024
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
16 changes: 11 additions & 5 deletions jobs/ci-run/integration/gen/test-smoke_k8s.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,16 @@
OPERATOR_IMAGE_ACCOUNT=${PARAM_OPERATOR_IMAGE_ACCOUNT}
- wait-for-cloud-init
- prepare-integration-test
- run-integration-test-microk8s:
test_name: 'smoke_k8s'
setup_steps: ''
task_name: ''
skip_tasks: ''
- conditional-step:
condition-kind: regex-match
regex: "^[5-9].*|^4\\.([0-9]|\\d{2,})(\\.|-).*"
label: "${JUJU_VERSION}"
on-evaluation-failure: "dont-run"
steps:
- run-integration-test-microk8s:
test_name: 'smoke_k8s'
setup_steps: ''
task_name: ''
skip_tasks: ''
publishers:
- integration-artifacts
2 changes: 2 additions & 0 deletions tools/gen-wire-tests/juju.config
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ folders:
3.4
test_actions_params:
4.0
smoke_k8s-test_deploy:
4.0
timeout:
secrets_iaas:
test_secrets_vault: 60
Expand Down
11 changes: 9 additions & 2 deletions tools/gen-wire-tests/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,9 @@ func writeJobDefinitions(
if introduced, ok := config.Folders.Introduced[task]; ok {
minVersions[task] = minVersionRegex[introduced]
}
if introduced, ok := config.Folders.Introduced[suiteName+"-"+task]; ok {
minVersions[suiteName+"-"+task] = minVersionRegex[introduced]
}
}

if err := t.Execute(f, struct {
Expand Down Expand Up @@ -553,10 +556,14 @@ const Template = `
OPERATOR_IMAGE_ACCOUNT=${PARAM_OPERATOR_IMAGE_ACCOUNT}
- wait-for-cloud-init
- prepare-integration-test
{{- if index $.MinVersions $task_name }}
{{- if or (index $.MinVersions $task_name) (index $.MinVersions (printf "%s-%s" $.SuiteName $task_name)) }}
{{- $cond := index $.MinVersions $task_name -}}
{{- if eq $cond "" }}
{{- $cond = index $.MinVersions (printf "%s-%s" $.SuiteName $task_name) -}}
{{- end }}
- conditional-step:
condition-kind: regex-match
regex: "{{ index $.MinVersions $task_name }}"
regex: "{{ $cond }}"
label: "${JUJU_VERSION}"
on-evaluation-failure: "dont-run"
steps:
Expand Down
Loading