Skip to content

Commit

Permalink
Merge pull request #182 from wallyworld/filter-40-tests
Browse files Browse the repository at this point in the history
Only run k8s smoke tests on 4.0 or later
  • Loading branch information
hpidcock authored Mar 22, 2024
2 parents 80f2626 + 2964332 commit f4a50b9
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 7 deletions.
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

0 comments on commit f4a50b9

Please sign in to comment.