Skip to content

Commit

Permalink
Merge pull request #3505 from cpanato/update-fff
Browse files Browse the repository at this point in the history
set custom org and repo for FF cloudbuild job
  • Loading branch information
k8s-ci-robot committed Mar 13, 2024
2 parents 68031dc + d6f3677 commit a826e65
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 12 deletions.
4 changes: 4 additions & 0 deletions gcb/fast-forward/cloudbuild.yaml
Expand Up @@ -75,6 +75,8 @@ steps:
- "fast-forward"
- "--log-level=${_LOG_LEVEL}"
- "--non-interactive"
- "--github-org=${_K8S_ORG}"
- "--github-repo=${_K8S_REPO}"
- "${_NOMOCK}"

tags:
Expand All @@ -84,6 +86,8 @@ tags:
- ${_GIT_TAG}
- ${_RELEASE_BRANCH}
- ${_TYPE_TAG}
- ${_K8S_ORG}
- ${_K8S_REPO}
- ${_TYPE}

options:
Expand Down
2 changes: 2 additions & 0 deletions pkg/fastforward/fastforward.go
Expand Up @@ -94,6 +94,8 @@ func (f *FastForward) Run() (err error) {
options.Stream = true
options.Project = f.options.GCPProjectID
options.ScratchBucket = "gs://" + f.options.GCPProjectID + "-gcb"
options.CustomK8SRepo = f.options.GitHubRepo
options.CustomK8sOrg = f.options.GitHubOrg
return f.Submit(options)
}

Expand Down
34 changes: 22 additions & 12 deletions pkg/gcp/gcb/gcb.go
Expand Up @@ -95,18 +95,20 @@ type Options struct {
// NonInteractive does not ask any questions if set to true.
NonInteractive bool

NoMock bool
Stage bool
Release bool
FastForward bool
Stream bool
BuildAtHead bool
Branch string
ReleaseType string
BuildVersion string
GcpUser string
LogLevel string
LastJobs int64
NoMock bool
Stage bool
Release bool
FastForward bool
Stream bool
BuildAtHead bool
Branch string
ReleaseType string
BuildVersion string
GcpUser string
LogLevel string
CustomK8SRepo string
CustomK8sOrg string
LastJobs int64

// OpenBuildService parameters
OBSStage bool
Expand Down Expand Up @@ -360,7 +362,15 @@ func (g *GCB) SetGCBSubstitutions(toolOrg, toolRepo, toolRef, gcsBucket string)
gcbSubs["TOOL_REF"] = toolRef

gcbSubs["K8S_ORG"] = release.GetK8sOrg()
if g.options.CustomK8sOrg != "" {
gcbSubs["K8S_ORG"] = g.options.CustomK8sOrg
}

gcbSubs["K8S_REPO"] = release.GetK8sRepo()
if g.options.CustomK8SRepo != "" {
gcbSubs["K8S_REPO"] = g.options.CustomK8SRepo
}

gcbSubs["K8S_REF"] = release.GetK8sRef()

gcpUser := g.options.GcpUser
Expand Down

0 comments on commit a826e65

Please sign in to comment.