common

package
v0.0.0-...-8729abe Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 7, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

README

Release e2e tests

Release e2e tests contains two test suites.

  • Please look into README.md for release-service-suite.
  • Please look into README.md for release-pipelines-suite.

Documentation

Index

Constants

View Source
const (
	ApplicationNameDefault       string = "appstudio"
	ReleaseStrategyPolicyDefault string = "mvp-policy"
	ReleaseStrategyPolicy        string = "policy"

	RedhatAppstudioUserSecret            string = "hacbs-release-tests-token"
	RedhatAppstudioQESecret              string = "redhat-appstudio-qe-bot-token"
	HacbsReleaseTestsTokenSecret         string = "redhat-appstudio-registry-pull-secret"
	PublicSecretNameAuth                 string = "cosign-public-key"
	ReleasePipelineServiceAccountDefault string = "release-service-account"

	SourceReleasePlanName          string = "source-releaseplan"
	SecondReleasePlanName          string = "the-second-releaseplan"
	TargetReleasePlanAdmissionName string = "demo"
	ReleasePvcName                 string = "release-pvc"
	ReleaseEnvironment             string = "production"

	ReleaseCreationTimeout              = 5 * time.Minute
	ReleasePipelineRunCreationTimeout   = 10 * time.Minute
	ReleasePipelineRunCompletionTimeout = 60 * time.Minute
	BuildPipelineRunCompletionTimeout   = 60 * time.Minute
	BuildPipelineRunCreationTimeout     = 10 * time.Minute
	ReleasePlanStatusUpdateTimeout      = 1 * time.Minute
	DefaultInterval                     = 100 * time.Millisecond

	// Pipelines constants
	ComponentName                   string = "dc-metro-map"
	GitSourceComponentUrl           string = "https://github.com/redhat-appstudio-qe/dc-metro-map-release"
	AdditionalComponentName         string = "simple-python"
	AdditionalGitSourceComponentUrl string = "https://github.com/redhat-appstudio-qe/devfile-sample-python-basic-test2"
	ReleasedImagePushRepo           string = "quay.io/redhat-appstudio-qe/dcmetromap"
	AdditionalReleasedImagePushRepo string = "quay.io/redhat-appstudio-qe/simplepython"
	PyxisStageImagesApiEndpoint     string = "https://pyxis.preprod.api.redhat.com/v1/images/id/"
	GitLabRunFileUpdatesTestRepo    string = "https://gitlab.cee.redhat.com/hacbs-release-tests/app-interface"

	// EC constants
	EcPolicyLibPath     = "github.com/enterprise-contract/ec-policies//policy/lib"
	EcPolicyReleasePath = "github.com/enterprise-contract/ec-policies//policy/release"
	EcPolicyDataBundle  = "oci::quay.io/konflux-ci/tekton-catalog/data-acceptable-bundles:latest"
	EcPolicyDataPath    = "github.com/release-engineering/rhtap-ec-policy//data"

	// Service constants
	ApplicationName string = "application"
)

Variables

View Source
var (
	RelSvcCatalogURL      string = utils.GetEnv("RELEASE_SERVICE_CATALOG_URL", "https://github.com/konflux-ci/release-service-catalog")
	RelSvcCatalogRevision string = utils.GetEnv("RELEASE_SERVICE_CATALOG_REVISION", "staging")
)

Pipelines variables

View Source
var ManagednamespaceSecret = []corev1.ObjectReference{
	{Name: RedhatAppstudioUserSecret},
}

Functions

func CheckReleaseStatus

func CheckReleaseStatus(releaseCR *releaseApi.Release) error

func CreateComponent

func CreateComponent(devFw framework.Framework, devNamespace, appName, compName, gitURL, gitRevision, contextDir, dockerFilePath string, buildPipelineBundle map[string]string) *appservice.Component

func CreateOpaqueSecret

func CreateOpaqueSecret(
	fw *framework.Framework,
	namespace, secretName string,
	fieldEnvMap map[string]string,
)

CreateOpaqueSecret creates a k8s Secret in a workspace if it doesn't exist. It populates the Secret data fields based on the mapping of fields to environment variables containing the base64 encoded field data.

func CreateSnapshotWithImageSource

func CreateSnapshotWithImageSource(fw framework.Framework, componentName, applicationName, namespace, containerImage, gitSourceURL, gitSourceRevision, componentName2, containerImage2, gitSourceURL2, gitSourceRevision2 string) (*appstudioApi.Snapshot, error)

CreateSnapshotWithImageSource creates a snapshot having two images and sources.

func DoesDigestExistInQuay

func DoesDigestExistInQuay(repoURL string, digest string) (bool, error)

repoURL format example: quay.io/redhat-appstudio-qe/dcmetromap

func NewFramework

func NewFramework(workspace string) *framework.Framework

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL