Repository: konflux-ci/e2e-tests
Pull request #1506: feat(RELEASE-1312): change FBC e2e tests back to build a image
Author: login: jinqi7
Labels: name: lgtm
name: approved
name: 5-10 min
Created: 2025-02-12T06:02:07Z | Merged: 2025-03-24T14:43:03Z

* Added functions CreateComponentWithNewBranch and CreatePushSnapshot
 to build a new image and trigger the managed pipelineRun.
* Updated four FBC test cases to use the functions and delete the test
branches created for testing.

# Description

Please include a summary of the changes and the related issue. Please also include relevant motivation and context. List any dependencies that are required for this change.

## Issue ticket number and link

## Type of change

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update

# How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

# Checklist:

- [ ] I have performed a self-review of my code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] I have added meaningful description with JIRA/GitHub issue key(if applicable), for example HASSuiteDescribe("STONE-123456789 devfile source") 
- [ ] I have updated labels (if needed)



Diff:
diff --git a/tests/release/const.go b/tests/release/const.go
index 049e5c6c3d..379dd04425 100644
--- a/tests/release/const.go
+++ b/tests/release/const.go
@@ -3,6 +3,7 @@ package common
 import (
 	"time"
 
+	"github.com/konflux-ci/e2e-tests/pkg/constants"
 	"github.com/konflux-ci/e2e-tests/pkg/utils"
 	corev1 "k8s.io/api/core/v1"
 )
@@ -12,6 +13,7 @@ const (
 	ReleaseStrategyPolicyDefault string = "mvp-policy"
 	ReleaseStrategyPolicy        string = "policy"
 
+	QuayTokenSecret                      string = "test-quay-token-secret"
 	RedhatAppstudioUserSecret            string = "hacbs-release-tests-token"
 	RedhatAppstudioQESecret              string = "redhat-appstudio-qe-bot-token"
 	HacbsReleaseTestsTokenSecret         string = "redhat-appstudio-registry-pull-secret"
@@ -31,14 +33,18 @@ const (
 	BuildPipelineRunCreationTimeout     = 10 * time.Minute
 	ReleasePlanStatusUpdateTimeout      = 1 * time.Minute
 	DefaultInterval                     = 100 * time.Millisecond
+	PullRequestCreationTimeout          = 5 * time.Minute
+	PipelineRunStartedTimeout           = 5 * time.Minute
+	SnapshotTimeout                     = 4 * time.Minute
+	SnapshotPollingInterval             = 1 * time.Second
+	DefaultPollingInterval              = 2 * time.Second
+	MergePRTimeout                      = 1 * time.Minute
 
 	// 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"
 
@@ -50,6 +56,7 @@ const (
 
 	// Service constants
 	ApplicationName string = "application"
+	ReferenceDoesntExist string = "Reference does not exist"
 )
 
 var ManagednamespaceSecret = []corev1.ObjectReference{
@@ -60,4 +67,6 @@ var ManagednamespaceSecret = []corev1.ObjectReference{
 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")
+	ReleasedImagePushRepo string = "quay.io/" + utils.GetEnv(constants.QUAY_E2E_ORGANIZATION_ENV, "redhat-appstudio-qe") + "/dcmetromap"
+	AdditionalReleasedImagePushRepo string = "quay.io/" + utils.GetEnv(constants.QUAY_E2E_ORGANIZATION_ENV, "redhat-appstudio-qe") + "/simplepython"
 )
diff --git a/tests/release/pipelines/fbc_release.go b/tests/release/pipelines/fbc_release.go
index 471effc903..e238fbcc9a 100644
--- a/tests/release/pipelines/fbc_release.go
+++ b/tests/release/pipelines/fbc_release.go
@@ -5,120 +5,139 @@ import (
 	"fmt"
 	"time"
 
-	"github.com/devfile/library/v2/pkg/util"
-	ecp "github.com/enterprise-contract/enterprise-contract-controller/api/v1alpha1"
 	appservice "github.com/konflux-ci/application-api/api/v1alpha1"
+	ecp "github.com/enterprise-contract/enterprise-contract-controller/api/v1alpha1"
+	"github.com/devfile/library/v2/pkg/util"
 	"github.com/konflux-ci/e2e-tests/pkg/constants"
 	"github.com/konflux-ci/e2e-tests/pkg/framework"
 	"github.com/konflux-ci/e2e-tests/pkg/utils"
 	"github.com/konflux-ci/e2e-tests/pkg/utils/tekton"
+	"k8s.io/apimachinery/pkg/api/errors"
+	"k8s.io/apimachinery/pkg/runtime"
+	"knative.dev/pkg/apis"
 	pipeline "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1"
 	releasecommon "github.com/konflux-ci/e2e-tests/tests/release"
 	releaseapi "github.com/konflux-ci/release-service/api/v1alpha1"
 	tektonutils "github.com/konflux-ci/release-service/tekton/utils"
+
 	. "github.com/onsi/ginkgo/v2"
 	. "github.com/onsi/gomega"
-	"k8s.io/apimachinery/pkg/runtime"
-	"knative.dev/pkg/apis"
 )
 
 const (
-	fbcServiceAccountName   = "release-service-account"
-	fbcSourceGitURL         = "https://github.com/redhat-appstudio-qe/fbc-sample-repo"
-	fbcGitSrcSHA            = "2b04501c777aa4f7ad80f3e233731f3201e5b21b"
-	fbcDockerFilePath       = "catalog.Dockerfile"
-	targetPort              = 50051
-	relSvcCatalogPathInRepo = "pipelines/managed/fbc-release/fbc-release.yaml"
+	fbcServiceAccountName      = "release-service-account"
+	fbcSourceGitURL            = "https://github.com/redhat-appstudio-qe/fbc-sample-repo-test"
+	fbcCompRepoName            = "fbc-sample-repo-test"
+	fbcCompRevision            = "139b6b8d9adca6bd6f0081482ecd284cbedc2681"
+	fbcCompDefaultBranchName   = "main"
+	fbcDockerFilePath          = "catalog.Dockerfile"
+	targetPort                 = 50051
+	relSvcCatalogPathInRepo    = "pipelines/managed/fbc-release/fbc-release.yaml"
 )
 
-var snapshot *appservice.Snapshot
-var releaseCR *releaseapi.Release
-var pipelineRun *pipeline.PipelineRun
-var err error
-var devWorkspace = utils.GetEnv(constants.RELEASE_DEV_WORKSPACE_ENV, constants.DevReleaseTeam)
-var managedWorkspace = utils.GetEnv(constants.RELEASE_MANAGED_WORKSPACE_ENV, constants.ManagedReleaseTeam)
-var devFw *framework.Framework
-var managedFw *framework.Framework
+var (
+	devWorkspace = utils.GetEnv(constants.RELEASE_DEV_WORKSPACE_ENV, constants.DevReleaseTeam)
+	managedWorkspace = utils.GetEnv(constants.RELEASE_MANAGED_WORKSPACE_ENV, constants.ManagedReleaseTeam)
+	devFw *framework.Framework
+	managedFw *framework.Framework
+	snapshot *appservice.Snapshot
+	releaseCR *releaseapi.Release
+	pipelineRun *pipeline.PipelineRun
+	fbcComponent *appservice.Component
+	err error
+
+	// PaC related variables
+	fbcPacBranchName string
+	fbcCompBaseBranchName string
+)
 
 var _ = framework.ReleasePipelinesSuiteDescribe("FBC e2e-tests", Label("release-pipelines", "fbc-tests"), func() {
 	defer GinkgoRecover()
 
-	var devNamespace = devWorkspace + "-tenant"
-	var managedNamespace = managedWorkspace + "-tenant"
-
-	var issueId = "bz12345"
-	var productName = "preGA-product"
-	var productVersion = "v2"
-	var fbcApplicationName = "fbc-pipelines-app-" + util.GenerateRandomString(4)
-	var fbcStagedAppName = "fbc-staged-app-" + util.GenerateRandomString(4)
-	var fbcHotfixAppName = "fbc-hotfix-app-" + util.GenerateRandomString(4)
-	var fbcPreGAAppName = "fbc-prega-app-" + util.GenerateRandomString(4)
-	var fbcComponentName = "fbc-pipelines-comp-" + util.GenerateRandomString(4)
-	var fbcStagedCompName = "fbc-staged-comp-" + util.GenerateRandomString(4)
-	var fbcHotfixCompName = "fbc-hotfix-comp-" + util.GenerateRandomString(4)
-	var fbcPreGACompName = "fbc-prega-comp-" + util.GenerateRandomString(4)
-	var fbcReleasePlanName = "fbc-pipelines-rp-" + util.GenerateRandomString(4)
-	var fbcStagedRPName = "fbc-staged-rp-" + util.GenerateRandomString(4)
-	var fbcHotfixRPName = "fbc-hotfix-rp-" + util.GenerateRandomString(4)
-	var fbcPreGARPName = "fbc-prega-rp-" + util.GenerateRandomString(4)
-	var fbcReleasePlanAdmissionName = "fbc-pipelines-rpa-" + util.GenerateRandomString(4)
-	var fbcStagedRPAName = "fbc-staged-rpa-" + util.GenerateRandomString(4)
-	var fbcHotfixRPAName = "fbc-hotfix-rpa-" + util.GenerateRandomString(4)
-	var fbcPreGARPAName = "fbc-prega-rpa-" + util.GenerateRandomString(4)
-	var fbcEnterpriseContractPolicyName = "fbc-pipelines-policy-" + util.GenerateRandomString(4)
-	var fbcStagedECPolicyName = "fbc-staged-policy-" + util.GenerateRandomString(4)
-	var fbcHotfixECPolicyName = "fbc-hotfix-policy-" + util.GenerateRandomString(4)
-	var fbcPreGAECPolicyName = "fbc-prega-policy-" + util.GenerateRandomString(4)
-	var sampleImage	= "quay.io/hacbs-release-tests/fbc-sample-repo@sha256:857814679c1deec5bc5d6d8064832b4c0af40dcb07dad57c48f23e5ba6926aed"
+	var (
+		devNamespace = devWorkspace + "-tenant"
+		managedNamespace = managedWorkspace + "-tenant"
+
+		issueId = "bz12345"
+		productName = "preGA-product"
+		productVersion = "v2"
+		
+		fbcApplicationName = "fbc-pipelines-app-" + util.GenerateRandomString(4)
+		fbcStagedAppName = "fbc-staged-app-" + util.GenerateRandomString(4)
+		fbcHotfixAppName = "fbc-hotfix-app-" + util.GenerateRandomString(4)
+		fbcPreGAAppName = "fbc-prega-app-" + util.GenerateRandomString(4)
+		
+		fbcReleasePlanName = "fbc-pipelines-rp-" + util.GenerateRandomString(4)
+		fbcStagedRPName = "fbc-staged-rp-" + util.GenerateRandomString(4)
+		fbcHotfixRPName = "fbc-hotfix-rp-" + util.GenerateRandomString(4)
+		fbcPreGARPName = "fbc-prega-rp-" + util.GenerateRandomString(4)
+		
+		fbcReleasePlanAdmissionName = "fbc-pipelines-rpa-" + util.GenerateRandomString(4)
+		fbcStagedRPAName = "fbc-staged-rpa-" + util.GenerateRandomString(4)
+		fbcHotfixRPAName = "fbc-hotfix-rpa-" + util.GenerateRandomString(4)
+		fbcPreGARPAName = "fbc-prega-rpa-" + util.GenerateRandomString(4)
+		
+		fbcEnterpriseContractPolicyName = "fbc-pipelines-policy-" + util.GenerateRandomString(4)
+		fbcStagedECPolicyName = "fbc-staged-policy-" + util.GenerateRandomString(4)
+		fbcHotfixECPolicyName = "fbc-hotfix-policy-" + util.GenerateRandomString(4)
+		fbcPreGAECPolicyName = "fbc-prega-policy-" + util.GenerateRandomString(4)
+	)
 
 	Describe("with FBC happy path", Label("fbcHappyPath"), func() {
 		BeforeAll(func() {
 			devFw = releasecommon.NewFramework(devWorkspace)
 			managedFw = releasecommon.NewFramework(managedWorkspace)
-
 			managedNamespace = managedFw.UserNamespace
 
 			_, err = devFw.AsKubeDeveloper.HasController.CreateApplication(fbcApplicationName, devNamespace)
 			Expect(err).NotTo(HaveOccurred())
-			GinkgoWriter.Println("Created application :", fbcApplicationName)
+			GinkgoWriter.Println("created application :", fbcApplicationName)
 
 			_, err = devFw.AsKubeDeveloper.ReleaseController.CreateReleasePlan(fbcReleasePlanName, devNamespace, fbcApplicationName, managedNamespace, "true", nil, nil, nil)
 			Expect(err).NotTo(HaveOccurred())
 
-			createFBCReleasePlanAdmission(fbcReleasePlanAdmissionName, *managedFw, devNamespace, managedNamespace, fbcApplicationName, fbcEnterpriseContractPolicyName, relSvcCatalogPathInRepo, false, "", false, "", "", false)
+			sourceAuthJson := utils.GetEnv("QUAY_TOKEN", "")
+			Expect(sourceAuthJson).ToNot(BeEmpty())
 
-			createFBCEnterpriseContractPolicy(fbcEnterpriseContractPolicyName, *managedFw, devNamespace, managedNamespace)
-			snapshot, err = releasecommon.CreateSnapshotWithImageSource(*devFw, fbcComponentName, fbcApplicationName, devNamespace, sampleImage, fbcSourceGitURL, fbcGitSrcSHA, "", "", "", "")
-                        Expect(err).ShouldNot(HaveOccurred())
+			secret, err := devFw.AsKubeAdmin.CommonController.GetSecret(devNamespace, releasecommon.QuayTokenSecret)
+			if secret == nil || errors.IsNotFound(err) {
+				_, err = devFw.AsKubeAdmin.CommonController.CreateRegistryAuthSecret(releasecommon.QuayTokenSecret, devNamespace, sourceAuthJson)
+				Expect(err).ToNot(HaveOccurred())
+				err = devFw.AsKubeAdmin.CommonController.LinkSecretToServiceAccount(devNamespace, releasecommon.QuayTokenSecret, constants.DefaultPipelineServiceAccount, true)
+				Expect(err).ToNot(HaveOccurred())
+			}
 
+			createFBCReleasePlanAdmission(fbcReleasePlanAdmissionName, *managedFw, devNamespace, managedNamespace, fbcApplicationName, fbcEnterpriseContractPolicyName, relSvcCatalogPathInRepo, false, "", false, "", "", false)
+			createFBCEnterpriseContractPolicy(fbcEnterpriseContractPolicyName, *managedFw, devNamespace, managedNamespace)
 		})
 
 		AfterAll(func() {
-			devFw = releasecommon.NewFramework(devWorkspace)
-			managedFw = releasecommon.NewFramework(managedWorkspace)
-			// store pipelineRun and Release CR
-			if err = managedFw.AsKubeDeveloper.TektonController.StorePipelineRun(pipelineRun.Name, pipelineRun); err != nil {
-				GinkgoWriter.Printf("failed to store PipelineRun %s:%s: %s\n", pipelineRun.GetNamespace(), pipelineRun.GetName(), err.Error())
-			}
-			if err = managedFw.AsKubeDeveloper.TektonController.StoreTaskRunsForPipelineRun(managedFw.AsKubeDeveloper.CommonController.KubeRest(), pipelineRun); err != nil {
-				GinkgoWriter.Printf("failed to store TaskRuns for PipelineRun %s:%s: %s\n", pipelineRun.GetNamespace(), pipelineRun.GetName(), err.Error())
-			}
 			if err = devFw.AsKubeDeveloper.ReleaseController.StoreRelease(releaseCR); err != nil {
 				GinkgoWriter.Printf("failed to store Release %s:%s: %s\n", releaseCR.GetNamespace(), releaseCR.GetName(), err.Error())
 			}
+			// delete CRs			
 			Expect(devFw.AsKubeDeveloper.HasController.DeleteApplication(fbcApplicationName, devNamespace, false)).NotTo(HaveOccurred())
 			Expect(managedFw.AsKubeDeveloper.TektonController.DeleteEnterpriseContractPolicy(fbcEnterpriseContractPolicyName, managedNamespace, false)).NotTo(HaveOccurred())
 			Expect(managedFw.AsKubeDeveloper.ReleaseController.DeleteReleasePlanAdmission(fbcReleasePlanAdmissionName, managedNamespace, false)).NotTo(HaveOccurred())
+			deleteTestBranches()
 		})
 
 		var _ = Describe("Post-release verification", func() {
+			It(fmt.Sprintf("creates component from git source %s", fbcSourceGitURL), func() {
+				fbcComponent, fbcPacBranchName, fbcCompBaseBranchName = releasecommon.CreateComponentWithNewBranch(*devFw, devNamespace, fbcApplicationName, fbcCompRepoName, fbcSourceGitURL, fbcCompRevision, "4.13", fbcDockerFilePath, utils.MergeMaps(utils.MergeMaps(constants.ComponentPaCRequestAnnotation, constants.ImageControllerAnnotationRequestPublicRepo), constants.DefaultFbcBuilderPipelineBundle))
+				GinkgoWriter.Printf("Component %s is created", fbcComponent.GetName())
+			})
+
+			It("Creates a push snapshot for a release", func() {
+				snapshot = releasecommon.CreatePushSnapshot(devWorkspace, devNamespace, fbcApplicationName, fbcCompRepoName, fbcPacBranchName, pipelineRun, fbcComponent)
+			})
 
 			It("verifies the fbc release pipelinerun is running and succeeds", func() {
-				assertReleasePipelineRunSucceeded(devFw, managedFw, devNamespace, managedNamespace, fbcApplicationName, fbcComponentName)
+				assertReleasePipelineRunSucceeded(devFw, managedFw, devNamespace, managedNamespace, fbcApplicationName, fbcComponent.GetName())
 			})
 
 			It("verifies release CR completed and set succeeded.", func() {
-				assertReleaseCRSucceeded(devFw, devNamespace, managedNamespace, fbcApplicationName, fbcComponentName)
+				assertReleaseCRSucceeded(devFw, devNamespace, managedNamespace, fbcApplicationName, fbcComponent.GetName())
 			})
 		})
 	})
@@ -132,7 +151,7 @@ var _ = framework.ReleasePipelinesSuiteDescribe("FBC e2e-tests", Label("release-
 
 			_, err = devFw.AsKubeDeveloper.HasController.CreateApplication(fbcStagedAppName, devNamespace)
 			Expect(err).NotTo(HaveOccurred())
-			GinkgoWriter.Println("Created application :", fbcStagedAppName)
+			GinkgoWriter.Printf("Application %s is created", fbcStagedAppName)
 
 			_, err = devFw.AsKubeDeveloper.ReleaseController.CreateReleasePlan(fbcStagedRPName, devNamespace, fbcStagedAppName, managedNamespace, "true", nil, nil, nil)
 			Expect(err).NotTo(HaveOccurred())
@@ -140,40 +159,38 @@ var _ = framework.ReleasePipelinesSuiteDescribe("FBC e2e-tests", Label("release-
 			createFBCReleasePlanAdmission(fbcStagedRPAName, *managedFw, devNamespace, managedNamespace, fbcStagedAppName, fbcStagedECPolicyName, relSvcCatalogPathInRepo, false, "", false, "", "", true)
 
 			createFBCEnterpriseContractPolicy(fbcStagedECPolicyName, *managedFw, devNamespace, managedNamespace)
-			snapshot, err = releasecommon.CreateSnapshotWithImageSource(*devFw, fbcStagedCompName, fbcStagedAppName, devNamespace, sampleImage, fbcSourceGitURL, fbcGitSrcSHA, "", "", "", "")
-                        Expect(err).ShouldNot(HaveOccurred())
-
 		})
 
 		AfterAll(func() {
-			devFw = releasecommon.NewFramework(devWorkspace)
-			managedFw = releasecommon.NewFramework(managedWorkspace)
-			// store pipelineRun and Release CR
-			if err = managedFw.AsKubeDeveloper.TektonController.StorePipelineRun(pipelineRun.Name, pipelineRun); err != nil {
-				GinkgoWriter.Printf("failed to store PipelineRun %s:%s: %s\n", pipelineRun.GetNamespace(), pipelineRun.GetName(), err.Error())
-			}
-			if err = managedFw.AsKubeDeveloper.TektonController.StoreTaskRunsForPipelineRun(managedFw.AsKubeDeveloper.CommonController.KubeRest(), pipelineRun); err != nil {
-				GinkgoWriter.Printf("failed to store TaskRuns for PipelineRun %s:%s: %s\n", pipelineRun.GetNamespace(), pipelineRun.GetName(), err.Error())
-			}
 			if err = devFw.AsKubeDeveloper.ReleaseController.StoreRelease(releaseCR); err != nil {
 				GinkgoWriter.Printf("failed to store Release %s:%s: %s\n", releaseCR.GetNamespace(), releaseCR.GetName(), err.Error())
 			}
 			Expect(devFw.AsKubeDeveloper.HasController.DeleteApplication(fbcStagedAppName, devNamespace, false)).NotTo(HaveOccurred())
 			Expect(managedFw.AsKubeDeveloper.TektonController.DeleteEnterpriseContractPolicy(fbcStagedECPolicyName, managedNamespace, false)).NotTo(HaveOccurred())
 			Expect(managedFw.AsKubeDeveloper.ReleaseController.DeleteReleasePlanAdmission(fbcStagedRPAName, managedNamespace, false)).NotTo(HaveOccurred())
+			deleteTestBranches()
 		})
 
 		var _ = Describe("Post-release verification", func() {
+			It(fmt.Sprintf("creates component from git source %s", fbcSourceGitURL), func() {
+				fbcComponent, fbcPacBranchName, fbcCompBaseBranchName = releasecommon.CreateComponentWithNewBranch(*devFw, devNamespace, fbcStagedAppName, fbcCompRepoName, fbcSourceGitURL, fbcCompRevision, "4.13", fbcDockerFilePath, utils.MergeMaps(utils.MergeMaps(constants.ComponentPaCRequestAnnotation, constants.ImageControllerAnnotationRequestPublicRepo), constants.DefaultFbcBuilderPipelineBundle))
+				GinkgoWriter.Printf("Component %s is created", fbcComponent.GetName())
+			})
+
+			It("Creates a push snapshot for a release", func() {
+				snapshot = releasecommon.CreatePushSnapshot(devWorkspace, devNamespace, fbcStagedAppName, fbcCompRepoName, fbcPacBranchName, pipelineRun, fbcComponent)
+			})
 
 			It("verifies the fbc release pipelinerun is running and succeeds", func() {
-				assertReleasePipelineRunSucceeded(devFw, managedFw, devNamespace, managedNamespace, fbcStagedAppName, fbcStagedCompName)
+				assertReleasePipelineRunSucceeded(devFw, managedFw, devNamespace, managedNamespace, fbcStagedAppName, fbcComponent.GetName())
 			})
 
 			It("verifies release CR completed and set succeeded.", func() {
-				assertReleaseCRSucceeded(devFw, devNamespace, managedNamespace, fbcStagedAppName, fbcStagedCompName)
+				assertReleaseCRSucceeded(devFw, devNamespace, managedNamespace, fbcStagedAppName, fbcComponent.GetName())
 			})
 		})
 	})
+
 	Describe("with FBC hotfix process", Label("fbcHotfix"), func() {
 
 		BeforeAll(func() {
@@ -182,7 +199,7 @@ var _ = framework.ReleasePipelinesSuiteDescribe("FBC e2e-tests", Label("release-
 
 			_, err = devFw.AsKubeDeveloper.HasController.CreateApplication(fbcHotfixAppName, devNamespace)
 			Expect(err).NotTo(HaveOccurred())
-			GinkgoWriter.Println("Created application :", fbcHotfixAppName)
+			GinkgoWriter.Printf("Application %s is created", fbcHotfixAppName)
 
 			_, err = devFw.AsKubeDeveloper.ReleaseController.CreateReleasePlan(fbcHotfixRPName, devNamespace, fbcHotfixAppName, managedNamespace, "true", nil, nil, nil)
 			Expect(err).NotTo(HaveOccurred())
@@ -190,37 +207,35 @@ var _ = framework.ReleasePipelinesSuiteDescribe("FBC e2e-tests", Label("release-
 			createFBCReleasePlanAdmission(fbcHotfixRPAName, *managedFw, devNamespace, managedNamespace, fbcHotfixAppName, fbcHotfixECPolicyName, relSvcCatalogPathInRepo, true, issueId, false, "", "", false)
 
 			createFBCEnterpriseContractPolicy(fbcHotfixECPolicyName, *managedFw, devNamespace, managedNamespace)
-
-			snapshot, err = releasecommon.CreateSnapshotWithImageSource(*devFw, fbcHotfixCompName, fbcHotfixAppName, devNamespace, sampleImage, fbcSourceGitURL, fbcGitSrcSHA, "", "", "", "")
-                        Expect(err).ShouldNot(HaveOccurred())
 		})
 
 		AfterAll(func() {
-			devFw = releasecommon.NewFramework(devWorkspace)
-			managedFw = releasecommon.NewFramework(managedWorkspace)
-			// store pipelineRun and Release CR
-			if err = managedFw.AsKubeDeveloper.TektonController.StorePipelineRun(pipelineRun.Name, pipelineRun); err != nil {
-				GinkgoWriter.Printf("failed to store PipelineRun %s:%s: %s\n", pipelineRun.GetNamespace(), pipelineRun.GetName(), err.Error())
-			}
-			if err = managedFw.AsKubeDeveloper.TektonController.StoreTaskRunsForPipelineRun(managedFw.AsKubeDeveloper.CommonController.KubeRest(), pipelineRun); err != nil {
-				GinkgoWriter.Printf("failed to store TaskRuns for PipelineRun %s:%s: %s\n", pipelineRun.GetNamespace(), pipelineRun.GetName(), err.Error())
-			}
 			if err = devFw.AsKubeDeveloper.ReleaseController.StoreRelease(releaseCR); err != nil {
 				GinkgoWriter.Printf("failed to store Release %s:%s: %s\n", releaseCR.GetNamespace(), releaseCR.GetName(), err.Error())
 			}
 			Expect(devFw.AsKubeDeveloper.HasController.DeleteApplication(fbcHotfixAppName, devNamespace, false)).NotTo(HaveOccurred())
 			Expect(managedFw.AsKubeDeveloper.TektonController.DeleteEnterpriseContractPolicy(fbcHotfixECPolicyName, managedNamespace, false)).NotTo(HaveOccurred())
 			Expect(managedFw.AsKubeDeveloper.ReleaseController.DeleteReleasePlanAdmission(fbcHotfixRPAName, managedNamespace, false)).NotTo(HaveOccurred())
+			deleteTestBranches()
 		})
 
 		var _ = Describe("FBC hotfix post-release verification", func() {
 
+			It(fmt.Sprintf("creates component from git source %s", fbcSourceGitURL), func() {
+				fbcComponent, fbcPacBranchName, fbcCompBaseBranchName = releasecommon.CreateComponentWithNewBranch(*devFw, devNamespace, fbcHotfixAppName, fbcCompRepoName, fbcSourceGitURL, fbcCompRevision, "4.13", fbcDockerFilePath, utils.MergeMaps(utils.MergeMaps(constants.ComponentPaCRequestAnnotation, constants.ImageControllerAnnotationRequestPublicRepo), constants.DefaultFbcBuilderPipelineBundle))
+				GinkgoWriter.Printf("Component %s is created", fbcComponent.GetName())
+			})
+
+			It("Creates a push snapshot for a release", func() {
+				snapshot = releasecommon.CreatePushSnapshot(devWorkspace, devNamespace, fbcHotfixAppName, fbcCompRepoName, fbcPacBranchName, pipelineRun, fbcComponent)
+			})
+
 			It("verifies the fbc release pipelinerun is running and succeeds", func() {
-				assertReleasePipelineRunSucceeded(devFw, managedFw, devNamespace, managedNamespace, fbcHotfixAppName, fbcHotfixCompName)
+				assertReleasePipelineRunSucceeded(devFw, managedFw, devNamespace, managedNamespace, fbcHotfixAppName, fbcComponent.GetName())
 			})
 
 			It("verifies release CR completed and set succeeded.", func() {
-				assertReleaseCRSucceeded(devFw, devNamespace, managedNamespace, fbcHotfixAppName, fbcHotfixCompName)
+				assertReleaseCRSucceeded(devFw, devNamespace, managedNamespace, fbcHotfixAppName, fbcComponent.GetName())
 			})
 		})
 	})
@@ -233,50 +248,48 @@ var _ = framework.ReleasePipelinesSuiteDescribe("FBC e2e-tests", Label("release-
 
 			_, err = devFw.AsKubeDeveloper.HasController.CreateApplication(fbcPreGAAppName, devNamespace)
 			Expect(err).NotTo(HaveOccurred())
-			GinkgoWriter.Println("Created application :", fbcPreGAAppName)
+			GinkgoWriter.Printf("Application %s is created", fbcPreGAAppName)
 
 			_, err = devFw.AsKubeDeveloper.ReleaseController.CreateReleasePlan(fbcPreGARPName, devNamespace, fbcPreGAAppName, managedNamespace, "true", nil, nil, nil)
 			Expect(err).NotTo(HaveOccurred())
 
 			createFBCEnterpriseContractPolicy(fbcPreGAECPolicyName, *managedFw, devNamespace, managedNamespace)
 			createFBCReleasePlanAdmission(fbcPreGARPAName, *managedFw, devNamespace, managedNamespace, fbcPreGAAppName, fbcPreGAECPolicyName, relSvcCatalogPathInRepo, false, issueId, true, productName, productVersion, false)
-
-			snapshot, err = releasecommon.CreateSnapshotWithImageSource(*devFw, fbcPreGACompName, fbcPreGAAppName, devNamespace, sampleImage, fbcSourceGitURL, fbcGitSrcSHA, "", "", "", "")
-                        Expect(err).ShouldNot(HaveOccurred())
 		})
 
 		AfterAll(func() {
-			devFw = releasecommon.NewFramework(devWorkspace)
-			managedFw = releasecommon.NewFramework(managedWorkspace)
-			// store pipelineRun and Release CR
-			if err = managedFw.AsKubeDeveloper.TektonController.StorePipelineRun(pipelineRun.Name, pipelineRun); err != nil {
-				GinkgoWriter.Printf("failed to store PipelineRun %s:%s: %s\n", pipelineRun.GetNamespace(), pipelineRun.GetName(), err.Error())
-			}
-			if err = managedFw.AsKubeDeveloper.TektonController.StoreTaskRunsForPipelineRun(managedFw.AsKubeDeveloper.CommonController.KubeRest(), pipelineRun); err != nil {
-				GinkgoWriter.Printf("failed to store TaskRuns for PipelineRun %s:%s: %s\n", pipelineRun.GetNamespace(), pipelineRun.GetName(), err.Error())
-			}
 			if err = devFw.AsKubeDeveloper.ReleaseController.StoreRelease(releaseCR); err != nil {
 				GinkgoWriter.Printf("failed to store Release %s:%s: %s\n", releaseCR.GetNamespace(), releaseCR.GetName(), err.Error())
 			}
 			Expect(devFw.AsKubeDeveloper.HasController.DeleteApplication(fbcPreGAAppName, devNamespace, false)).NotTo(HaveOccurred())
 			Expect(managedFw.AsKubeDeveloper.TektonController.DeleteEnterpriseContractPolicy(fbcPreGAECPolicyName, managedNamespace, false)).NotTo(HaveOccurred())
 			Expect(managedFw.AsKubeDeveloper.ReleaseController.DeleteReleasePlanAdmission(fbcPreGARPAName, managedNamespace, false)).NotTo(HaveOccurred())
+			deleteTestBranches()
 		})
 
 		var _ = Describe("FBC pre-GA post-release verification", func() {
+			It(fmt.Sprintf("creates component from git source %s", fbcSourceGitURL), func() {
+				fbcComponent, fbcPacBranchName, fbcCompBaseBranchName = releasecommon.CreateComponentWithNewBranch(*devFw, devNamespace, fbcPreGAAppName, fbcCompRepoName, fbcSourceGitURL, fbcCompRevision, "4.13", fbcDockerFilePath, utils.MergeMaps(utils.MergeMaps(constants.ComponentPaCRequestAnnotation, constants.ImageControllerAnnotationRequestPublicRepo), constants.DefaultFbcBuilderPipelineBundle))
+				GinkgoWriter.Printf("Component %s is created", fbcComponent.GetName())
+			})
+
+			It("Creates a push snapshot for a release", func() {
+				snapshot = releasecommon.CreatePushSnapshot(devWorkspace, devNamespace, fbcPreGAAppName, fbcCompRepoName, fbcPacBranchName, pipelineRun, fbcComponent)
+			})
 
 			It("verifies the fbc release pipelinerun is running and succeeds", func() {
-				assertReleasePipelineRunSucceeded(devFw, managedFw, devNamespace, managedNamespace, fbcPreGAAppName, fbcPreGACompName)
+				assertReleasePipelineRunSucceeded(devFw, managedFw, devNamespace, managedNamespace, fbcPreGAAppName, fbcComponent.GetName())
 			})
 
 			It("verifies release CR completed and set succeeded.", func() {
-				assertReleaseCRSucceeded(devFw, devNamespace, managedNamespace, fbcPreGAAppName, fbcPreGACompName)
+				assertReleaseCRSucceeded(devFw, devNamespace, managedNamespace, fbcPreGAAppName, fbcComponent.GetName())
 			})
 		})
 	})
 })
 
 func assertReleasePipelineRunSucceeded(devFw, managedFw *framework.Framework, devNamespace, managedNamespace, fbcAppName string, componentName string) {
+
 	snapshot, err = devFw.AsKubeDeveloper.IntegrationController.WaitForSnapshotToGetCreated("", "", componentName, devNamespace)
 	Expect(err).ToNot(HaveOccurred())
 	GinkgoWriter.Println("snapshot: ", snapshot.Name)
@@ -299,13 +312,14 @@ func assertReleasePipelineRunSucceeded(devFw, managedFw *framework.Framework, de
 			GinkgoWriter.Printf("PipelineRun %s reason: %s\n", pipelineRun.Name, condition.Reason)
 		}
 
-		if !pipelineRun.IsDone(){
+		if !pipelineRun.IsDone() {
 			return fmt.Errorf("PipelineRun %s has still not finished yet", pipelineRun.Name)
 		}
 
 		if pipelineRun.GetStatusCondition().GetCondition(apis.ConditionSucceeded).IsTrue() {
 			return nil
 		} else {
+			storeCRsIntoLog()
 			prLogs := ""
 			if prLogs, err = tekton.GetFailedPipelineRunLogs(managedFw.AsKubeAdmin.ReleaseController.KubeRest(), managedFw.AsKubeAdmin.ReleaseController.KubeInterface(), pipelineRun); err != nil {
 				GinkgoWriter.Printf("failed to get PLR logs: %+v", err)
@@ -360,24 +374,24 @@ func createFBCReleasePlanAdmission(fbcRPAName string, managedFw framework.Framew
 	}
 	if isStagedIndex {
 		targetIndex = ""
-        } else {
+	} else {
 		targetIndex = constants.TargetIndex
 	}
 
 	data, err := json.Marshal(map[string]interface{}{
 		"fbc": map[string]interface{}{
-			"fromIndex":                       constants.FromIndex,
-			"stagedIndex":                     isStagedIndex,
-			"targetIndex":                     targetIndex,
-			"publishingCredentials":           "fbc-preview-publishing-credentials",
-			"requestTimeoutSeconds":           1500,
-			"buildTimeoutSeconds":             1500,
-			"hotfix":                          hotfix,
-			"issueId":                         issueId,
-			"preGA":                           preGA,
-			"productName":                     productName,
-			"productVersion":                  productVersion,
-			"allowedPackages":                 []string{"example-operator"},
+			"fromIndex":             constants.FromIndex,
+			"stagedIndex":           isStagedIndex,
+			"targetIndex":           targetIndex,
+			"publishingCredentials": "fbc-preview-publishing-credentials",
+			"requestTimeoutSeconds": 1500,
+			"buildTimeoutSeconds":   1500,
+			"hotfix":                hotfix,
+			"issueId":               issueId,
+			"preGA":                 preGA,
+			"productName":           productName,
+			"productVersion":        productVersion,
+			"allowedPackages":       []string{"example-operator"},
 		},
 		"sign": map[string]interface{}{
 			"configMapName": "hacbs-signing-pipeline-config-redhatbeta2",
@@ -397,3 +411,28 @@ func createFBCReleasePlanAdmission(fbcRPAName string, managedFw framework.Framew
 	})
 	Expect(err).NotTo(HaveOccurred())
 }
+
+func storeCRsIntoLog() {
+	managedFw = releasecommon.NewFramework(managedWorkspace)
+	// store pipelineRun and Release CR
+	if err = managedFw.AsKubeDeveloper.TektonController.StorePipelineRun(pipelineRun.Name, pipelineRun); err != nil {
+		GinkgoWriter.Printf("failed to store PipelineRun %s:%s: %s\n", pipelineRun.GetNamespace(), pipelineRun.GetName(), err.Error())
+	}
+	if err = managedFw.AsKubeDeveloper.TektonController.StoreTaskRunsForPipelineRun(managedFw.AsKubeDeveloper.CommonController.KubeRest(), pipelineRun); err != nil {
+		GinkgoWriter.Printf("failed to store TaskRuns for PipelineRun %s:%s: %s\n", pipelineRun.GetNamespace(), pipelineRun.GetName(), err.Error())
+	}
+}
+
+func deleteTestBranches() {
+	devFw = releasecommon.NewFramework(devWorkspace)
+	managedFw = releasecommon.NewFramework(managedWorkspace)
+	// Delete new branches created by PaC and a testing branch used as a component's base branch
+	err = devFw.AsKubeDeveloper.CommonController.Github.DeleteRef(fbcCompRepoName, fbcPacBranchName)
+	if err != nil {
+		Expect(err.Error()).To(ContainSubstring(releasecommon.ReferenceDoesntExist))
+	}
+	err = devFw.AsKubeDeveloper.CommonController.Github.DeleteRef(fbcCompRepoName, fbcCompBaseBranchName)
+	if err != nil {
+		Expect(err.Error()).To(ContainSubstring(releasecommon.ReferenceDoesntExist))
+	}
+}
diff --git a/tests/release/releaseLib.go b/tests/release/releaseLib.go
index e2d480bacc..51321063b7 100644
--- a/tests/release/releaseLib.go
+++ b/tests/release/releaseLib.go
@@ -6,13 +6,18 @@ import (
 	"os"
 	"time"
 
-	"github.com/devfile/library/v2/pkg/util"
 	appservice "github.com/konflux-ci/application-api/api/v1alpha1"
 	appstudioApi "github.com/konflux-ci/application-api/api/v1alpha1"
+	"github.com/devfile/library/v2/pkg/util"
+	"github.com/konflux-ci/e2e-tests/pkg/utils/build"
 	"github.com/konflux-ci/e2e-tests/pkg/constants"
 	"github.com/konflux-ci/e2e-tests/pkg/framework"
 	"github.com/konflux-ci/e2e-tests/pkg/utils"
+	"github.com/konflux-ci/e2e-tests/pkg/utils/tekton"
+	ghub "github.com/google/go-github/v44/github"
+	"knative.dev/pkg/apis"
 	releaseApi "github.com/konflux-ci/release-service/api/v1alpha1"
+	pipeline "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1"
 	corev1 "k8s.io/api/core/v1"
 	"k8s.io/apimachinery/pkg/api/errors"
 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -29,6 +34,7 @@ func NewFramework(workspace string) *framework.Framework {
 		KeycloakUrl:     os.Getenv(constants.KEYLOAK_URL_ENV),
 		OfflineToken:    os.Getenv(constants.OFFLINE_TOKEN_ENV),
 	}
+
 	fw, err = framework.NewFrameworkWithTimeout(
 		workspace,
 		time.Minute*60,
@@ -77,6 +83,143 @@ func CreateComponent(devFw framework.Framework, devNamespace, appName, compName,
 	return component
 }
 
+// CreateComponentWithNewBranch will create a new branch, then create the component based on the new branch
+func CreateComponentWithNewBranch(f framework.Framework, testNamespace, applicationName, componentRepoName, componentRepoURL, gitRevision, contextDir, dockerFilePath string, buildPipelineBundle map[string]string) (*appservice.Component, string, string) {
+	var buildPipelineAnnotation map[string]string
+
+	componentName := fmt.Sprintf("%s-%s", "test-component-pac", util.GenerateRandomString(6))
+	testPacBranchName := constants.PaCPullRequestBranchPrefix + componentName
+	componentBaseBranchName := fmt.Sprintf("base-%s", util.GenerateRandomString(6))
+
+	err := f.AsKubeAdmin.CommonController.Github.CreateRef(componentRepoName, "main", gitRevision, componentBaseBranchName)
+	Expect(err).ShouldNot(HaveOccurred())
+
+	if buildPipelineBundle["build.appstudio.openshift.io/pipeline"] != string(`{"name": "fbc-builder", "bundle": "latest"}`) {
+		// deal with some custom pipeline bundle there 
+		buildPipelineAnnotation = build.GetDockerBuildPipelineBundle()
+	} else {
+		buildPipelineAnnotation = constants.DefaultFbcBuilderPipelineBundle
+	}
+
+	componentObj := appservice.ComponentSpec{
+		ComponentName: componentName,
+		Application:   applicationName,
+		Source: appservice.ComponentSource{
+			ComponentSourceUnion: appservice.ComponentSourceUnion{
+				GitSource: &appservice.GitSource{
+					URL:           componentRepoURL,
+					Revision:      componentBaseBranchName,
+					Context:       contextDir,
+					DockerfileURL: dockerFilePath,
+				},
+			},
+		},
+	}
+
+	testComponent, err := f.AsKubeAdmin.HasController.CreateComponent(componentObj, testNamespace, "", "", applicationName, true, utils.MergeMaps(utils.MergeMaps(constants.ComponentPaCRequestAnnotation, constants.ImageControllerAnnotationRequestPublicRepo), buildPipelineAnnotation))
+	Expect(err).NotTo(HaveOccurred())
+
+	return testComponent, testPacBranchName, componentBaseBranchName
+}
+
+func CreatePushSnapshot(devWorkspace, devNamespace, appName, compRepoName, pacBranchName string, pipelineRun *pipeline.PipelineRun, component *appservice.Component) *appservice.Snapshot {
+	var (
+		prSHA string
+		mergeResult *ghub.PullRequestMergeResult
+		prNumber int
+		err error
+		snapshot *appservice.Snapshot
+	)
+
+	devFw := NewFramework(devWorkspace)
+
+	Eventually(func() error {
+		prs, err := devFw.AsKubeAdmin.CommonController.Github.ListPullRequests(compRepoName)
+		Expect(err).NotTo(HaveOccurred())
+		for _, pr := range prs {
+			if pr.Head.GetRef() == pacBranchName {
+				prNumber = pr.GetNumber()
+				prSHA = pr.GetHead().GetSHA()
+				return nil
+			}
+		}
+		return fmt.Errorf("could not get the expected PaC branch name %s", pacBranchName)
+	}, PullRequestCreationTimeout, DefaultPollingInterval).Should(Succeed(), fmt.Sprintf("timed out when waiting for init PaC PR (branch %q) to be created against the %q repo", pacBranchName, compRepoName))
+
+	GinkgoWriter.Printf("PacBranchName: %s, prNumber: %d, prSHA : %s\n", pacBranchName, prNumber, prSHA)
+
+	// We don't need the PipelineRun from a PaC 'pull-request' event to finish, so we can delete it
+	Eventually(func() error {
+		pipelineRun, err = devFw.AsKubeAdmin.HasController.GetComponentPipelineRun(component.GetName(), appName, devNamespace, prSHA)
+		if err == nil {
+			Expect(devFw.AsKubeAdmin.TektonController.DeletePipelineRun(pipelineRun.Name, pipelineRun.Namespace)).To(Succeed())
+			return nil
+		}
+		return err
+	}, PipelineRunStartedTimeout, constants.PipelineRunPollingInterval).Should(Succeed(), fmt.Sprintf("timed out when waiting for `pull-request` event type PaC PipelineRun to be present in the user namespace %q for component %q with a label pointing to %q", devNamespace, component.GetName(), appName))
+
+	GinkgoWriter.Printf("Pac PipelineRun in user namespace %s for component %s is deleted\n", devNamespace, component.GetName())
+
+	Eventually(func() error {
+		mergeResult, err = devFw.AsKubeAdmin.CommonController.Github.MergePullRequest(compRepoName, prNumber)
+		return err
+	}, MergePRTimeout).Should(BeNil(), fmt.Sprintf("error when merging PaC pull request: %+v\n", err))
+
+	headSHA := mergeResult.GetSHA()
+
+	GinkgoWriter.Printf("Pac pull request for component %s is merged, headSHA is %s\n", component.GetName(), headSHA)
+
+	Eventually(func() error {
+		pipelineRun, err = devFw.AsKubeAdmin.HasController.GetComponentPipelineRun(component.GetName(), appName, devNamespace, headSHA)
+		if err != nil {
+			GinkgoWriter.Printf("PipelineRun has not been created yet for component %s/%s\n", devNamespace, component.GetName())
+			return err
+		}
+		if !pipelineRun.HasStarted() {
+			return fmt.Errorf("pipelinerun %s/%s hasn't started yet", pipelineRun.GetNamespace(), pipelineRun.GetName())
+		}
+		return nil
+	}, PipelineRunStartedTimeout, constants.PipelineRunPollingInterval).Should(Succeed(), fmt.Sprintf("timed out when waiting for a PipelineRun in namespace %q with label component label %q and application label %q and sha label %q to start", devNamespace, component.GetName(), appName, headSHA))
+	GinkgoWriter.Printf("PipelineRun for merging PR %s/%s is created\n", pipelineRun.GetNamespace(), pipelineRun.GetName())
+
+	Eventually(func() error {
+		pipelineRun, err = devFw.AsKubeAdmin.HasController.GetComponentPipelineRun(component.GetName(), appName, devNamespace, headSHA)
+		if err != nil {
+			GinkgoWriter.Printf("PipelineRun can't be found any more for component %s/%s\n", devNamespace, component.GetName())
+			return err
+		}
+		if !pipelineRun.IsDone() {
+			return fmt.Errorf("pipelinerun %s/%s has not finished yet", pipelineRun.GetNamespace(), pipelineRun.GetName())
+		}
+		if pipelineRun.GetStatusCondition().GetCondition(apis.ConditionSucceeded).IsTrue() {
+			return nil
+		} else {
+			if err = devFw.AsKubeDeveloper.TektonController.StorePipelineRun(component.GetName(), pipelineRun); err != nil {
+                                GinkgoWriter.Printf("failed to store PipelineRun %s:%s: %s\n", pipelineRun.GetNamespace(), pipelineRun.GetName(), err.Error())
+                        }
+			prLogs := ""
+			if prLogs, err = tekton.GetFailedPipelineRunLogs(devFw.AsKubeAdmin.ReleaseController.KubeRest(),
+				devFw.AsKubeAdmin.ReleaseController.KubeInterface(), pipelineRun); err != nil {
+				GinkgoWriter.Printf("failed to get PLR logs: %+v", err)
+				Expect(err).ShouldNot(HaveOccurred())
+				return nil
+			}
+			GinkgoWriter.Printf("logs: %s", prLogs)
+			Expect(prLogs).To(Equal(""), fmt.Sprintf("PipelineRun %s failed", pipelineRun.Name))
+			return nil
+		}
+	}, BuildPipelineRunCompletionTimeout, constants.PipelineRunPollingInterval).Should(Succeed(), fmt.Sprintf("timed out when waiting for a PipelineRun in namespace %q with label component label %q and application label %q and sha label %q to be finished", devNamespace, component.GetName(), appName, headSHA))
+
+	GinkgoWriter.Printf("PipelineRun for merging PR %s/%s is finished\n", pipelineRun.GetNamespace(), pipelineRun.GetName())
+
+	Eventually(func() error {
+		snapshot, err = devFw.AsKubeAdmin.IntegrationController.GetSnapshot("", pipelineRun.Name, "", devNamespace)
+		return err
+	}, SnapshotTimeout, SnapshotPollingInterval).Should(Succeed(), "timed out when trying to check if the Snapshot exists for PipelineRun %s/%s", devNamespace, pipelineRun.GetName())
+	GinkgoWriter.Printf("Snapshot %s/%s is finished\n", pipelineRun.GetNamespace(), snapshot.GetName())
+	return snapshot
+}
+
 // CreateSnapshotWithImageSource creates a snapshot having two images and sources.
 func CreateSnapshotWithImageSource(fw framework.Framework, componentName, applicationName, namespace, containerImage, gitSourceURL, gitSourceRevision, componentName2, containerImage2, gitSourceURL2, gitSourceRevision2 string) (*appstudioApi.Snapshot, error) {
 	snapshotComponents := []appstudioApi.SnapshotComponent{
@@ -116,19 +259,19 @@ func CreateSnapshotWithImageSource(fw framework.Framework, componentName, applic
 }
 
 func CheckReleaseStatus(releaseCR *releaseApi.Release) error {
-	GinkgoWriter.Println("releaseCR: %s", releaseCR.Name)
+	GinkgoWriter.Println("ReleaseCR: %s", releaseCR.Name)
 	conditions := releaseCR.Status.Conditions
-	GinkgoWriter.Println("len of conditions: %d", len(conditions))
+	GinkgoWriter.Println("Length of Release CR conditions: %d", len(conditions))
 	if len(conditions) > 0 {
 		for _, c := range conditions {
-			GinkgoWriter.Println("type of c: %s", c.Type)
+			GinkgoWriter.Println("Type of Release CR condition: %s", c.Type)
 			if c.Type == "Released" {
-				GinkgoWriter.Println("status of c: %s", c.Status)
+				GinkgoWriter.Println("Status of Release CR condition: %s", c.Status)
 				if c.Status == "True" {
 					GinkgoWriter.Println("Release CR is released")
 					return nil
 				} else if c.Status == "False" && c.Reason == "Progressing" {
-					return fmt.Errorf("release %s/%s is in progressing", releaseCR.GetNamespace(), releaseCR.GetName())
+					return fmt.Errorf("Release %s/%s is in progressing", releaseCR.GetNamespace(), releaseCR.GetName())
 				} else {
 					GinkgoWriter.Println("Release CR failed/skipped")
 					Expect(string(c.Status)).To(Equal("True"), fmt.Sprintf("Release %s failed/skipped", releaseCR.Name))


Reviews:
user: login: johnbieren
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-02-18T15:53:30Z
user: login: jinqi7
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-02-19T00:54:56Z
user: login: johnbieren
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-02-19T16:23:48Z
user: login: jinqi7
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-02-20T00:43:59Z
user: login: johnbieren
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-02-20T16:47:07Z
user: login: jinqi7
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-02-20T23:01:06Z
user: login: johnbieren
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-02-25T19:48:08Z
user: login: jinqi7
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-02-26T09:17:12Z
user: login: johnbieren
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-02-26T13:26:48Z
user: login: jinqi7
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-02-26T13:53:27Z
user: login: johnbieren
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-02-26T13:55:07Z
user: login: jinqi7
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-02-26T14:14:41Z
user: login: johnbieren
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-02-26T14:46:01Z
user: login: jinqi7
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-02-27T01:16:07Z
user: login: johnbieren
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-02-27T17:02:12Z
user: login: jinqi7
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-02-28T07:38:22Z
user: login: psturc
state: APPROVED
author_association: MEMBER
submitted_at: 2025-03-13T22:15:37Z
user: login: theflockers
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-17T09:55:38Z
user: login: theflockers
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-17T09:58:14Z
user: login: theflockers
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-17T09:59:45Z
user: login: theflockers
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-17T10:00:19Z
user: login: theflockers
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-17T10:00:36Z
user: login: theflockers
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-17T10:04:05Z
user: login: theflockers
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-17T10:04:50Z
user: login: jinqi7
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-18T01:15:41Z
user: login: jinqi7
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-18T01:16:11Z
user: login: jinqi7
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-18T01:16:17Z
user: login: jinqi7
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-18T01:16:24Z
user: login: jinqi7
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-18T01:17:36Z
user: login: jinqi7
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-18T01:35:23Z
user: login: theflockers
state: APPROVED
author_association: CONTRIBUTOR
submitted_at: 2025-03-18T09:03:01Z

Review comments:
diff_hunk: @@ -77,6 +81,115 @@ func CreateComponent(devFw framework.Framework, devNamespace, appName, compName,
 	return component
 }
 
+// CreateComponentWithNewBranch will create a new branch, then create the component based on the new branch
path: tests/release/releaseLib.go
user: login: johnbieren
body: Why? Why can't we just use the head of the default branch? Why do we need a new branch to trigger an on-push build?
created_at: 2025-02-18T15:53:30Z
author_association: CONTRIBUTOR
diff_hunk: @@ -77,6 +81,115 @@ func CreateComponent(devFw framework.Framework, devNamespace, appName, compName,
 	return component
 }
 
+// CreateComponentWithNewBranch will create a new branch, then create the component based on the new branch
path: tests/release/releaseLib.go
user: login: jinqi7
body: Creating a new branch will make the test repeatable. It creates a PaC PR and merges it in each test and the branches will be cleaned in the end of the test. If we use the head of default branch, confilcts may happen in parallel runs.
created_at: 2025-02-19T00:54:56Z
author_association: CONTRIBUTOR
diff_hunk: @@ -77,6 +81,115 @@ func CreateComponent(devFw framework.Framework, devNamespace, appName, compName,
 	return component
 }
 
+// CreateComponentWithNewBranch will create a new branch, then create the component based on the new branch
path: tests/release/releaseLib.go
user: login: johnbieren
body: Hmm how do we get conflicts? I thought you could rebuild from head just fine. I have even done it before I think by commenting like `/retest` on the commit or something. The overhead of merging PRs in the repo for each test would be great to avoid
created_at: 2025-02-19T16:23:48Z
author_association: CONTRIBUTOR
diff_hunk: @@ -77,6 +81,115 @@ func CreateComponent(devFw framework.Framework, devNamespace, appName, compName,
 	return component
 }
 
+// CreateComponentWithNewBranch will create a new branch, then create the component based on the new branch
path: tests/release/releaseLib.go
user: login: jinqi7
body: The RELEASE CR is created only by  an "on-push" event which is generated by merging a PR.  Adding comment of `/retest` can't generate an "on-push" event.
created_at: 2025-02-20T00:43:58Z
author_association: CONTRIBUTOR
diff_hunk: @@ -77,6 +81,115 @@ func CreateComponent(devFw framework.Framework, devNamespace, appName, compName,
 	return component
 }
 
+// CreateComponentWithNewBranch will create a new branch, then create the component based on the new branch
path: tests/release/releaseLib.go
user: login: johnbieren
body: Are you sure about that? That doesn't make sense to me. I am not talking about `/retest` on a PR. Like this https://github.com/konflux-ci/release-service/commit/6edf44528b6f2918b7625080d2cf888c6a040376#commitcomment-151860536 
created_at: 2025-02-20T16:47:06Z
author_association: CONTRIBUTOR
diff_hunk: @@ -77,6 +81,115 @@ func CreateComponent(devFw framework.Framework, devNamespace, appName, compName,
 	return component
 }
 
+// CreateComponentWithNewBranch will create a new branch, then create the component based on the new branch
path: tests/release/releaseLib.go
user: login: jinqi7
body: That's my understanding.  I don't understand the link you pasted. Do you mean the comment of "/test" triggered a push event?  
created_at: 2025-02-20T23:01:06Z
author_association: CONTRIBUTOR
diff_hunk: @@ -77,6 +81,115 @@ func CreateComponent(devFw framework.Framework, devNamespace, appName, compName,
 	return component
 }
 
+// CreateComponentWithNewBranch will create a new branch, then create the component based on the new branch
path: tests/release/releaseLib.go
user: login: johnbieren
body: Yes, that is what I mean. It started a new build pipelineRun for me
created_at: 2025-02-25T19:48:08Z
author_association: CONTRIBUTOR
diff_hunk: @@ -77,6 +81,115 @@ func CreateComponent(devFw framework.Framework, devNamespace, appName, compName,
 	return component
 }
 
+// CreateComponentWithNewBranch will create a new branch, then create the component based on the new branch
path: tests/release/releaseLib.go
user: login: jinqi7
body: A "pull request" event also trigger a build pipelineRun, but it doesn't  make a Release CR created.
created_at: 2025-02-26T09:17:12Z
author_association: CONTRIBUTOR
diff_hunk: @@ -77,6 +81,115 @@ func CreateComponent(devFw framework.Framework, devNamespace, appName, compName,
 	return component
 }
 
+// CreateComponentWithNewBranch will create a new branch, then create the component based on the new branch
path: tests/release/releaseLib.go
user: login: johnbieren
body: I'm not sure what that comment is supposed to be getting at. My whole thing was I don't see why we need a pull request event
created_at: 2025-02-26T13:26:48Z
author_association: CONTRIBUTOR
diff_hunk: @@ -77,6 +81,115 @@ func CreateComponent(devFw framework.Framework, devNamespace, appName, compName,
 	return component
 }
 
+// CreateComponentWithNewBranch will create a new branch, then create the component based on the new branch
path: tests/release/releaseLib.go
user: login: jinqi7
body: We need a "push" event to create a Release CR and trigger the release pipeline at last. We need a new branch each time since we can't create a component for one test run with the same branch of a repo twice at the same time. The function is to create a new branch, then create a component each time. 
created_at: 2025-02-26T13:53:26Z
author_association: CONTRIBUTOR
diff_hunk: @@ -77,6 +81,115 @@ func CreateComponent(devFw framework.Framework, devNamespace, appName, compName,
 	return component
 }
 
+// CreateComponentWithNewBranch will create a new branch, then create the component based on the new branch
path: tests/release/releaseLib.go
user: login: johnbieren
body: > we can't create a component for one test run with the same branch of a repo twice at the same time

Why? 
created_at: 2025-02-26T13:55:07Z
author_association: CONTRIBUTOR
diff_hunk: @@ -77,6 +81,115 @@ func CreateComponent(devFw framework.Framework, devNamespace, appName, compName,
 	return component
 }
 
+// CreateComponentWithNewBranch will create a new branch, then create the component based on the new branch
path: tests/release/releaseLib.go
user: login: jinqi7
body: If you use the same branch to create a second component, it will tell you something like "it's already onboarded" in the status of Component CR. Konflux works in this way currently .
created_at: 2025-02-26T14:14:41Z
author_association: CONTRIBUTOR
diff_hunk: @@ -77,6 +81,115 @@ func CreateComponent(devFw framework.Framework, devNamespace, appName, compName,
 	return component
 }
 
+// CreateComponentWithNewBranch will create a new branch, then create the component based on the new branch
path: tests/release/releaseLib.go
user: login: johnbieren
body: Okay, so this is what my current understanding is:

- Your PR adds a pull request event *and* push
- We can't use the same branch twice

So why not just use a new branch for each test? What is the reason for the pull request? Wouldn't it work to just create a branch for the e2e run then delete it once it finishes?
created_at: 2025-02-26T14:46:01Z
author_association: CONTRIBUTOR
diff_hunk: @@ -77,6 +81,115 @@ func CreateComponent(devFw framework.Framework, devNamespace, appName, compName,
 	return component
 }
 
+// CreateComponentWithNewBranch will create a new branch, then create the component based on the new branch
path: tests/release/releaseLib.go
user: login: jinqi7
body: The pull request event (PaC init PR)  is created automatically. But we need a push event. So, the build pipelineRun is deleted and merge the pull request to create a push event.
created_at: 2025-02-27T01:16:07Z
author_association: CONTRIBUTOR
diff_hunk: @@ -77,6 +81,115 @@ func CreateComponent(devFw framework.Framework, devNamespace, appName, compName,
 	return component
 }
 
+// CreateComponentWithNewBranch will create a new branch, then create the component based on the new branch
path: tests/release/releaseLib.go
user: login: johnbieren
body: Creating a new branch is already a push, no? What is creating a pull request automatically?
created_at: 2025-02-27T17:02:12Z
author_association: CONTRIBUTOR
diff_hunk: @@ -77,6 +81,115 @@ func CreateComponent(devFw framework.Framework, devNamespace, appName, compName,
 	return component
 }
 
+// CreateComponentWithNewBranch will create a new branch, then create the component based on the new branch
path: tests/release/releaseLib.go
user: login: jinqi7
body: I may need to say a push event that PaC is listening. When the component is created, a PR(to `.tekton/`) is created by PaC automatically.
created_at: 2025-02-28T07:38:22Z
author_association: CONTRIBUTOR
diff_hunk: @@ -5,120 +5,137 @@ import (
 	"fmt"
 	"time"
 
-	"github.com/devfile/library/v2/pkg/util"
-	ecp "github.com/enterprise-contract/enterprise-contract-controller/api/v1alpha1"
 	appservice "github.com/konflux-ci/application-api/api/v1alpha1"
+	ecp "github.com/enterprise-contract/enterprise-contract-controller/api/v1alpha1"
+	"github.com/devfile/library/v2/pkg/util"
 	"github.com/konflux-ci/e2e-tests/pkg/constants"
 	"github.com/konflux-ci/e2e-tests/pkg/framework"
 	"github.com/konflux-ci/e2e-tests/pkg/utils"
 	"github.com/konflux-ci/e2e-tests/pkg/utils/tekton"
+	"k8s.io/apimachinery/pkg/api/errors"
+	"k8s.io/apimachinery/pkg/runtime"
+	"knative.dev/pkg/apis"
 	pipeline "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1"
 	releasecommon "github.com/konflux-ci/e2e-tests/tests/release"
 	releaseapi "github.com/konflux-ci/release-service/api/v1alpha1"
 	tektonutils "github.com/konflux-ci/release-service/tekton/utils"
+
 	. "github.com/onsi/ginkgo/v2"
 	. "github.com/onsi/gomega"
-	"k8s.io/apimachinery/pkg/runtime"
-	"knative.dev/pkg/apis"
 )
 
 const (
-	fbcServiceAccountName   = "release-service-account"
-	fbcSourceGitURL         = "https://github.com/redhat-appstudio-qe/fbc-sample-repo"
-	fbcGitSrcSHA            = "2b04501c777aa4f7ad80f3e233731f3201e5b21b"
-	fbcDockerFilePath       = "catalog.Dockerfile"
-	targetPort              = 50051
-	relSvcCatalogPathInRepo = "pipelines/managed/fbc-release/fbc-release.yaml"
+	fbcServiceAccountName      = "release-service-account"
+	fbcSourceGitURL            = "https://github.com/redhat-appstudio-qe/fbc-sample-repo-test"
+	fbcCompRepoName            = "fbc-sample-repo-test"
+	fbcCompRevision            = "139b6b8d9adca6bd6f0081482ecd284cbedc2681"
+	fbcCompDefaultBranchName   = "main"
+	fbcDockerFilePath          = "catalog.Dockerfile"
+	targetPort                 = 50051
+	relSvcCatalogPathInRepo    = "pipelines/fbc-release/fbc-release.yaml"
 )
 
-var snapshot *appservice.Snapshot
-var releaseCR *releaseapi.Release
-var pipelineRun *pipeline.PipelineRun
-var err error
-var devWorkspace = utils.GetEnv(constants.RELEASE_DEV_WORKSPACE_ENV, constants.DevReleaseTeam)
-var managedWorkspace = utils.GetEnv(constants.RELEASE_MANAGED_WORKSPACE_ENV, constants.ManagedReleaseTeam)
-var devFw *framework.Framework
-var managedFw *framework.Framework
+var (
+	devWorkspace = utils.GetEnv(constants.RELEASE_DEV_WORKSPACE_ENV, constants.DevReleaseTeam)
+	managedWorkspace = utils.GetEnv(constants.RELEASE_MANAGED_WORKSPACE_ENV, constants.ManagedReleaseTeam)
+	devFw *framework.Framework
+	managedFw *framework.Framework
+	snapshot *appservice.Snapshot
+	releaseCR *releaseapi.Release
+	pipelineRun *pipeline.PipelineRun
+	fbcComponent *appservice.Component
+	err error
+
+	// PaC related variables
+	fbcPacBranchName string
+	fbcCompBaseBranchName string
+)
 
 var _ = framework.ReleasePipelinesSuiteDescribe("FBC e2e-tests", Label("release-pipelines", "fbc-tests"), func() {
 	defer GinkgoRecover()
 
-	var devNamespace = devWorkspace + "-tenant"
-	var managedNamespace = managedWorkspace + "-tenant"
-
-	var issueId = "bz12345"
-	var productName = "preGA-product"
-	var productVersion = "v2"
-	var fbcApplicationName = "fbc-pipelines-app-" + util.GenerateRandomString(4)
-	var fbcStagedAppName = "fbc-staged-app-" + util.GenerateRandomString(4)
-	var fbcHotfixAppName = "fbc-hotfix-app-" + util.GenerateRandomString(4)
-	var fbcPreGAAppName = "fbc-prega-app-" + util.GenerateRandomString(4)
-	var fbcComponentName = "fbc-pipelines-comp-" + util.GenerateRandomString(4)
-	var fbcStagedCompName = "fbc-staged-comp-" + util.GenerateRandomString(4)
-	var fbcHotfixCompName = "fbc-hotfix-comp-" + util.GenerateRandomString(4)
-	var fbcPreGACompName = "fbc-prega-comp-" + util.GenerateRandomString(4)
-	var fbcReleasePlanName = "fbc-pipelines-rp-" + util.GenerateRandomString(4)
-	var fbcStagedRPName = "fbc-staged-rp-" + util.GenerateRandomString(4)
-	var fbcHotfixRPName = "fbc-hotfix-rp-" + util.GenerateRandomString(4)
-	var fbcPreGARPName = "fbc-prega-rp-" + util.GenerateRandomString(4)
-	var fbcReleasePlanAdmissionName = "fbc-pipelines-rpa-" + util.GenerateRandomString(4)
-	var fbcStagedRPAName = "fbc-staged-rpa-" + util.GenerateRandomString(4)
-	var fbcHotfixRPAName = "fbc-hotfix-rpa-" + util.GenerateRandomString(4)
-	var fbcPreGARPAName = "fbc-prega-rpa-" + util.GenerateRandomString(4)
-	var fbcEnterpriseContractPolicyName = "fbc-pipelines-policy-" + util.GenerateRandomString(4)
-	var fbcStagedECPolicyName = "fbc-staged-policy-" + util.GenerateRandomString(4)
-	var fbcHotfixECPolicyName = "fbc-hotfix-policy-" + util.GenerateRandomString(4)
-	var fbcPreGAECPolicyName = "fbc-prega-policy-" + util.GenerateRandomString(4)
-	var sampleImage	= "quay.io/hacbs-release-tests/fbc-sample-repo@sha256:857814679c1deec5bc5d6d8064832b4c0af40dcb07dad57c48f23e5ba6926aed"
+	var (
path: tests/release/pipelines/fbc_release.go
user: login: theflockers
body: +1 for adjusting the vars in a single `var {} ` block.
created_at: 2025-03-17T09:55:38Z
author_association: CONTRIBUTOR
diff_hunk: @@ -5,120 +5,137 @@ import (
 	"fmt"
 	"time"
 
-	"github.com/devfile/library/v2/pkg/util"
-	ecp "github.com/enterprise-contract/enterprise-contract-controller/api/v1alpha1"
 	appservice "github.com/konflux-ci/application-api/api/v1alpha1"
+	ecp "github.com/enterprise-contract/enterprise-contract-controller/api/v1alpha1"
+	"github.com/devfile/library/v2/pkg/util"
 	"github.com/konflux-ci/e2e-tests/pkg/constants"
 	"github.com/konflux-ci/e2e-tests/pkg/framework"
 	"github.com/konflux-ci/e2e-tests/pkg/utils"
 	"github.com/konflux-ci/e2e-tests/pkg/utils/tekton"
+	"k8s.io/apimachinery/pkg/api/errors"
+	"k8s.io/apimachinery/pkg/runtime"
+	"knative.dev/pkg/apis"
 	pipeline "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1"
 	releasecommon "github.com/konflux-ci/e2e-tests/tests/release"
 	releaseapi "github.com/konflux-ci/release-service/api/v1alpha1"
 	tektonutils "github.com/konflux-ci/release-service/tekton/utils"
+
 	. "github.com/onsi/ginkgo/v2"
 	. "github.com/onsi/gomega"
-	"k8s.io/apimachinery/pkg/runtime"
-	"knative.dev/pkg/apis"
 )
 
 const (
-	fbcServiceAccountName   = "release-service-account"
-	fbcSourceGitURL         = "https://github.com/redhat-appstudio-qe/fbc-sample-repo"
-	fbcGitSrcSHA            = "2b04501c777aa4f7ad80f3e233731f3201e5b21b"
-	fbcDockerFilePath       = "catalog.Dockerfile"
-	targetPort              = 50051
-	relSvcCatalogPathInRepo = "pipelines/managed/fbc-release/fbc-release.yaml"
+	fbcServiceAccountName      = "release-service-account"
+	fbcSourceGitURL            = "https://github.com/redhat-appstudio-qe/fbc-sample-repo-test"
+	fbcCompRepoName            = "fbc-sample-repo-test"
+	fbcCompRevision            = "139b6b8d9adca6bd6f0081482ecd284cbedc2681"
+	fbcCompDefaultBranchName   = "main"
+	fbcDockerFilePath          = "catalog.Dockerfile"
+	targetPort                 = 50051
+	relSvcCatalogPathInRepo    = "pipelines/fbc-release/fbc-release.yaml"
 )
 
-var snapshot *appservice.Snapshot
-var releaseCR *releaseapi.Release
-var pipelineRun *pipeline.PipelineRun
-var err error
-var devWorkspace = utils.GetEnv(constants.RELEASE_DEV_WORKSPACE_ENV, constants.DevReleaseTeam)
-var managedWorkspace = utils.GetEnv(constants.RELEASE_MANAGED_WORKSPACE_ENV, constants.ManagedReleaseTeam)
-var devFw *framework.Framework
-var managedFw *framework.Framework
+var (
+	devWorkspace = utils.GetEnv(constants.RELEASE_DEV_WORKSPACE_ENV, constants.DevReleaseTeam)
+	managedWorkspace = utils.GetEnv(constants.RELEASE_MANAGED_WORKSPACE_ENV, constants.ManagedReleaseTeam)
+	devFw *framework.Framework
+	managedFw *framework.Framework
+	snapshot *appservice.Snapshot
+	releaseCR *releaseapi.Release
+	pipelineRun *pipeline.PipelineRun
+	fbcComponent *appservice.Component
+	err error
+
+	// PaC related variables
+	fbcPacBranchName string
+	fbcCompBaseBranchName string
+)
 
 var _ = framework.ReleasePipelinesSuiteDescribe("FBC e2e-tests", Label("release-pipelines", "fbc-tests"), func() {
 	defer GinkgoRecover()
 
-	var devNamespace = devWorkspace + "-tenant"
-	var managedNamespace = managedWorkspace + "-tenant"
-
-	var issueId = "bz12345"
-	var productName = "preGA-product"
-	var productVersion = "v2"
-	var fbcApplicationName = "fbc-pipelines-app-" + util.GenerateRandomString(4)
-	var fbcStagedAppName = "fbc-staged-app-" + util.GenerateRandomString(4)
-	var fbcHotfixAppName = "fbc-hotfix-app-" + util.GenerateRandomString(4)
-	var fbcPreGAAppName = "fbc-prega-app-" + util.GenerateRandomString(4)
-	var fbcComponentName = "fbc-pipelines-comp-" + util.GenerateRandomString(4)
-	var fbcStagedCompName = "fbc-staged-comp-" + util.GenerateRandomString(4)
-	var fbcHotfixCompName = "fbc-hotfix-comp-" + util.GenerateRandomString(4)
-	var fbcPreGACompName = "fbc-prega-comp-" + util.GenerateRandomString(4)
-	var fbcReleasePlanName = "fbc-pipelines-rp-" + util.GenerateRandomString(4)
-	var fbcStagedRPName = "fbc-staged-rp-" + util.GenerateRandomString(4)
-	var fbcHotfixRPName = "fbc-hotfix-rp-" + util.GenerateRandomString(4)
-	var fbcPreGARPName = "fbc-prega-rp-" + util.GenerateRandomString(4)
-	var fbcReleasePlanAdmissionName = "fbc-pipelines-rpa-" + util.GenerateRandomString(4)
-	var fbcStagedRPAName = "fbc-staged-rpa-" + util.GenerateRandomString(4)
-	var fbcHotfixRPAName = "fbc-hotfix-rpa-" + util.GenerateRandomString(4)
-	var fbcPreGARPAName = "fbc-prega-rpa-" + util.GenerateRandomString(4)
-	var fbcEnterpriseContractPolicyName = "fbc-pipelines-policy-" + util.GenerateRandomString(4)
-	var fbcStagedECPolicyName = "fbc-staged-policy-" + util.GenerateRandomString(4)
-	var fbcHotfixECPolicyName = "fbc-hotfix-policy-" + util.GenerateRandomString(4)
-	var fbcPreGAECPolicyName = "fbc-prega-policy-" + util.GenerateRandomString(4)
-	var sampleImage	= "quay.io/hacbs-release-tests/fbc-sample-repo@sha256:857814679c1deec5bc5d6d8064832b4c0af40dcb07dad57c48f23e5ba6926aed"
+	var (
+		devNamespace = devWorkspace + "-tenant"
+		managedNamespace = managedWorkspace + "-tenant"
+
+		issueId = "bz12345"
+		productName = "preGA-product"
+		productVersion = "v2"
+		
+		fbcApplicationName = "fbc-pipelines-app-" + util.GenerateRandomString(4)
+		fbcStagedAppName = "fbc-staged-app-" + util.GenerateRandomString(4)
+		fbcHotfixAppName = "fbc-hotfix-app-" + util.GenerateRandomString(4)
+		fbcPreGAAppName = "fbc-prega-app-" + util.GenerateRandomString(4)
+		
+		fbcReleasePlanName = "fbc-pipelines-rp-" + util.GenerateRandomString(4)
+		fbcStagedRPName = "fbc-staged-rp-" + util.GenerateRandomString(4)
+		fbcHotfixRPName = "fbc-hotfix-rp-" + util.GenerateRandomString(4)
+		fbcPreGARPName = "fbc-prega-rp-" + util.GenerateRandomString(4)
+		
+		fbcReleasePlanAdmissionName = "fbc-pipelines-rpa-" + util.GenerateRandomString(4)
+		fbcStagedRPAName = "fbc-staged-rpa-" + util.GenerateRandomString(4)
+		fbcHotfixRPAName = "fbc-hotfix-rpa-" + util.GenerateRandomString(4)
+		fbcPreGARPAName = "fbc-prega-rpa-" + util.GenerateRandomString(4)
+		
+		fbcEnterpriseContractPolicyName = "fbc-pipelines-policy-" + util.GenerateRandomString(4)
+		fbcStagedECPolicyName = "fbc-staged-policy-" + util.GenerateRandomString(4)
+		fbcHotfixECPolicyName = "fbc-hotfix-policy-" + util.GenerateRandomString(4)
+		fbcPreGAECPolicyName = "fbc-prega-policy-" + util.GenerateRandomString(4)
+	)
 
 	Describe("with FBC happy path", Label("fbcHappyPath"), func() {
 		BeforeAll(func() {
 			devFw = releasecommon.NewFramework(devWorkspace)
 			managedFw = releasecommon.NewFramework(managedWorkspace)
-
 			managedNamespace = managedFw.UserNamespace
 
 			_, err = devFw.AsKubeDeveloper.HasController.CreateApplication(fbcApplicationName, devNamespace)
 			Expect(err).NotTo(HaveOccurred())
-			GinkgoWriter.Println("Created application :", fbcApplicationName)
+			GinkgoWriter.Println("created application :", fbcApplicationName)
 
 			_, err = devFw.AsKubeDeveloper.ReleaseController.CreateReleasePlan(fbcReleasePlanName, devNamespace, fbcApplicationName, managedNamespace, "true", nil, nil, nil)
 			Expect(err).NotTo(HaveOccurred())
 
-			createFBCReleasePlanAdmission(fbcReleasePlanAdmissionName, *managedFw, devNamespace, managedNamespace, fbcApplicationName, fbcEnterpriseContractPolicyName, relSvcCatalogPathInRepo, false, "", false, "", "", false)
+			sourceAuthJson := utils.GetEnv("QUAY_TOKEN", "")
+			Expect(sourceAuthJson).ToNot(BeEmpty())
 
-			createFBCEnterpriseContractPolicy(fbcEnterpriseContractPolicyName, *managedFw, devNamespace, managedNamespace)
-			snapshot, err = releasecommon.CreateSnapshotWithImageSource(*devFw, fbcComponentName, fbcApplicationName, devNamespace, sampleImage, fbcSourceGitURL, fbcGitSrcSHA, "", "", "", "")
-                        Expect(err).ShouldNot(HaveOccurred())
+			secret, err := devFw.AsKubeAdmin.CommonController.GetSecret(devNamespace, releasecommon.QuayTokenSecret)
+			if secret == nil || errors.IsNotFound(err) {
+				_, err = devFw.AsKubeAdmin.CommonController.CreateRegistryAuthSecret(releasecommon.QuayTokenSecret, devNamespace, sourceAuthJson)
+				Expect(err).ToNot(HaveOccurred())
+				err = devFw.AsKubeAdmin.CommonController.LinkSecretToServiceAccount(devNamespace, releasecommon.QuayTokenSecret, constants.DefaultPipelineServiceAccount, true)
+				Expect(err).ToNot(HaveOccurred())
+			}
 
+			createFBCReleasePlanAdmission(fbcReleasePlanAdmissionName, *managedFw, devNamespace, managedNamespace, fbcApplicationName, fbcEnterpriseContractPolicyName, relSvcCatalogPathInRepo, false, "", false, "", "", false)
+			createFBCEnterpriseContractPolicy(fbcEnterpriseContractPolicyName, *managedFw, devNamespace, managedNamespace)
 		})
 
 		AfterAll(func() {
-			devFw = releasecommon.NewFramework(devWorkspace)
-			managedFw = releasecommon.NewFramework(managedWorkspace)
-			// store pipelineRun and Release CR
-			if err = managedFw.AsKubeDeveloper.TektonController.StorePipelineRun(pipelineRun.Name, pipelineRun); err != nil {
-				GinkgoWriter.Printf("failed to store PipelineRun %s:%s: %s\n", pipelineRun.GetNamespace(), pipelineRun.GetName(), err.Error())
-			}
-			if err = managedFw.AsKubeDeveloper.TektonController.StoreTaskRunsForPipelineRun(managedFw.AsKubeDeveloper.CommonController.KubeRest(), pipelineRun); err != nil {
-				GinkgoWriter.Printf("failed to store TaskRuns for PipelineRun %s:%s: %s\n", pipelineRun.GetNamespace(), pipelineRun.GetName(), err.Error())
-			}
-			if err = devFw.AsKubeDeveloper.ReleaseController.StoreRelease(releaseCR); err != nil {
-				GinkgoWriter.Printf("failed to store Release %s:%s: %s\n", releaseCR.GetNamespace(), releaseCR.GetName(), err.Error())
-			}
+			storeCRsIntoLog()
+			// delete CRs			
 			Expect(devFw.AsKubeDeveloper.HasController.DeleteApplication(fbcApplicationName, devNamespace, false)).NotTo(HaveOccurred())
 			Expect(managedFw.AsKubeDeveloper.TektonController.DeleteEnterpriseContractPolicy(fbcEnterpriseContractPolicyName, managedNamespace, false)).NotTo(HaveOccurred())
 			Expect(managedFw.AsKubeDeveloper.ReleaseController.DeleteReleasePlanAdmission(fbcReleasePlanAdmissionName, managedNamespace, false)).NotTo(HaveOccurred())
+			deleteTestBranches()
 		})
 
 		var _ = Describe("Post-release verification", func() {
+			It(fmt.Sprintf("creates component from git source %s", fbcSourceGitURL), func() {
+				fbcComponent, fbcPacBranchName, fbcCompBaseBranchName = releasecommon.CreateComponentWithNewBranch(*devFw, devNamespace, fbcApplicationName, fbcCompRepoName, fbcSourceGitURL, fbcCompRevision, "4.13", fbcDockerFilePath, utils.MergeMaps(utils.MergeMaps(constants.ComponentPaCRequestAnnotation, constants.ImageControllerAnnotationRequestPublicRepo), constants.DefaultFbcBuilderPipelineBundle))
+				GinkgoWriter.Printf("created component : %s", fbcComponent.GetName())
path: tests/release/pipelines/fbc_release.go
user: login: theflockers
body: the correct should be _component created_
created_at: 2025-03-17T09:58:13Z
author_association: CONTRIBUTOR
diff_hunk: @@ -140,40 +157,36 @@ var _ = framework.ReleasePipelinesSuiteDescribe("FBC e2e-tests", Label("release-
 			createFBCReleasePlanAdmission(fbcStagedRPAName, *managedFw, devNamespace, managedNamespace, fbcStagedAppName, fbcStagedECPolicyName, relSvcCatalogPathInRepo, false, "", false, "", "", true)
 
 			createFBCEnterpriseContractPolicy(fbcStagedECPolicyName, *managedFw, devNamespace, managedNamespace)
-			snapshot, err = releasecommon.CreateSnapshotWithImageSource(*devFw, fbcStagedCompName, fbcStagedAppName, devNamespace, sampleImage, fbcSourceGitURL, fbcGitSrcSHA, "", "", "", "")
-                        Expect(err).ShouldNot(HaveOccurred())
-
 		})
 
 		AfterAll(func() {
-			devFw = releasecommon.NewFramework(devWorkspace)
-			managedFw = releasecommon.NewFramework(managedWorkspace)
-			// store pipelineRun and Release CR
-			if err = managedFw.AsKubeDeveloper.TektonController.StorePipelineRun(pipelineRun.Name, pipelineRun); err != nil {
-				GinkgoWriter.Printf("failed to store PipelineRun %s:%s: %s\n", pipelineRun.GetNamespace(), pipelineRun.GetName(), err.Error())
-			}
-			if err = managedFw.AsKubeDeveloper.TektonController.StoreTaskRunsForPipelineRun(managedFw.AsKubeDeveloper.CommonController.KubeRest(), pipelineRun); err != nil {
-				GinkgoWriter.Printf("failed to store TaskRuns for PipelineRun %s:%s: %s\n", pipelineRun.GetNamespace(), pipelineRun.GetName(), err.Error())
-			}
-			if err = devFw.AsKubeDeveloper.ReleaseController.StoreRelease(releaseCR); err != nil {
-				GinkgoWriter.Printf("failed to store Release %s:%s: %s\n", releaseCR.GetNamespace(), releaseCR.GetName(), err.Error())
-			}
+			storeCRsIntoLog()
 			Expect(devFw.AsKubeDeveloper.HasController.DeleteApplication(fbcStagedAppName, devNamespace, false)).NotTo(HaveOccurred())
 			Expect(managedFw.AsKubeDeveloper.TektonController.DeleteEnterpriseContractPolicy(fbcStagedECPolicyName, managedNamespace, false)).NotTo(HaveOccurred())
 			Expect(managedFw.AsKubeDeveloper.ReleaseController.DeleteReleasePlanAdmission(fbcStagedRPAName, managedNamespace, false)).NotTo(HaveOccurred())
+			deleteTestBranches()
 		})
 
 		var _ = Describe("Post-release verification", func() {
+			It(fmt.Sprintf("creates component from git source %s", fbcSourceGitURL), func() {
+				fbcComponent, fbcPacBranchName, fbcCompBaseBranchName = releasecommon.CreateComponentWithNewBranch(*devFw, devNamespace, fbcStagedAppName, fbcCompRepoName, fbcSourceGitURL, fbcCompRevision, "4.13", fbcDockerFilePath, utils.MergeMaps(utils.MergeMaps(constants.ComponentPaCRequestAnnotation, constants.ImageControllerAnnotationRequestPublicRepo), constants.DefaultFbcBuilderPipelineBundle))
+				GinkgoWriter.Printf("created component : %s", fbcComponent.GetName())
path: tests/release/pipelines/fbc_release.go
user: login: theflockers
body: same as above.
created_at: 2025-03-17T09:59:45Z
author_association: CONTRIBUTOR
diff_hunk: @@ -190,37 +203,33 @@ var _ = framework.ReleasePipelinesSuiteDescribe("FBC e2e-tests", Label("release-
 			createFBCReleasePlanAdmission(fbcHotfixRPAName, *managedFw, devNamespace, managedNamespace, fbcHotfixAppName, fbcHotfixECPolicyName, relSvcCatalogPathInRepo, true, issueId, false, "", "", false)
 
 			createFBCEnterpriseContractPolicy(fbcHotfixECPolicyName, *managedFw, devNamespace, managedNamespace)
-
-			snapshot, err = releasecommon.CreateSnapshotWithImageSource(*devFw, fbcHotfixCompName, fbcHotfixAppName, devNamespace, sampleImage, fbcSourceGitURL, fbcGitSrcSHA, "", "", "", "")
-                        Expect(err).ShouldNot(HaveOccurred())
 		})
 
 		AfterAll(func() {
-			devFw = releasecommon.NewFramework(devWorkspace)
-			managedFw = releasecommon.NewFramework(managedWorkspace)
-			// store pipelineRun and Release CR
-			if err = managedFw.AsKubeDeveloper.TektonController.StorePipelineRun(pipelineRun.Name, pipelineRun); err != nil {
-				GinkgoWriter.Printf("failed to store PipelineRun %s:%s: %s\n", pipelineRun.GetNamespace(), pipelineRun.GetName(), err.Error())
-			}
-			if err = managedFw.AsKubeDeveloper.TektonController.StoreTaskRunsForPipelineRun(managedFw.AsKubeDeveloper.CommonController.KubeRest(), pipelineRun); err != nil {
-				GinkgoWriter.Printf("failed to store TaskRuns for PipelineRun %s:%s: %s\n", pipelineRun.GetNamespace(), pipelineRun.GetName(), err.Error())
-			}
-			if err = devFw.AsKubeDeveloper.ReleaseController.StoreRelease(releaseCR); err != nil {
-				GinkgoWriter.Printf("failed to store Release %s:%s: %s\n", releaseCR.GetNamespace(), releaseCR.GetName(), err.Error())
-			}
+			storeCRsIntoLog()
 			Expect(devFw.AsKubeDeveloper.HasController.DeleteApplication(fbcHotfixAppName, devNamespace, false)).NotTo(HaveOccurred())
 			Expect(managedFw.AsKubeDeveloper.TektonController.DeleteEnterpriseContractPolicy(fbcHotfixECPolicyName, managedNamespace, false)).NotTo(HaveOccurred())
 			Expect(managedFw.AsKubeDeveloper.ReleaseController.DeleteReleasePlanAdmission(fbcHotfixRPAName, managedNamespace, false)).NotTo(HaveOccurred())
+			deleteTestBranches()
 		})
 
 		var _ = Describe("FBC hotfix post-release verification", func() {
 
+			It(fmt.Sprintf("creates component from git source %s", fbcSourceGitURL), func() {
+				fbcComponent, fbcPacBranchName, fbcCompBaseBranchName = releasecommon.CreateComponentWithNewBranch(*devFw, devNamespace, fbcHotfixAppName, fbcCompRepoName, fbcSourceGitURL, fbcCompRevision, "4.13", fbcDockerFilePath, utils.MergeMaps(utils.MergeMaps(constants.ComponentPaCRequestAnnotation, constants.ImageControllerAnnotationRequestPublicRepo), constants.DefaultFbcBuilderPipelineBundle))
+				GinkgoWriter.Printf("created component : %s", fbcComponent.GetName())
path: tests/release/pipelines/fbc_release.go
user: login: theflockers
body: same :D
created_at: 2025-03-17T10:00:19Z
author_association: CONTRIBUTOR
diff_hunk: @@ -240,43 +249,39 @@ var _ = framework.ReleasePipelinesSuiteDescribe("FBC e2e-tests", Label("release-
 
 			createFBCEnterpriseContractPolicy(fbcPreGAECPolicyName, *managedFw, devNamespace, managedNamespace)
 			createFBCReleasePlanAdmission(fbcPreGARPAName, *managedFw, devNamespace, managedNamespace, fbcPreGAAppName, fbcPreGAECPolicyName, relSvcCatalogPathInRepo, false, issueId, true, productName, productVersion, false)
-
-			snapshot, err = releasecommon.CreateSnapshotWithImageSource(*devFw, fbcPreGACompName, fbcPreGAAppName, devNamespace, sampleImage, fbcSourceGitURL, fbcGitSrcSHA, "", "", "", "")
-                        Expect(err).ShouldNot(HaveOccurred())
 		})
 
 		AfterAll(func() {
-			devFw = releasecommon.NewFramework(devWorkspace)
-			managedFw = releasecommon.NewFramework(managedWorkspace)
-			// store pipelineRun and Release CR
-			if err = managedFw.AsKubeDeveloper.TektonController.StorePipelineRun(pipelineRun.Name, pipelineRun); err != nil {
-				GinkgoWriter.Printf("failed to store PipelineRun %s:%s: %s\n", pipelineRun.GetNamespace(), pipelineRun.GetName(), err.Error())
-			}
-			if err = managedFw.AsKubeDeveloper.TektonController.StoreTaskRunsForPipelineRun(managedFw.AsKubeDeveloper.CommonController.KubeRest(), pipelineRun); err != nil {
-				GinkgoWriter.Printf("failed to store TaskRuns for PipelineRun %s:%s: %s\n", pipelineRun.GetNamespace(), pipelineRun.GetName(), err.Error())
-			}
-			if err = devFw.AsKubeDeveloper.ReleaseController.StoreRelease(releaseCR); err != nil {
-				GinkgoWriter.Printf("failed to store Release %s:%s: %s\n", releaseCR.GetNamespace(), releaseCR.GetName(), err.Error())
-			}
+			storeCRsIntoLog()
 			Expect(devFw.AsKubeDeveloper.HasController.DeleteApplication(fbcPreGAAppName, devNamespace, false)).NotTo(HaveOccurred())
 			Expect(managedFw.AsKubeDeveloper.TektonController.DeleteEnterpriseContractPolicy(fbcPreGAECPolicyName, managedNamespace, false)).NotTo(HaveOccurred())
 			Expect(managedFw.AsKubeDeveloper.ReleaseController.DeleteReleasePlanAdmission(fbcPreGARPAName, managedNamespace, false)).NotTo(HaveOccurred())
+			deleteTestBranches()
 		})
 
 		var _ = Describe("FBC pre-GA post-release verification", func() {
+			It(fmt.Sprintf("creates component from git source %s", fbcSourceGitURL), func() {
+				fbcComponent, fbcPacBranchName, fbcCompBaseBranchName = releasecommon.CreateComponentWithNewBranch(*devFw, devNamespace, fbcPreGAAppName, fbcCompRepoName, fbcSourceGitURL, fbcCompRevision, "4.13", fbcDockerFilePath, utils.MergeMaps(utils.MergeMaps(constants.ComponentPaCRequestAnnotation, constants.ImageControllerAnnotationRequestPublicRepo), constants.DefaultFbcBuilderPipelineBundle))
+				GinkgoWriter.Printf("created component : %s", fbcComponent.GetName())
path: tests/release/pipelines/fbc_release.go
user: login: theflockers
body: one more :D:D
created_at: 2025-03-17T10:00:36Z
author_association: CONTRIBUTOR
diff_hunk: @@ -77,6 +81,115 @@ func CreateComponent(devFw framework.Framework, devNamespace, appName, compName,
 	return component
 }
 
+// CreateComponentWithNewBranch will create a new branch, then create the component based on the new branch
+func CreateComponentWithNewBranch(f framework.Framework, testNamespace, applicationName, componentRepoName, componentRepoURL, gitRevision, contextDir, dockerFilePath string, buildPipelineBundle map[string]string) (*appservice.Component, string, string) {
+	var buildPipelineAnnotation map[string]string
+
+	componentName := fmt.Sprintf("%s-%s", "test-component-pac", util.GenerateRandomString(6))
+	testPacBranchName := constants.PaCPullRequestBranchPrefix + componentName
+	componentBaseBranchName := fmt.Sprintf("base-%s", util.GenerateRandomString(6))
+
+	err := f.AsKubeAdmin.CommonController.Github.CreateRef(componentRepoName, "main", gitRevision, componentBaseBranchName)
+	Expect(err).ShouldNot(HaveOccurred())
+
+	if buildPipelineBundle["build.appstudio.openshift.io/pipeline"] != string(`{"name": "fbc-builder", "bundle": "latest"}`) {
+		// deal with some custom pipeline bundle there 
+		buildPipelineAnnotation = build.GetDockerBuildPipelineBundle()
+	} else {
+		buildPipelineAnnotation = constants.DefaultFbcBuilderPipelineBundle
+	}
+
+	componentObj := appservice.ComponentSpec{
+		ComponentName: componentName,
+		Application:   applicationName,
+		Source: appservice.ComponentSource{
+			ComponentSourceUnion: appservice.ComponentSourceUnion{
+				GitSource: &appservice.GitSource{
+					URL:           componentRepoURL,
+					Revision:      componentBaseBranchName,
+					Context:       contextDir,
+					DockerfileURL: dockerFilePath,
+				},
+			},
+		},
+	}
+
+	testComponent, err := f.AsKubeAdmin.HasController.CreateComponent(componentObj, testNamespace, "", "", applicationName, true, utils.MergeMaps(utils.MergeMaps(constants.ComponentPaCRequestAnnotation, constants.ImageControllerAnnotationRequestPublicRepo), buildPipelineAnnotation))
+	Expect(err).NotTo(HaveOccurred())
+
+	return testComponent, testPacBranchName, componentBaseBranchName
+}
+
+func CreatePushSnapshot(devWorkspace, devNamespace, appName, compRepoName, pacBranchName string, pipelineRun *pipeline.PipelineRun, component *appservice.Component) *appservice.Snapshot {
+	var prSHA string
path: tests/release/releaseLib.go
user: login: theflockers
body: you could also using the `var( ...)` here.
created_at: 2025-03-17T10:04:05Z
author_association: CONTRIBUTOR
diff_hunk: @@ -116,19 +229,19 @@ func CreateSnapshotWithImageSource(fw framework.Framework, componentName, applic
 }
 
 func CheckReleaseStatus(releaseCR *releaseApi.Release) error {
-	GinkgoWriter.Println("releaseCR: %s", releaseCR.Name)
+	GinkgoWriter.Println("ReleaseCR: %s", releaseCR.Name)
 	conditions := releaseCR.Status.Conditions
-	GinkgoWriter.Println("len of conditions: %d", len(conditions))
+	GinkgoWriter.Println("Len of Release CR conditions: %d", len(conditions))
path: tests/release/releaseLib.go
user: login: theflockers
body: _Length_
created_at: 2025-03-17T10:04:50Z
author_association: CONTRIBUTOR
diff_hunk: @@ -5,120 +5,137 @@ import (
 	"fmt"
 	"time"
 
-	"github.com/devfile/library/v2/pkg/util"
-	ecp "github.com/enterprise-contract/enterprise-contract-controller/api/v1alpha1"
 	appservice "github.com/konflux-ci/application-api/api/v1alpha1"
+	ecp "github.com/enterprise-contract/enterprise-contract-controller/api/v1alpha1"
+	"github.com/devfile/library/v2/pkg/util"
 	"github.com/konflux-ci/e2e-tests/pkg/constants"
 	"github.com/konflux-ci/e2e-tests/pkg/framework"
 	"github.com/konflux-ci/e2e-tests/pkg/utils"
 	"github.com/konflux-ci/e2e-tests/pkg/utils/tekton"
+	"k8s.io/apimachinery/pkg/api/errors"
+	"k8s.io/apimachinery/pkg/runtime"
+	"knative.dev/pkg/apis"
 	pipeline "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1"
 	releasecommon "github.com/konflux-ci/e2e-tests/tests/release"
 	releaseapi "github.com/konflux-ci/release-service/api/v1alpha1"
 	tektonutils "github.com/konflux-ci/release-service/tekton/utils"
+
 	. "github.com/onsi/ginkgo/v2"
 	. "github.com/onsi/gomega"
-	"k8s.io/apimachinery/pkg/runtime"
-	"knative.dev/pkg/apis"
 )
 
 const (
-	fbcServiceAccountName   = "release-service-account"
-	fbcSourceGitURL         = "https://github.com/redhat-appstudio-qe/fbc-sample-repo"
-	fbcGitSrcSHA            = "2b04501c777aa4f7ad80f3e233731f3201e5b21b"
-	fbcDockerFilePath       = "catalog.Dockerfile"
-	targetPort              = 50051
-	relSvcCatalogPathInRepo = "pipelines/managed/fbc-release/fbc-release.yaml"
+	fbcServiceAccountName      = "release-service-account"
+	fbcSourceGitURL            = "https://github.com/redhat-appstudio-qe/fbc-sample-repo-test"
+	fbcCompRepoName            = "fbc-sample-repo-test"
+	fbcCompRevision            = "139b6b8d9adca6bd6f0081482ecd284cbedc2681"
+	fbcCompDefaultBranchName   = "main"
+	fbcDockerFilePath          = "catalog.Dockerfile"
+	targetPort                 = 50051
+	relSvcCatalogPathInRepo    = "pipelines/fbc-release/fbc-release.yaml"
 )
 
-var snapshot *appservice.Snapshot
-var releaseCR *releaseapi.Release
-var pipelineRun *pipeline.PipelineRun
-var err error
-var devWorkspace = utils.GetEnv(constants.RELEASE_DEV_WORKSPACE_ENV, constants.DevReleaseTeam)
-var managedWorkspace = utils.GetEnv(constants.RELEASE_MANAGED_WORKSPACE_ENV, constants.ManagedReleaseTeam)
-var devFw *framework.Framework
-var managedFw *framework.Framework
+var (
+	devWorkspace = utils.GetEnv(constants.RELEASE_DEV_WORKSPACE_ENV, constants.DevReleaseTeam)
+	managedWorkspace = utils.GetEnv(constants.RELEASE_MANAGED_WORKSPACE_ENV, constants.ManagedReleaseTeam)
+	devFw *framework.Framework
+	managedFw *framework.Framework
+	snapshot *appservice.Snapshot
+	releaseCR *releaseapi.Release
+	pipelineRun *pipeline.PipelineRun
+	fbcComponent *appservice.Component
+	err error
+
+	// PaC related variables
+	fbcPacBranchName string
+	fbcCompBaseBranchName string
+)
 
 var _ = framework.ReleasePipelinesSuiteDescribe("FBC e2e-tests", Label("release-pipelines", "fbc-tests"), func() {
 	defer GinkgoRecover()
 
-	var devNamespace = devWorkspace + "-tenant"
-	var managedNamespace = managedWorkspace + "-tenant"
-
-	var issueId = "bz12345"
-	var productName = "preGA-product"
-	var productVersion = "v2"
-	var fbcApplicationName = "fbc-pipelines-app-" + util.GenerateRandomString(4)
-	var fbcStagedAppName = "fbc-staged-app-" + util.GenerateRandomString(4)
-	var fbcHotfixAppName = "fbc-hotfix-app-" + util.GenerateRandomString(4)
-	var fbcPreGAAppName = "fbc-prega-app-" + util.GenerateRandomString(4)
-	var fbcComponentName = "fbc-pipelines-comp-" + util.GenerateRandomString(4)
-	var fbcStagedCompName = "fbc-staged-comp-" + util.GenerateRandomString(4)
-	var fbcHotfixCompName = "fbc-hotfix-comp-" + util.GenerateRandomString(4)
-	var fbcPreGACompName = "fbc-prega-comp-" + util.GenerateRandomString(4)
-	var fbcReleasePlanName = "fbc-pipelines-rp-" + util.GenerateRandomString(4)
-	var fbcStagedRPName = "fbc-staged-rp-" + util.GenerateRandomString(4)
-	var fbcHotfixRPName = "fbc-hotfix-rp-" + util.GenerateRandomString(4)
-	var fbcPreGARPName = "fbc-prega-rp-" + util.GenerateRandomString(4)
-	var fbcReleasePlanAdmissionName = "fbc-pipelines-rpa-" + util.GenerateRandomString(4)
-	var fbcStagedRPAName = "fbc-staged-rpa-" + util.GenerateRandomString(4)
-	var fbcHotfixRPAName = "fbc-hotfix-rpa-" + util.GenerateRandomString(4)
-	var fbcPreGARPAName = "fbc-prega-rpa-" + util.GenerateRandomString(4)
-	var fbcEnterpriseContractPolicyName = "fbc-pipelines-policy-" + util.GenerateRandomString(4)
-	var fbcStagedECPolicyName = "fbc-staged-policy-" + util.GenerateRandomString(4)
-	var fbcHotfixECPolicyName = "fbc-hotfix-policy-" + util.GenerateRandomString(4)
-	var fbcPreGAECPolicyName = "fbc-prega-policy-" + util.GenerateRandomString(4)
-	var sampleImage	= "quay.io/hacbs-release-tests/fbc-sample-repo@sha256:857814679c1deec5bc5d6d8064832b4c0af40dcb07dad57c48f23e5ba6926aed"
+	var (
+		devNamespace = devWorkspace + "-tenant"
+		managedNamespace = managedWorkspace + "-tenant"
+
+		issueId = "bz12345"
+		productName = "preGA-product"
+		productVersion = "v2"
+		
+		fbcApplicationName = "fbc-pipelines-app-" + util.GenerateRandomString(4)
+		fbcStagedAppName = "fbc-staged-app-" + util.GenerateRandomString(4)
+		fbcHotfixAppName = "fbc-hotfix-app-" + util.GenerateRandomString(4)
+		fbcPreGAAppName = "fbc-prega-app-" + util.GenerateRandomString(4)
+		
+		fbcReleasePlanName = "fbc-pipelines-rp-" + util.GenerateRandomString(4)
+		fbcStagedRPName = "fbc-staged-rp-" + util.GenerateRandomString(4)
+		fbcHotfixRPName = "fbc-hotfix-rp-" + util.GenerateRandomString(4)
+		fbcPreGARPName = "fbc-prega-rp-" + util.GenerateRandomString(4)
+		
+		fbcReleasePlanAdmissionName = "fbc-pipelines-rpa-" + util.GenerateRandomString(4)
+		fbcStagedRPAName = "fbc-staged-rpa-" + util.GenerateRandomString(4)
+		fbcHotfixRPAName = "fbc-hotfix-rpa-" + util.GenerateRandomString(4)
+		fbcPreGARPAName = "fbc-prega-rpa-" + util.GenerateRandomString(4)
+		
+		fbcEnterpriseContractPolicyName = "fbc-pipelines-policy-" + util.GenerateRandomString(4)
+		fbcStagedECPolicyName = "fbc-staged-policy-" + util.GenerateRandomString(4)
+		fbcHotfixECPolicyName = "fbc-hotfix-policy-" + util.GenerateRandomString(4)
+		fbcPreGAECPolicyName = "fbc-prega-policy-" + util.GenerateRandomString(4)
+	)
 
 	Describe("with FBC happy path", Label("fbcHappyPath"), func() {
 		BeforeAll(func() {
 			devFw = releasecommon.NewFramework(devWorkspace)
 			managedFw = releasecommon.NewFramework(managedWorkspace)
-
 			managedNamespace = managedFw.UserNamespace
 
 			_, err = devFw.AsKubeDeveloper.HasController.CreateApplication(fbcApplicationName, devNamespace)
 			Expect(err).NotTo(HaveOccurred())
-			GinkgoWriter.Println("Created application :", fbcApplicationName)
+			GinkgoWriter.Println("created application :", fbcApplicationName)
 
 			_, err = devFw.AsKubeDeveloper.ReleaseController.CreateReleasePlan(fbcReleasePlanName, devNamespace, fbcApplicationName, managedNamespace, "true", nil, nil, nil)
 			Expect(err).NotTo(HaveOccurred())
 
-			createFBCReleasePlanAdmission(fbcReleasePlanAdmissionName, *managedFw, devNamespace, managedNamespace, fbcApplicationName, fbcEnterpriseContractPolicyName, relSvcCatalogPathInRepo, false, "", false, "", "", false)
+			sourceAuthJson := utils.GetEnv("QUAY_TOKEN", "")
+			Expect(sourceAuthJson).ToNot(BeEmpty())
 
-			createFBCEnterpriseContractPolicy(fbcEnterpriseContractPolicyName, *managedFw, devNamespace, managedNamespace)
-			snapshot, err = releasecommon.CreateSnapshotWithImageSource(*devFw, fbcComponentName, fbcApplicationName, devNamespace, sampleImage, fbcSourceGitURL, fbcGitSrcSHA, "", "", "", "")
-                        Expect(err).ShouldNot(HaveOccurred())
+			secret, err := devFw.AsKubeAdmin.CommonController.GetSecret(devNamespace, releasecommon.QuayTokenSecret)
+			if secret == nil || errors.IsNotFound(err) {
+				_, err = devFw.AsKubeAdmin.CommonController.CreateRegistryAuthSecret(releasecommon.QuayTokenSecret, devNamespace, sourceAuthJson)
+				Expect(err).ToNot(HaveOccurred())
+				err = devFw.AsKubeAdmin.CommonController.LinkSecretToServiceAccount(devNamespace, releasecommon.QuayTokenSecret, constants.DefaultPipelineServiceAccount, true)
+				Expect(err).ToNot(HaveOccurred())
+			}
 
+			createFBCReleasePlanAdmission(fbcReleasePlanAdmissionName, *managedFw, devNamespace, managedNamespace, fbcApplicationName, fbcEnterpriseContractPolicyName, relSvcCatalogPathInRepo, false, "", false, "", "", false)
+			createFBCEnterpriseContractPolicy(fbcEnterpriseContractPolicyName, *managedFw, devNamespace, managedNamespace)
 		})
 
 		AfterAll(func() {
-			devFw = releasecommon.NewFramework(devWorkspace)
-			managedFw = releasecommon.NewFramework(managedWorkspace)
-			// store pipelineRun and Release CR
-			if err = managedFw.AsKubeDeveloper.TektonController.StorePipelineRun(pipelineRun.Name, pipelineRun); err != nil {
-				GinkgoWriter.Printf("failed to store PipelineRun %s:%s: %s\n", pipelineRun.GetNamespace(), pipelineRun.GetName(), err.Error())
-			}
-			if err = managedFw.AsKubeDeveloper.TektonController.StoreTaskRunsForPipelineRun(managedFw.AsKubeDeveloper.CommonController.KubeRest(), pipelineRun); err != nil {
-				GinkgoWriter.Printf("failed to store TaskRuns for PipelineRun %s:%s: %s\n", pipelineRun.GetNamespace(), pipelineRun.GetName(), err.Error())
-			}
-			if err = devFw.AsKubeDeveloper.ReleaseController.StoreRelease(releaseCR); err != nil {
-				GinkgoWriter.Printf("failed to store Release %s:%s: %s\n", releaseCR.GetNamespace(), releaseCR.GetName(), err.Error())
-			}
+			storeCRsIntoLog()
+			// delete CRs			
 			Expect(devFw.AsKubeDeveloper.HasController.DeleteApplication(fbcApplicationName, devNamespace, false)).NotTo(HaveOccurred())
 			Expect(managedFw.AsKubeDeveloper.TektonController.DeleteEnterpriseContractPolicy(fbcEnterpriseContractPolicyName, managedNamespace, false)).NotTo(HaveOccurred())
 			Expect(managedFw.AsKubeDeveloper.ReleaseController.DeleteReleasePlanAdmission(fbcReleasePlanAdmissionName, managedNamespace, false)).NotTo(HaveOccurred())
+			deleteTestBranches()
 		})
 
 		var _ = Describe("Post-release verification", func() {
+			It(fmt.Sprintf("creates component from git source %s", fbcSourceGitURL), func() {
+				fbcComponent, fbcPacBranchName, fbcCompBaseBranchName = releasecommon.CreateComponentWithNewBranch(*devFw, devNamespace, fbcApplicationName, fbcCompRepoName, fbcSourceGitURL, fbcCompRevision, "4.13", fbcDockerFilePath, utils.MergeMaps(utils.MergeMaps(constants.ComponentPaCRequestAnnotation, constants.ImageControllerAnnotationRequestPublicRepo), constants.DefaultFbcBuilderPipelineBundle))
+				GinkgoWriter.Printf("created component : %s", fbcComponent.GetName())
path: tests/release/pipelines/fbc_release.go
user: login: jinqi7
body: Updated, thanks
created_at: 2025-03-18T01:15:41Z
author_association: CONTRIBUTOR
diff_hunk: @@ -140,40 +157,36 @@ var _ = framework.ReleasePipelinesSuiteDescribe("FBC e2e-tests", Label("release-
 			createFBCReleasePlanAdmission(fbcStagedRPAName, *managedFw, devNamespace, managedNamespace, fbcStagedAppName, fbcStagedECPolicyName, relSvcCatalogPathInRepo, false, "", false, "", "", true)
 
 			createFBCEnterpriseContractPolicy(fbcStagedECPolicyName, *managedFw, devNamespace, managedNamespace)
-			snapshot, err = releasecommon.CreateSnapshotWithImageSource(*devFw, fbcStagedCompName, fbcStagedAppName, devNamespace, sampleImage, fbcSourceGitURL, fbcGitSrcSHA, "", "", "", "")
-                        Expect(err).ShouldNot(HaveOccurred())
-
 		})
 
 		AfterAll(func() {
-			devFw = releasecommon.NewFramework(devWorkspace)
-			managedFw = releasecommon.NewFramework(managedWorkspace)
-			// store pipelineRun and Release CR
-			if err = managedFw.AsKubeDeveloper.TektonController.StorePipelineRun(pipelineRun.Name, pipelineRun); err != nil {
-				GinkgoWriter.Printf("failed to store PipelineRun %s:%s: %s\n", pipelineRun.GetNamespace(), pipelineRun.GetName(), err.Error())
-			}
-			if err = managedFw.AsKubeDeveloper.TektonController.StoreTaskRunsForPipelineRun(managedFw.AsKubeDeveloper.CommonController.KubeRest(), pipelineRun); err != nil {
-				GinkgoWriter.Printf("failed to store TaskRuns for PipelineRun %s:%s: %s\n", pipelineRun.GetNamespace(), pipelineRun.GetName(), err.Error())
-			}
-			if err = devFw.AsKubeDeveloper.ReleaseController.StoreRelease(releaseCR); err != nil {
-				GinkgoWriter.Printf("failed to store Release %s:%s: %s\n", releaseCR.GetNamespace(), releaseCR.GetName(), err.Error())
-			}
+			storeCRsIntoLog()
 			Expect(devFw.AsKubeDeveloper.HasController.DeleteApplication(fbcStagedAppName, devNamespace, false)).NotTo(HaveOccurred())
 			Expect(managedFw.AsKubeDeveloper.TektonController.DeleteEnterpriseContractPolicy(fbcStagedECPolicyName, managedNamespace, false)).NotTo(HaveOccurred())
 			Expect(managedFw.AsKubeDeveloper.ReleaseController.DeleteReleasePlanAdmission(fbcStagedRPAName, managedNamespace, false)).NotTo(HaveOccurred())
+			deleteTestBranches()
 		})
 
 		var _ = Describe("Post-release verification", func() {
+			It(fmt.Sprintf("creates component from git source %s", fbcSourceGitURL), func() {
+				fbcComponent, fbcPacBranchName, fbcCompBaseBranchName = releasecommon.CreateComponentWithNewBranch(*devFw, devNamespace, fbcStagedAppName, fbcCompRepoName, fbcSourceGitURL, fbcCompRevision, "4.13", fbcDockerFilePath, utils.MergeMaps(utils.MergeMaps(constants.ComponentPaCRequestAnnotation, constants.ImageControllerAnnotationRequestPublicRepo), constants.DefaultFbcBuilderPipelineBundle))
+				GinkgoWriter.Printf("created component : %s", fbcComponent.GetName())
path: tests/release/pipelines/fbc_release.go
user: login: jinqi7
body: Updated
created_at: 2025-03-18T01:16:11Z
author_association: CONTRIBUTOR
diff_hunk: @@ -190,37 +203,33 @@ var _ = framework.ReleasePipelinesSuiteDescribe("FBC e2e-tests", Label("release-
 			createFBCReleasePlanAdmission(fbcHotfixRPAName, *managedFw, devNamespace, managedNamespace, fbcHotfixAppName, fbcHotfixECPolicyName, relSvcCatalogPathInRepo, true, issueId, false, "", "", false)
 
 			createFBCEnterpriseContractPolicy(fbcHotfixECPolicyName, *managedFw, devNamespace, managedNamespace)
-
-			snapshot, err = releasecommon.CreateSnapshotWithImageSource(*devFw, fbcHotfixCompName, fbcHotfixAppName, devNamespace, sampleImage, fbcSourceGitURL, fbcGitSrcSHA, "", "", "", "")
-                        Expect(err).ShouldNot(HaveOccurred())
 		})
 
 		AfterAll(func() {
-			devFw = releasecommon.NewFramework(devWorkspace)
-			managedFw = releasecommon.NewFramework(managedWorkspace)
-			// store pipelineRun and Release CR
-			if err = managedFw.AsKubeDeveloper.TektonController.StorePipelineRun(pipelineRun.Name, pipelineRun); err != nil {
-				GinkgoWriter.Printf("failed to store PipelineRun %s:%s: %s\n", pipelineRun.GetNamespace(), pipelineRun.GetName(), err.Error())
-			}
-			if err = managedFw.AsKubeDeveloper.TektonController.StoreTaskRunsForPipelineRun(managedFw.AsKubeDeveloper.CommonController.KubeRest(), pipelineRun); err != nil {
-				GinkgoWriter.Printf("failed to store TaskRuns for PipelineRun %s:%s: %s\n", pipelineRun.GetNamespace(), pipelineRun.GetName(), err.Error())
-			}
-			if err = devFw.AsKubeDeveloper.ReleaseController.StoreRelease(releaseCR); err != nil {
-				GinkgoWriter.Printf("failed to store Release %s:%s: %s\n", releaseCR.GetNamespace(), releaseCR.GetName(), err.Error())
-			}
+			storeCRsIntoLog()
 			Expect(devFw.AsKubeDeveloper.HasController.DeleteApplication(fbcHotfixAppName, devNamespace, false)).NotTo(HaveOccurred())
 			Expect(managedFw.AsKubeDeveloper.TektonController.DeleteEnterpriseContractPolicy(fbcHotfixECPolicyName, managedNamespace, false)).NotTo(HaveOccurred())
 			Expect(managedFw.AsKubeDeveloper.ReleaseController.DeleteReleasePlanAdmission(fbcHotfixRPAName, managedNamespace, false)).NotTo(HaveOccurred())
+			deleteTestBranches()
 		})
 
 		var _ = Describe("FBC hotfix post-release verification", func() {
 
+			It(fmt.Sprintf("creates component from git source %s", fbcSourceGitURL), func() {
+				fbcComponent, fbcPacBranchName, fbcCompBaseBranchName = releasecommon.CreateComponentWithNewBranch(*devFw, devNamespace, fbcHotfixAppName, fbcCompRepoName, fbcSourceGitURL, fbcCompRevision, "4.13", fbcDockerFilePath, utils.MergeMaps(utils.MergeMaps(constants.ComponentPaCRequestAnnotation, constants.ImageControllerAnnotationRequestPublicRepo), constants.DefaultFbcBuilderPipelineBundle))
+				GinkgoWriter.Printf("created component : %s", fbcComponent.GetName())
path: tests/release/pipelines/fbc_release.go
user: login: jinqi7
body: Updated
created_at: 2025-03-18T01:16:17Z
author_association: CONTRIBUTOR
diff_hunk: @@ -240,43 +249,39 @@ var _ = framework.ReleasePipelinesSuiteDescribe("FBC e2e-tests", Label("release-
 
 			createFBCEnterpriseContractPolicy(fbcPreGAECPolicyName, *managedFw, devNamespace, managedNamespace)
 			createFBCReleasePlanAdmission(fbcPreGARPAName, *managedFw, devNamespace, managedNamespace, fbcPreGAAppName, fbcPreGAECPolicyName, relSvcCatalogPathInRepo, false, issueId, true, productName, productVersion, false)
-
-			snapshot, err = releasecommon.CreateSnapshotWithImageSource(*devFw, fbcPreGACompName, fbcPreGAAppName, devNamespace, sampleImage, fbcSourceGitURL, fbcGitSrcSHA, "", "", "", "")
-                        Expect(err).ShouldNot(HaveOccurred())
 		})
 
 		AfterAll(func() {
-			devFw = releasecommon.NewFramework(devWorkspace)
-			managedFw = releasecommon.NewFramework(managedWorkspace)
-			// store pipelineRun and Release CR
-			if err = managedFw.AsKubeDeveloper.TektonController.StorePipelineRun(pipelineRun.Name, pipelineRun); err != nil {
-				GinkgoWriter.Printf("failed to store PipelineRun %s:%s: %s\n", pipelineRun.GetNamespace(), pipelineRun.GetName(), err.Error())
-			}
-			if err = managedFw.AsKubeDeveloper.TektonController.StoreTaskRunsForPipelineRun(managedFw.AsKubeDeveloper.CommonController.KubeRest(), pipelineRun); err != nil {
-				GinkgoWriter.Printf("failed to store TaskRuns for PipelineRun %s:%s: %s\n", pipelineRun.GetNamespace(), pipelineRun.GetName(), err.Error())
-			}
-			if err = devFw.AsKubeDeveloper.ReleaseController.StoreRelease(releaseCR); err != nil {
-				GinkgoWriter.Printf("failed to store Release %s:%s: %s\n", releaseCR.GetNamespace(), releaseCR.GetName(), err.Error())
-			}
+			storeCRsIntoLog()
 			Expect(devFw.AsKubeDeveloper.HasController.DeleteApplication(fbcPreGAAppName, devNamespace, false)).NotTo(HaveOccurred())
 			Expect(managedFw.AsKubeDeveloper.TektonController.DeleteEnterpriseContractPolicy(fbcPreGAECPolicyName, managedNamespace, false)).NotTo(HaveOccurred())
 			Expect(managedFw.AsKubeDeveloper.ReleaseController.DeleteReleasePlanAdmission(fbcPreGARPAName, managedNamespace, false)).NotTo(HaveOccurred())
+			deleteTestBranches()
 		})
 
 		var _ = Describe("FBC pre-GA post-release verification", func() {
+			It(fmt.Sprintf("creates component from git source %s", fbcSourceGitURL), func() {
+				fbcComponent, fbcPacBranchName, fbcCompBaseBranchName = releasecommon.CreateComponentWithNewBranch(*devFw, devNamespace, fbcPreGAAppName, fbcCompRepoName, fbcSourceGitURL, fbcCompRevision, "4.13", fbcDockerFilePath, utils.MergeMaps(utils.MergeMaps(constants.ComponentPaCRequestAnnotation, constants.ImageControllerAnnotationRequestPublicRepo), constants.DefaultFbcBuilderPipelineBundle))
+				GinkgoWriter.Printf("created component : %s", fbcComponent.GetName())
path: tests/release/pipelines/fbc_release.go
user: login: jinqi7
body: Updated
created_at: 2025-03-18T01:16:24Z
author_association: CONTRIBUTOR
diff_hunk: @@ -77,6 +81,115 @@ func CreateComponent(devFw framework.Framework, devNamespace, appName, compName,
 	return component
 }
 
+// CreateComponentWithNewBranch will create a new branch, then create the component based on the new branch
+func CreateComponentWithNewBranch(f framework.Framework, testNamespace, applicationName, componentRepoName, componentRepoURL, gitRevision, contextDir, dockerFilePath string, buildPipelineBundle map[string]string) (*appservice.Component, string, string) {
+	var buildPipelineAnnotation map[string]string
+
+	componentName := fmt.Sprintf("%s-%s", "test-component-pac", util.GenerateRandomString(6))
+	testPacBranchName := constants.PaCPullRequestBranchPrefix + componentName
+	componentBaseBranchName := fmt.Sprintf("base-%s", util.GenerateRandomString(6))
+
+	err := f.AsKubeAdmin.CommonController.Github.CreateRef(componentRepoName, "main", gitRevision, componentBaseBranchName)
+	Expect(err).ShouldNot(HaveOccurred())
+
+	if buildPipelineBundle["build.appstudio.openshift.io/pipeline"] != string(`{"name": "fbc-builder", "bundle": "latest"}`) {
+		// deal with some custom pipeline bundle there 
+		buildPipelineAnnotation = build.GetDockerBuildPipelineBundle()
+	} else {
+		buildPipelineAnnotation = constants.DefaultFbcBuilderPipelineBundle
+	}
+
+	componentObj := appservice.ComponentSpec{
+		ComponentName: componentName,
+		Application:   applicationName,
+		Source: appservice.ComponentSource{
+			ComponentSourceUnion: appservice.ComponentSourceUnion{
+				GitSource: &appservice.GitSource{
+					URL:           componentRepoURL,
+					Revision:      componentBaseBranchName,
+					Context:       contextDir,
+					DockerfileURL: dockerFilePath,
+				},
+			},
+		},
+	}
+
+	testComponent, err := f.AsKubeAdmin.HasController.CreateComponent(componentObj, testNamespace, "", "", applicationName, true, utils.MergeMaps(utils.MergeMaps(constants.ComponentPaCRequestAnnotation, constants.ImageControllerAnnotationRequestPublicRepo), buildPipelineAnnotation))
+	Expect(err).NotTo(HaveOccurred())
+
+	return testComponent, testPacBranchName, componentBaseBranchName
+}
+
+func CreatePushSnapshot(devWorkspace, devNamespace, appName, compRepoName, pacBranchName string, pipelineRun *pipeline.PipelineRun, component *appservice.Component) *appservice.Snapshot {
+	var prSHA string
path: tests/release/releaseLib.go
user: login: jinqi7
body: Updated, thx
created_at: 2025-03-18T01:17:35Z
author_association: CONTRIBUTOR
diff_hunk: @@ -116,19 +229,19 @@ func CreateSnapshotWithImageSource(fw framework.Framework, componentName, applic
 }
 
 func CheckReleaseStatus(releaseCR *releaseApi.Release) error {
-	GinkgoWriter.Println("releaseCR: %s", releaseCR.Name)
+	GinkgoWriter.Println("ReleaseCR: %s", releaseCR.Name)
 	conditions := releaseCR.Status.Conditions
-	GinkgoWriter.Println("len of conditions: %d", len(conditions))
+	GinkgoWriter.Println("Len of Release CR conditions: %d", len(conditions))
path: tests/release/releaseLib.go
user: login: jinqi7
body: Updated!
created_at: 2025-03-18T01:35:22Z
author_association: CONTRIBUTOR

PR comments:
user: login: openshift-ci[bot]
created_at: 2025-02-12T06:02:11Z
body: Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with `/test all`
author_association: NONE
user: login: jinqi7
created_at: 2025-02-12T06:15:08Z
body: /retest
author_association: CONTRIBUTOR
user: login: jinqi7
created_at: 2025-02-12T12:24:53Z
body: /retest
author_association: CONTRIBUTOR
user: login: jinqi7
created_at: 2025-02-13T00:33:41Z
body: /retest
author_association: CONTRIBUTOR
user: login: jinqi7
created_at: 2025-02-13T08:18:21Z
body: /retest
author_association: CONTRIBUTOR
user: login: jinqi7
created_at: 2025-02-13T12:09:37Z
body: /retest
author_association: CONTRIBUTOR
user: login: jinqi7
created_at: 2025-02-14T07:10:31Z
body: /retest
author_association: CONTRIBUTOR
user: login: openshift-ci[bot]
created_at: 2025-03-18T09:03:06Z
body: [APPROVALNOTIFIER] This PR is **APPROVED**

This pull-request has been approved by: *<a href="https://github.com/konflux-ci/e2e-tests/pull/1506#pullrequestreview-2683474597" title="Approved">psturc</a>*, *<a href="https://github.com/konflux-ci/e2e-tests/pull/1506#pullrequestreview-2693564403" title="Approved">theflockers</a>*

The full list of commands accepted by this bot can be found [here](https://go.k8s.io/bot-commands?repo=konflux-ci%2Fe2e-tests).

The pull request process is described [here](https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process)

<details >
Needs approval from an approver in each of these files:

- ~~[tests/release/OWNERS](https://github.com/konflux-ci/e2e-tests/blob/main/tests/release/OWNERS)~~ [psturc,theflockers]

Approvers can indicate their approval by writing `/approve` in a comment
Approvers can cancel approval by writing `/approve cancel` in a comment
</details>
<!-- META={"approvers":[]} -->
author_association: NONE
user: login: theflockers
created_at: 2025-03-18T09:37:38Z
body: /lgtm
author_association: CONTRIBUTOR
user: login: jinqi7
created_at: 2025-03-18T10:45:48Z
body: /retest
author_association: CONTRIBUTOR
user: login: jinqi7
created_at: 2025-03-18T12:16:20Z
body: /retest
author_association: CONTRIBUTOR
user: login: jinqi7
created_at: 2025-03-19T00:23:49Z
body: /retest
author_association: CONTRIBUTOR
user: login: jinqi7
created_at: 2025-03-19T00:57:32Z
body: /retest
author_association: CONTRIBUTOR
user: login: jinqi7
created_at: 2025-03-20T01:48:31Z
body: /retest
author_association: CONTRIBUTOR
user: login: jinqi7
created_at: 2025-03-22T02:33:17Z
body: /retest
author_association: CONTRIBUTOR
user: login: theflockers
created_at: 2025-03-24T12:21:38Z
body: /lgtm
author_association: CONTRIBUTOR