Documentation ¶
Index ¶
- Constants
- Variables
- func BaseImage() string
- func CleanWorkflowPods() bool
- func GetElasticsearchConfiguration() *config.ElasticSearch
- func GetLandscapeMappings() []config.LandscapeMapping
- func GetNamespace() string
- func GetPauseTaskName(name string) string
- func GetRetryTimeout() *time.Duration
- func GetS3Configuration() *config.S3
- func GetWorkflowName(tr *tmv1beta1.Testrun) string
- func IsRunInsecure() bool
- func IsRunLocal() bool
- func Locations() config.Locations
- func ParseTestrun(data []byte) (*v1beta1.Testrun, error)
- func ParseTestrunFromFile(file string) (*v1beta1.Testrun, error)
- func PrepareImage() string
- func Setup(config *config.Configuration) error
- func TestDefPath() string
- type GitHubConfig
- type GitHubInstanceConfig
- type GitHubSecrets
- type Phase
- type TechnicalUser
- type TestLabel
- type TmConfiguration
Constants ¶
const ( // TM_KUBECONFIG_PATH is the name of the environment variable that holds the kubeconfigs folder path TM_KUBECONFIG_PATH_NAME = "TM_KUBECONFIG_PATH" // TM_KUBECONFIG_PATH is the path where kubeconfigs are mounted to tests. TM_KUBECONFIG_PATH = "/tmp/tm/kubeconfig" // TM_SHARED_PATH_NAME is the name of the environment variable that holds the shared folder path TM_SHARED_PATH_NAME = "TM_SHARED_PATH" // TM_SHARED_PATH is the path to a shared folder, where content is shared among the workflow steps TM_SHARED_PATH = "/tmp/tm/shared" // TM_REPO_PATH is the name of the environment variable that holds the repo path TM_REPO_PATH_NAME = "TM_REPO_PATH" // TM_REPO_PATH is the path where the repo/location is mounted to the tests. TM_REPO_PATH = "/src" // TM_PHASE_NAME is the name of the environment variable that holds the Test Machinery phase TM_PHASE_NAME = "TM_PHASE" // TM_EXPORT_PATH is the name of the environment variable that holds the path to the export folder TM_EXPORT_PATH_NAME = "TM_EXPORT_PATH" // TM_EXPORT_PATH is the path where test results json's are placed to be persisted. TM_EXPORT_PATH = "/tmp/tm/export" // ExportArtifact is the name of the output artifact where results are stored. ExportArtifact = "ExportArtifact" // TM_TESTRUN_ID_NAME is the name of the environment variable that holds the current testrun id TM_TESTRUN_ID_NAME = "TM_TESTRUN_ID" // TM_GIT_SHA_NAME is the name of the environment variable that holds the current git commit sha of the specified location. TM_GIT_SHA_NAME = "TM_GIT_SHA" // TM_GIT_REF_NAME is the name of the environment variable that holds the current git ref of the specified location. TM_GIT_REF_NAME = "TM_GIT_REF" // ConfigMapName is the name of the testmachinery configmap in the cluster ConfigMapName = "tm-config" // the label and taint of the nodes in the worker pool which are preferably used for workflow pods WorkerPoolTaintLabelName = "testload" // Name of the argo suspend template name PauseTemplateName = "suspend" // ArtifactKubeconfigs is the name of the kubeconfigs artifact ArtifactKubeconfigs = "kubeconfigs" // ArtifactUntrustedKubeconfigs is the name of the kubeconfigs artifacts for untrusted steps ArtifactUntrustedKubeconfigs = "untrustedKubeconfigs" ArtifactSharedFolder = "sharedFolder" )
Variables ¶
var ConfigScheme = runtime.NewScheme()
ConfigScheme is the core testmachinery scheme
var TestMachineryScheme = runtime.NewScheme()
TestMachineryScheme is the scheme used in the testmachinery and testrunner.
Functions ¶
func BaseImage ¶
func BaseImage() string
BaseImage returns the default image that is used if no image is specified by a TestDefinition.
func CleanWorkflowPods ¶
func CleanWorkflowPods() bool
CleanWorkflowPods returns whether pod gc is enabled.
func GetElasticsearchConfiguration ¶
func GetElasticsearchConfiguration() *config.ElasticSearch
GetElasticsearchConfiguration returns the current elasticsearch configuration
func GetLandscapeMappings ¶
func GetLandscapeMappings() []config.LandscapeMapping
func GetNamespace ¶
func GetNamespace() string
GetNamespace returns the current testmachinery namespace.
func GetPauseTaskName ¶
GetPauseTaskName returns the name of the pause step to a corresponding step.
func GetS3Configuration ¶
GetS3Configuration returns the current s3 configuration
func GetWorkflowName ¶
GetWorkflowName returns the workflow name of a testruns
func IsRunInsecure ¶
func IsRunInsecure() bool
IsRunInsecure returns if the testmachinery is run locally
func IsRunLocal ¶
func IsRunLocal() bool
IsRunLocal returns if the testmachinery is currently running locally
func ParseTestrun ¶
ParseTestrun parses testrun.
func ParseTestrunFromFile ¶
ParseTestrunFromFile reads a testrun.yaml file from file and parses the yaml.
func Setup ¶
func Setup(config *config.Configuration) error
Setup fetches all configuration values and creates the TmConfiguration.
func TestDefPath ¶
func TestDefPath() string
TestDefPath returns the path to TestDefinition inside repositories (scripts/integration-tests/argo/tm).
Types ¶
type GitHubConfig ¶
type GitHubConfig struct { Cache *config.GitHubCache Secrets []GitHubInstanceConfig }
GitHub represents the github configuration for the testmachinery
type GitHubInstanceConfig ¶
type GitHubInstanceConfig struct { HttpUrl string `yaml:"httpUrl"` ApiUrl string `yaml:"apiUrl"` SkipTls bool `yaml:"disable_tls_validation"` TechnicalUser TechnicalUser `yaml:"technicalUser"` }
GitHubInstanceConfig is an object containing config and credentials for a specific github instance. It is defined as in cc-config.
func GetGitHubSecrets ¶
func GetGitHubSecrets() []GitHubInstanceConfig
GetGitHubSecrets returns all github secrets
type GitHubSecrets ¶
type GitHubSecrets struct {
Secrets []GitHubInstanceConfig `yaml:"secrets"`
}
GitHub holds all git secrets as defined in the environment variable.
type TechnicalUser ¶
type TechnicalUser struct { Username string `yaml:"username"` Password string `yaml:"password"` AuthToken string `yaml:"authToken"` }
TechnicalUser holds the actual git credentials.
type TestLabel ¶
type TestLabel string
const ( // TestLabelShoot are tests that are meant to test a shoot TestLabelShoot TestLabel = "shoot" // TestLabelGardener are tests that are meant to test gardener and do not rely on a shoot. TestLabelGardener TestLabel = "gardener" // TestLabelDefault are tests that are graduated to GA but are not a release blocker TestLabelDefault TestLabel = "default" // TestLabelRelease are tests that are graduated GA and release blocker TestLabelRelease TestLabel = "release" // TestLabelBeta are tests that are in beta which means that they are currently unstable // but will be promoted to GA someday TestLabelBeta TestLabel = "beta" )
type TmConfiguration ¶
type TmConfiguration struct { *config.Configuration GitHubSecrets []GitHubInstanceConfig }
TmConfiguration is an object containing the actual configuration of the Testmachinery
func GetConfig ¶
func GetConfig() *TmConfiguration
GetConfig returns the current testmachinery configuration.
func (*TmConfiguration) Copy ¶
func (c *TmConfiguration) Copy() *TmConfiguration
New creates a deep copy of the configuration
func (*TmConfiguration) String ¶
func (c *TmConfiguration) String() string
String returns the sanitized TestMachinery configuration as formatted string