Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(RELEASE-1147): update repository to registry.redhat.io in rpa #1401

Merged
merged 1 commit into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions tests/release/pipelines/multiarch_advisories.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ import (
)

const (
multiarchServiceAccountName = "release-service-account"
multiarchCatalogPathInRepo = "pipelines/rh-advisories/rh-advisories.yaml"
multiarchGitSourceURL = "https://github.com/redhat-appstudio-qe/multi-platform-test-prod"
multiarchGitSourceRepoName = "multi-platform-test-prod"
multiarchGitSrcSHA = "fd4b6c28329ab3df77e7ad7beebac1829836561d"
multiarchServiceAccountName = "release-service-account"
multiarchCatalogPathInRepo = "pipelines/rh-advisories/rh-advisories.yaml"
multiarchGitSourceURL = "https://github.com/redhat-appstudio-qe/multi-platform-test-prod"
multiarchGitSourceRepoName = "multi-platform-test-prod"
multiarchGitSrcSHA = "fd4b6c28329ab3df77e7ad7beebac1829836561d"
)

var multiarchComponentName = "e2e-multi-platform-test"
Expand Down Expand Up @@ -225,17 +225,16 @@ func createMultiArchReleasePlan(multiarchReleasePlanName string, devFw framework
Expect(err).NotTo(HaveOccurred())
}


func createMultiArchReleasePlanAdmission(multiarchRPAName string, managedFw framework.Framework, devNamespace, managedNamespace, multiarchAppName, multiarchECPName, pathInRepoValue string) {
var err error

data, err := json.Marshal(map[string]interface{}{
"mapping": map[string]interface{}{
"components": []map[string]interface{}{
{
"name": multiarchComponentName,
"repository": "quay.io/redhat-pending/rhtap----konflux-release-e2e",
"tags": []string{"latest", "latest-{{ timestamp }}"},
"name": multiarchComponentName,
"repository": "registry.stage.redhat.io/rhtap/konflux-release-e2e",
"tags": []string{"latest", "latest-{{ timestamp }}"},
"source": map[string]interface{}{
"git": map[string]interface{}{
"url": multiarchGitSourceURL,
Expand Down
16 changes: 8 additions & 8 deletions tests/release/pipelines/rh_advisories.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,23 @@ import (
"regexp"
"time"

appservice "github.com/konflux-ci/application-api/api/v1alpha1"
corev1 "k8s.io/api/core/v1"
ecp "github.com/enterprise-contract/enterprise-contract-controller/api/v1alpha1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
appservice "github.com/konflux-ci/application-api/api/v1alpha1"
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"
tektonv1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems to me that these imports were alphabetically ordered, but now they're not. Why this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Format on save on the VS-Code did the auto-formatting when I saved the file. In all the files I need to disable this sometimes it formats unwanted lines.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, it's fine with me. but I'd like @jinqi7 's input on this, since she's the original author of the test.


"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"
"knative.dev/pkg/apis"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/runtime"
"knative.dev/pkg/apis"

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
Expand Down Expand Up @@ -84,7 +84,7 @@ var _ = framework.ReleasePipelinesSuiteDescribe("e2e tests for rh-advisories pip
Expect(err).ToNot(HaveOccurred())

pyxisSecret, err := managedFw.AsKubeAdmin.CommonController.GetSecret(managedNamespace, "pyxis")
if pyxisSecret == nil || errors.IsNotFound(err){
if pyxisSecret == nil || errors.IsNotFound(err) {
secret := &corev1.Secret{
ObjectMeta: metav1.ObjectMeta{
Name: "pyxis",
Expand Down Expand Up @@ -114,7 +114,7 @@ var _ = framework.ReleasePipelinesSuiteDescribe("e2e tests for rh-advisories pip
createADVSEnterpriseContractPolicy(advsEnterpriseContractPolicyName, *managedFw, devNamespace, managedNamespace)

snapshotPush, err = releasecommon.CreateSnapshotWithImageSource(*devFw, advsComponentName, advsApplicationName, devNamespace, sampleImage, advsGitSourceURL, advsGitSrcSHA, "", "", "", "")
Expect(err).ShouldNot(HaveOccurred())
Expect(err).ShouldNot(HaveOccurred())
})

AfterAll(func() {
Expand Down Expand Up @@ -237,7 +237,7 @@ func createADVSReleasePlanAdmission(advsRPAName string, managedFw framework.Fram
"components": []map[string]interface{}{
{
"name": advsComponentName,
"repository": "quay.io/redhat-pending/rhtap----konflux-release-e2e",
"repository": "registry.stage.redhat.io/rhtap/konflux-release-e2e",
"tags": []string{"latest", "latest-{{ timestamp }}", "testtag",
"testtag-{{ timestamp }}", "testtag2", "testtag2-{{ timestamp }}"},
},
Expand All @@ -256,7 +256,7 @@ func createADVSReleasePlanAdmission(advsRPAName string, managedFw framework.Fram
"type": "RHSA",
},
"sign": map[string]interface{}{
"configMapName": "hacbs-signing-pipeline-config-redhatbeta2",
"configMapName": "hacbs-signing-pipeline-config-redhatbeta2",
"cosignSecretName": "test-cosign-secret",
},
})
Expand Down
8 changes: 4 additions & 4 deletions tests/release/pipelines/rh_push_to_redhat_io.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ var _ = framework.ReleasePipelinesSuiteDescribe("e2e tests for rh-push-to-redhat
Expect(err).ToNot(HaveOccurred())

pyxisSecret, err := managedFw.AsKubeAdmin.CommonController.GetSecret(managedNamespace, "pyxis")
if pyxisSecret == nil || errors.IsNotFound(err){
if pyxisSecret == nil || errors.IsNotFound(err) {
secret := &corev1.Secret{
ObjectMeta: metav1.ObjectMeta{
Name: "pyxis",
Expand Down Expand Up @@ -112,7 +112,7 @@ var _ = framework.ReleasePipelinesSuiteDescribe("e2e tests for rh-push-to-redhat

snapshotPush, err = releasecommon.CreateSnapshotWithImageSource(*devFw, rhioComponentName, rhioApplicationName, devNamespace, sampleImage, rhioGitSourceURL, rhioGitSrcSHA, "", "", "", "")
GinkgoWriter.Println("snapshotPush.Name: %s", snapshotPush.GetName())
Expect(err).ShouldNot(HaveOccurred())
Expect(err).ShouldNot(HaveOccurred())
})

AfterAll(func() {
Expand Down Expand Up @@ -202,7 +202,7 @@ func createRHIOReleasePlanAdmission(rhioRPAName string, managedFw framework.Fram
"components": []map[string]interface{}{
{
"name": rhioComponentName,
"repository": "quay.io/redhat-pending/rhtap----konflux-release-e2e",
"repository": "registry.stage.redhat.io/rhtap/konflux-release-e2e",
"tags": []string{"latest", "latest-{{ timestamp }}", "testtag",
"testtag-{{ timestamp }}", "testtag2", "testtag2-{{ timestamp }}"},
},
Expand Down Expand Up @@ -232,7 +232,7 @@ func createRHIOReleasePlanAdmission(rhioRPAName string, managedFw framework.Fram
},
},
"sign": map[string]interface{}{
"configMapName": "hacbs-signing-pipeline-config-redhatbeta2",
"configMapName": "hacbs-signing-pipeline-config-redhatbeta2",
"cosignSecretName": "test-cosign-secret",
},
})
Expand Down
20 changes: 10 additions & 10 deletions tests/release/pipelines/rhtap_service_push.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,22 @@ import (
"strings"
"time"

appservice "github.com/konflux-ci/application-api/api/v1alpha1"
corev1 "k8s.io/api/core/v1"
"github.com/devfile/library/v2/pkg/util"
ecp "github.com/enterprise-contract/enterprise-contract-controller/api/v1alpha1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/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"
appservice "github.com/konflux-ci/application-api/api/v1alpha1"
"github.com/konflux-ci/e2e-tests/pkg/clients/github"
"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"
"github.com/devfile/library/v2/pkg/util"
"knative.dev/pkg/apis"
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"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"knative.dev/pkg/apis"

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
Expand Down Expand Up @@ -126,7 +126,7 @@ var _ = framework.ReleasePipelinesSuiteDescribe("e2e tests for rhtap-service-pus
createRHTAPEnterpriseContractPolicy(rhtapEnterpriseContractPolicyName, *managedFw, devNamespace, managedNamespace)

snapshot, err = releasecommon.CreateSnapshotWithImageSource(*devFw, rhtapComponentName, rhtapApplicationName, devNamespace, sampleImage, rhtapGitSourceURL, rhtapGitSrcSHA, "", "", "", "")
Expect(err).ShouldNot(HaveOccurred())
Expect(err).ShouldNot(HaveOccurred())
})

AfterAll(func() {
Expand Down Expand Up @@ -245,7 +245,7 @@ func createRHTAPReleasePlanAdmission(rhtapRPAName string, managedFw framework.Fr
"components": []map[string]interface{}{
{
"name": rhtapComponentName,
"repository": "quay.io/redhat-pending/rhtap----konflux-release-e2e",
"repository": "registry.stage.redhat.io/rhtap/konflux-release-e2e",
"tags": []string{"latest", "latest-{{ timestamp }}", "testtag",
"testtag-{{ timestamp }}", "testtag2", "testtag2-{{ timestamp }}"},
"source": map[string]interface{}{
Expand Down
Loading