github.com/redhat-appstudio/e2e-tests@v0.0.0-20230619105049-9a422b2094d7/pkg/constants/constants.go (about)

     1  package constants
     2  
     3  // Global constants
     4  const (
     5  	// A github token is required to run the tests. The token need to have permissions to the given github organization. By default the e2e use redhat-appstudio-qe github organization.
     6  	GITHUB_TOKEN_ENV string = "GITHUB_TOKEN" // #nosec
     7  
     8  	// The github organization is used to create the gitops repositories in Red Hat Appstudio.
     9  	GITHUB_E2E_ORGANIZATION_ENV string = "MY_GITHUB_ORG" // #nosec
    10  
    11  	// The quay organization is used to push container images using Red Hat Appstudio pipelines.
    12  	QUAY_E2E_ORGANIZATION_ENV string = "QUAY_E2E_ORGANIZATION" // #nosec
    13  
    14  	// The quay.io username to perform container builds and puush
    15  	QUAY_OAUTH_USER_ENV string = "QUAY_OAUTH_USER" // #nosec
    16  
    17  	// A quay organization where repositories for component images will be created.
    18  	DEFAULT_QUAY_ORG_ENV string = "DEFAULT_QUAY_ORG" // #nosec
    19  
    20  	// The quay.io token to perform container builds and push. The token must be correlated with the QUAY_OAUTH_USER environment
    21  	QUAY_OAUTH_TOKEN_ENV string = "QUAY_OAUTH_TOKEN" // #nosec
    22  
    23  	// The private devfile sample git repository to use in certain HAS e2e tests
    24  	PRIVATE_DEVFILE_SAMPLE string = "PRIVATE_DEVFILE_SAMPLE" // #nosec
    25  
    26  	// The Tekton Chains namespace
    27  	TEKTON_CHAINS_NS string = "tekton-chains" // #nosec
    28  
    29  	// User for running the end-to-end Tekton Chains tests
    30  	TEKTON_CHAINS_E2E_USER string = "chains-e2e"
    31  
    32  	//Cluster Registration namespace
    33  	CLUSTER_REG_NS string = "cluster-reg-config" // #nosec
    34  
    35  	// E2E test namespace where the app and component CRs will be created
    36  	E2E_APPLICATIONS_NAMESPACE_ENV string = "E2E_APPLICATIONS_NAMESPACE"
    37  
    38  	// Skip checking "ApplicationServiceGHTokenSecrName" secret
    39  	SKIP_HAS_SECRET_CHECK_ENV string = "SKIP_HAS_SECRET_CHECK"
    40  
    41  	// Sandbox kubeconfig user path
    42  	USER_KUBE_CONFIG_PATH_ENV string = "USER_KUBE_CONFIG_PATH"
    43  	// Release e2e auth for build and release quay keys
    44  
    45  	QUAY_OAUTH_TOKEN_RELEASE_SOURCE string = "QUAY_OAUTH_TOKEN_RELEASE_SOURCE"
    46  
    47  	QUAY_OAUTH_TOKEN_RELEASE_DESTINATION string = "QUAY_OAUTH_TOKEN_RELEASE_DESTINATION"
    48  
    49  	// Key auth for accessing Pyxis stage external registry
    50  	PYXIS_STAGE_KEY_ENV string = "PYXIS_STAGE_KEY"
    51  
    52  	// Cert auth for accessing Pyxis stage external registry
    53  	PYXIS_STAGE_CERT_ENV string = "PYXIS_STAGE_CERT"
    54  
    55  	// Bundle ref for overriding the default Java build bundle specified in BuildPipelineSelectorYamlURL
    56  	CUSTOM_JAVA_PIPELINE_BUILD_BUNDLE_ENV string = "CUSTOM_JAVA_PIPELINE_BUILD_BUNDLE"
    57  
    58  	// Test namespace's required labels
    59  	ArgoCDLabelKey   string = "argocd.argoproj.io/managed-by"
    60  	ArgoCDLabelValue string = "gitops-service-argocd"
    61  
    62  	BuildPipelinesConfigMapDefaultNamespace = "build-templates"
    63  
    64  	HostOperatorNamespace   string = "toolchain-host-operator"
    65  	MemberOperatorNamespace string = "toolchain-member-operator"
    66  
    67  	HostOperatorWorkload   string = "host-operator-controller-manager"
    68  	MemberOperatorWorkload string = "member-operator-controller-manager"
    69  
    70  	OLMOperatorNamespace string = "openshift-operator-lifecycle-manager"
    71  	OLMOperatorWorkload  string = "olm-operator"
    72  
    73  	OSAPIServerNamespace string = "openshift-apiserver"
    74  	OSAPIServerWorkload  string = "apiserver"
    75  
    76  	DefaultQuayOrg = "redhat-appstudio-qe"
    77  
    78  	RegistryAuthSecretName = "redhat-appstudio-registry-pull-secret"
    79  
    80  	QuayRepositorySecretName      = "quay-repository"
    81  	QuayRepositorySecretNamespace = "e2e-secrets"
    82  
    83  	JVMBuildImageSecretName = "jvm-build-image-secrets"
    84  	JBSConfigName           = "jvm-build-config"
    85  
    86  	BuildPipelineSelectorYamlURL = "https://raw.githubusercontent.com/redhat-appstudio/infra-deployments/main/components/build-service/base/build-pipeline-selector.yaml"
    87  
    88  	DefaultImagePushRepo         = "quay.io/" + DefaultQuayOrg + "/test-images"
    89  	DefaultReleasedImagePushRepo = "quay.io/" + DefaultQuayOrg + "/test-release-images"
    90  
    91  	BuildTaskRunName = "build-container"
    92  
    93  	ComponentInitialBuildAnnotationKey = "appstudio.openshift.io/component-initial-build"
    94  
    95  	ReleasePipelineImageRef = "quay.io/hacbs-release/pipeline-release:0.14"
    96  
    97  	// TODO
    98  	// delete this constant and all its occurrences in the code base
    99  	// once https://issues.redhat.com/browse/RHTAP-810 is completed
   100  	OldTektonTaskTestOutputName = "HACBS_TEST_OUTPUT"
   101  
   102  	TektonTaskTestOutputName = "TEST_OUTPUT"
   103  
   104  	DefaultPipelineServiceAccount            = "appstudio-pipeline"
   105  	DefaultPipelineServiceAccountRoleBinding = "appstudio-pipelines-runner-rolebinding"
   106  	DefaultPipelineServiceAccountClusterRole = "appstudio-pipelines-runner"
   107  
   108  	PaCPullRequestBranchPrefix = "appstudio-"
   109  
   110  	// Expiration for image tags
   111  	IMAGE_TAG_EXPIRATION_ENV  string = "IMAGE_TAG_EXPIRATION"
   112  	DefaultImageTagExpiration string = "6h"
   113  )
   114  
   115  var (
   116  	ComponentDefaultLabel                    = map[string]string{"e2e-test": "true"}
   117  	ComponentPaCRequestAnnotation            = map[string]string{"appstudio.openshift.io/pac-provision": "request"}
   118  	ImageControllerAnnotationDeleteRepoTrue  = map[string]string{"image.redhat.com/generate": "true", "image.redhat.com/delete-image-repo": "true"}
   119  	ImageControllerAnnotationDeleteRepoFalse = map[string]string{"image.redhat.com/generate": "true", "image.redhat.com/delete-image-repo": "false"}
   120  )