Skip to content

Commit

Permalink
Rebranding appstudion->konflux (#309)
Browse files Browse the repository at this point in the history
* Rebranding appstudion->konflux

* Rebranding rhtap->konflux

* Author email update

* Update controllers/component_build_controller_pac.go

Co-authored-by: Ralph Bean <[email protected]>

* Update controllers/component_build_controller_pac.go

Co-authored-by: Ralph Bean <[email protected]>

* Update pkg/git/github/github_helper_debug_test.go

Co-authored-by: Ralph Bean <[email protected]>

* Update pkg/git/github/github_helper_debug_test.go

Co-authored-by: Ralph Bean <[email protected]>

* Update pkg/git/gitlab/gitlab_helper_debug_test.go

Co-authored-by: Ralph Bean <[email protected]>

* Update pkg/git/gitlab/gitlab_helper_debug_test.go

Co-authored-by: Ralph Bean <[email protected]>

---------

Co-authored-by: Ralph Bean <[email protected]>
  • Loading branch information
skabashnyuk and ralphbean authored Jun 4, 2024
1 parent 2b6e85c commit 02a0705
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 40 deletions.
33 changes: 17 additions & 16 deletions controllers/component_build_controller_pac.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,6 @@ import (

"github.com/go-logr/logr"
"github.com/google/go-containerregistry/pkg/authn"
"github.com/konflux-ci/build-service/pkg/boerrors"
. "github.com/konflux-ci/build-service/pkg/common"
"github.com/konflux-ci/build-service/pkg/git"
gp "github.com/konflux-ci/build-service/pkg/git/gitprovider"
"github.com/konflux-ci/build-service/pkg/git/gitproviderfactory"
l "github.com/konflux-ci/build-service/pkg/logs"
pacv1alpha1 "github.com/openshift-pipelines/pipelines-as-code/pkg/apis/pipelinesascode/v1alpha1"
routev1 "github.com/openshift/api/route/v1"
appstudiov1alpha1 "github.com/redhat-appstudio/application-api/api/v1alpha1"
Expand All @@ -53,6 +47,13 @@ import (
"sigs.k8s.io/controller-runtime/pkg/controller/controllerutil"
ctrllog "sigs.k8s.io/controller-runtime/pkg/log"
"sigs.k8s.io/yaml"

"github.com/konflux-ci/build-service/pkg/boerrors"
. "github.com/konflux-ci/build-service/pkg/common"
"github.com/konflux-ci/build-service/pkg/git"
gp "github.com/konflux-ci/build-service/pkg/git/gitprovider"
"github.com/konflux-ci/build-service/pkg/git/gitproviderfactory"
l "github.com/konflux-ci/build-service/pkg/logs"
)

const (
Expand Down Expand Up @@ -984,13 +985,13 @@ func (r *ComponentBuildReconciler) ConfigureRepositoryForPaC(ctx context.Context
}

mrData := &gp.MergeRequestData{
CommitMessage: "Appstudio update " + component.Name,
CommitMessage: "Konflux update " + component.Name,
BranchName: generateMergeRequestSourceBranch(component),
BaseBranchName: baseBranch,
Title: "Appstudio update " + component.Name,
Title: "Konflux update " + component.Name,
Text: mergeRequestDescription,
AuthorName: "redhat-appstudio",
AuthorEmail: "[email protected]",
AuthorName: "konflux",
AuthorEmail: "[email protected]",
Files: []gp.RepositoryFile{
{FullPath: ".tekton/" + component.Name + "-" + pipelineRunOnPushFilename, Content: pipelineRunOnPushYaml},
{FullPath: ".tekton/" + component.Name + "-" + pipelineRunOnPRFilename, Content: pipelineRunOnPRYaml},
Expand Down Expand Up @@ -1072,7 +1073,7 @@ func (r *ComponentBuildReconciler) UnconfigureRepositoryForPaC(ctx context.Conte
mrData := &gp.MergeRequestData{
BranchName: sourceBranch,
BaseBranchName: baseBranch,
AuthorName: "redhat-appstudio",
AuthorName: "konflux",
}

mergeRequest, err := gitClient.FindUnmergedPaCMergeRequest(repoUrl, mrData)
Expand All @@ -1094,13 +1095,13 @@ func (r *ComponentBuildReconciler) UnconfigureRepositoryForPaC(ctx context.Conte
if mergeRequest == nil {
// Create new PaC configuration clean up merge request
mrData = &gp.MergeRequestData{
CommitMessage: "Appstudio purge " + component.Name,
BranchName: "appstudio-purge-" + component.Name,
CommitMessage: "Konflux purge " + component.Name,
BranchName: "konflux-purge-" + component.Name,
BaseBranchName: baseBranch,
Title: "Appstudio purge " + component.Name,
Title: "Konflux purge " + component.Name,
Text: "Pipelines as Code configuration removal",
AuthorName: "redhat-appstudio",
AuthorEmail: "[email protected]",
AuthorName: "konflux",
AuthorEmail: "[email protected]",
Files: []gp.RepositoryFile{
{FullPath: ".tekton/" + component.Name + "-" + pipelineRunOnPushFilename},
{FullPath: ".tekton/" + component.Name + "-" + pipelineRunOnPRFilename},
Expand Down
5 changes: 3 additions & 2 deletions controllers/component_dependency_update_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import (
"text/template"
"time"

l "github.com/konflux-ci/build-service/pkg/logs"
applicationapi "github.com/redhat-appstudio/application-api/api/v1alpha1"
releaseapi "github.com/redhat-appstudio/release-service/api/v1alpha1"
tektonapi "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1"
Expand All @@ -45,6 +44,8 @@ import (
ctrllog "sigs.k8s.io/controller-runtime/pkg/log"
"sigs.k8s.io/controller-runtime/pkg/predicate"
"sigs.k8s.io/controller-runtime/pkg/reconcile"

l "github.com/konflux-ci/build-service/pkg/logs"
)

const (
Expand Down Expand Up @@ -557,7 +558,7 @@ func generateRenovateConfigForNudge(slug string, repositories []renovateReposito
{
"matchPackageNames": ["{{.BuiltImageRepository}}", {{range .DistributionRepositories}},"{{.}}"{{end}}],
groupName: "Component Update {{.ComponentName}}",
branchName: "rhtap/component-updates/{{.ComponentName}}",
branchName: "konflux/component-updates/{{.ComponentName}}",
commitMessageTopic: "{{.ComponentName}}",
prFooter: "To execute skipped test pipelines write comment ` + "`/ok-to-test`" + `",
recreateWhen: "always",
Expand Down
20 changes: 10 additions & 10 deletions pkg/git/github/github_helper_debug_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,13 @@ func TestCreatePaCPullRequest(t *testing.T) {

componentName := "unittest-component-name"
prData := &gp.MergeRequestData{
CommitMessage: "Appstudio update " + componentName,
BranchName: "appstudio-" + componentName,
CommitMessage: "Konflux update " + componentName,
BranchName: "konflux-" + componentName,
BaseBranchName: "",
Title: "Appstudio update " + componentName,
Title: "Konflux update " + componentName,
Text: "Pipelines as Code configuration proposal",
AuthorName: "redhat-appstudio",
AuthorEmail: "[email protected]",
AuthorName: "konflux",
AuthorEmail: "[email protected]",
Files: []gp.RepositoryFile{
{FullPath: ".tekton/" + componentName + "-push.yaml", Content: pipelineOnPush},
{FullPath: ".tekton/" + componentName + "-pull-request.yaml", Content: pipelineOnPR},
Expand All @@ -123,13 +123,13 @@ func TestUndoPaCPullRequest(t *testing.T) {

componentName := "unittest-component-name"
prData := &gp.MergeRequestData{
CommitMessage: "Appstudio purge " + componentName,
BranchName: "appstudio-purge-" + componentName,
CommitMessage: "Konflux purge " + componentName,
BranchName: "konflux-purge-" + componentName,
BaseBranchName: "",
Title: "Appstudio purge " + componentName,
Title: "Konflux purge " + componentName,
Text: "Pipelines as Code configuration removal",
AuthorName: "redhat-appstudio",
AuthorEmail: "[email protected]",
AuthorName: "konflux",
AuthorEmail: "[email protected]",
Files: []gp.RepositoryFile{
{FullPath: ".tekton/" + componentName + "-push.yaml"},
{FullPath: ".tekton/" + componentName + "-pull-request.yaml"},
Expand Down
20 changes: 10 additions & 10 deletions pkg/git/gitlab/gitlab_helper_debug_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@ func TestEnsurePaCMergeRequest(t *testing.T) {

componentName := "unittest-component-name"
mrData := &gp.MergeRequestData{
CommitMessage: "Appstudio update " + componentName,
BranchName: "appstudio-" + componentName,
CommitMessage: "Konflux update " + componentName,
BranchName: "konflux-" + componentName,
BaseBranchName: "",
Title: "Appstudio update " + componentName,
Title: "Konflux update " + componentName,
Text: "Pipelines as Code configuration proposal",
AuthorName: "redhat-appstudio",
AuthorEmail: "[email protected]",
AuthorName: "konflux",
AuthorEmail: "[email protected]",
Files: []gp.RepositoryFile{
{FullPath: ".tekton/" + componentName + "-push.yaml", Content: pipelineOnPush},
{FullPath: ".tekton/" + componentName + "-pull-request.yaml", Content: pipelineOnPR},
Expand Down Expand Up @@ -92,13 +92,13 @@ func TestUndoPaCMergeRequest(t *testing.T) {

componentName := "unittest-component-name"
mrData := &gp.MergeRequestData{
CommitMessage: "Appstudio purge " + componentName,
BranchName: "appstudio-purge-" + componentName,
CommitMessage: "Konflux purge " + componentName,
BranchName: "konflux-purge-" + componentName,
BaseBranchName: "",
Title: "Appstudio purge " + componentName,
Title: "Konflux purge " + componentName,
Text: "Pipelines as Code configuration removal",
AuthorName: "redhat-appstudio",
AuthorEmail: "[email protected]",
AuthorName: "konflux",
AuthorEmail: "[email protected]",
Files: []gp.RepositoryFile{
{FullPath: ".tekton/" + componentName + "-push.yaml"},
{FullPath: ".tekton/" + componentName + "-pull-request.yaml"},
Expand Down
4 changes: 2 additions & 2 deletions pkg/renovate/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ func NewTektonJobConfig(platform, endpoint, username, gitAuthor string, reposito
Tekton: Tekton{FileMatch: []string{"\\.yaml$", "\\.yml$"}, IncludePaths: []string{".tekton/**"}, PackageRules: []PackageRule{DisableAllPackageRules, {
MatchPackagePatterns: []string{renovatePattern},
MatchDepPatterns: []string{renovatePattern},
GroupName: "RHTAP references",
GroupName: "Konflux references",
BranchName: "konflux/references/{{baseBranch}}",
CommitMessageExtra: "",
CommitMessageTopic: "RHTAP references",
CommitMessageTopic: "Konflux references",
CommitBody: "Signed-off-by: {{{gitAuthor}}}",
SemanticCommits: "enabled",
PRFooter: "To execute skipped test pipelines write comment `/ok-to-test`",
Expand Down

0 comments on commit 02a0705

Please sign in to comment.