diff --git a/api/bases/test.openstack.org_tempests.yaml b/api/bases/test.openstack.org_tempests.yaml index 191dddb5..da660352 100644 --- a/api/bases/test.openstack.org_tempests.yaml +++ b/api/bases/test.openstack.org_tempests.yaml @@ -121,6 +121,29 @@ spec: default: "" description: ExcludeList type: string + externalPluginChangeURL: + default: "" + description: ExternalPluginsChangeURL should be used together + with ExternalPluginsRefspec. These two variables specify which + changes should be download from gerrit/github for each downloaded + plugin (see ExternalPluginGitURL). Both variables are comma + separated lists. + type: string + externalPluginRefspec: + default: "" + description: ExternalPluginsChangeURL should be used together + with ExternalPluginsRefspecs. These two variables specify which + changes should be download from gerrit/github for each downloaded + plugin (see ExternalPluginGitURL). Both variables are comma + separated lists. + type: string + externalPluginURL: + default: "" + description: ExternalPluginsURL is a comma separated list of URLs + that point to git repositories that should be installed within + the tempest container. If this option is specified then only + tests from the external plugins are executed. + type: string includeList: default: tempest.api.identity.v3 description: IncludeList diff --git a/api/v1beta1/tempest_types.go b/api/v1beta1/tempest_types.go index e8bbcee7..8f10703a 100644 --- a/api/v1beta1/tempest_types.go +++ b/api/v1beta1/tempest_types.go @@ -71,6 +71,30 @@ type TempestRunSpec struct { // +kubebuilder:default:="" // WorkerFile is the detailed concurrency spec file WorkerFile string `json:"workerFile,omitempty"` + + // +kubebuilder:validation:Optional + // +kubebuilder:default:="" + // ExternalPluginsURL is a comma separated list of URLs that point + // to git repositories that should be installed within the tempest + // container. If this option is specified then only tests from the + // external plugins are executed. + ExternalPluginGitURL string `json:"externalPluginURL,omitempty"` + + // +kubebuilder:validation:Optional + // +kubebuilder:default:="" + // ExternalPluginsChangeURL should be used together with + // ExternalPluginsRefspec. These two variables specify which changes + // should be download from gerrit/github for each downloaded plugin + // (see ExternalPluginGitURL). Both variables are comma separated lists. + ExternalPluginChangeURL string `json:"externalPluginChangeURL,omitempty"` + + // +kubebuilder:validation:Optional + // +kubebuilder:default:="" + // ExternalPluginsChangeURL should be used together with + // ExternalPluginsRefspecs. These two variables specify which changes + // should be download from gerrit/github for each downloaded plugin + // (see ExternalPluginGitURL). Both variables are comma separated lists. + ExternalPluginRefspec string `json:"externalPluginRefspec,omitempty"` } // TempestSpec PythonTempestconf parts diff --git a/config/crd/bases/test.openstack.org_tempests.yaml b/config/crd/bases/test.openstack.org_tempests.yaml index 191dddb5..da660352 100644 --- a/config/crd/bases/test.openstack.org_tempests.yaml +++ b/config/crd/bases/test.openstack.org_tempests.yaml @@ -121,6 +121,29 @@ spec: default: "" description: ExcludeList type: string + externalPluginChangeURL: + default: "" + description: ExternalPluginsChangeURL should be used together + with ExternalPluginsRefspec. These two variables specify which + changes should be download from gerrit/github for each downloaded + plugin (see ExternalPluginGitURL). Both variables are comma + separated lists. + type: string + externalPluginRefspec: + default: "" + description: ExternalPluginsChangeURL should be used together + with ExternalPluginsRefspecs. These two variables specify which + changes should be download from gerrit/github for each downloaded + plugin (see ExternalPluginGitURL). Both variables are comma + separated lists. + type: string + externalPluginURL: + default: "" + description: ExternalPluginsURL is a comma separated list of URLs + that point to git repositories that should be installed within + the tempest container. If this option is specified then only + tests from the external plugins are executed. + type: string includeList: default: tempest.api.identity.v3 description: IncludeList diff --git a/config/samples/test_v1beta1_tempest.yaml b/config/samples/test_v1beta1_tempest.yaml index de773703..64b61566 100644 --- a/config/samples/test_v1beta1_tempest.yaml +++ b/config/samples/test_v1beta1_tempest.yaml @@ -23,6 +23,9 @@ spec: # smoke: false # serial: false # parallel: true + # externalPluginURL: "URL1,URL2,URL3" + # externalPluginChangeURL: "URL1,-,URL3" + # externalPluginRefspec: "refspec1,-,refspec3" tempestconfRun: # NOTE: All parameters have default values (use only when you want to override # the default behaviour) diff --git a/controllers/tempest_controller.go b/controllers/tempest_controller.go index 82bff502..b0d348d9 100644 --- a/controllers/tempest_controller.go +++ b/controllers/tempest_controller.go @@ -436,6 +436,11 @@ func setTempestConfigVars(envVars map[string]string, // Int envVars["TEMPEST_CONCURRENCY"] = getDefaultInt(tempestRun.Concurrency) + + // String + envVars["TEMPEST_EXTERNAL_PLUGIN_GIT_URL"] = tempestRun.ExternalPluginGitURL + envVars["TEMPEST_EXTERNAL_PLUGIN_CHANGE_URL"] = tempestRun.ExternalPluginChangeURL + envVars["TEMPEST_EXTERNAL_PLUGIN_REFSPEC"] = tempestRun.ExternalPluginRefspec } func setTempestconfConfigVars(envVars map[string]string, diff --git a/docs/source/samples/tempest-config.yaml b/docs/source/samples/tempest-config.yaml index 6a46d373..1bd3e12c 100644 --- a/docs/source/samples/tempest-config.yaml +++ b/docs/source/samples/tempest-config.yaml @@ -25,6 +25,9 @@ data: # TEMPEST_SMOKE: true # TEMPEST_PARALLEL: true # TEMPEST_SERIAL: true + # TEMPEST_EXTERNAL_PLUGIN_GIT_URL: "URL1,URL2,URL3" + # TEMPEST_EXTERNAL_PLUGIN_CHANGE_URL: "URL1,URL2,URL3" + # TEMPEST_EXTERNAL_PLUGIN_REFSPEC: "refspec1,refspec2,refspec3" # TEMPESTCONF env variables: # --------------------------