diff --git a/cmd/krel/cmd/ff.go b/cmd/krel/cmd/ff.go index e8b4480f387..e1b2aabf9bb 100644 --- a/cmd/krel/cmd/ff.go +++ b/cmd/krel/cmd/ff.go @@ -24,6 +24,7 @@ import ( "github.com/spf13/cobra" "k8s.io/release/pkg/fastforward" + "k8s.io/release/pkg/release" kgit "sigs.k8s.io/release-sdk/git" ) @@ -72,6 +73,7 @@ func init() { ffCmd.PersistentFlags().StringVar(&ffOpts.RepoPath, "repo", filepath.Join(os.TempDir(), "k8s"), "the local path to the repository to be used") ffCmd.PersistentFlags().StringVar(&ffOpts.Branch, "branch", "", "branch") ffCmd.PersistentFlags().StringVar(&ffOpts.MainRef, "ref", kgit.Remotify(kgit.DefaultBranch), "ref on the main branch") + ffCmd.PersistentFlags().StringVar(&ffOpts.GCPProjectID, "project-id", release.DefaultRelengStagingTestProject, "Google Cloud Porject to use to submit the job") ffCmd.PersistentFlags().BoolVar(&ffOpts.Cleanup, "cleanup", false, "cleanup the repository after the run") ffCmd.PersistentFlags().BoolVar(&ffOpts.NonInteractive, "non-interactive", false, "do not require any user interaction") ffCmd.PersistentFlags().BoolVar(&ffOpts.Submit, "submit", false, "run inside of Google Cloud Build by submitting a new job") diff --git a/pkg/fastforward/fastforward.go b/pkg/fastforward/fastforward.go index ebe5aaf93d1..efccd840813 100644 --- a/pkg/fastforward/fastforward.go +++ b/pkg/fastforward/fastforward.go @@ -50,8 +50,11 @@ type Options struct { // Cleanup the repository after the run if set to true. Cleanup bool - // RepoPa is the local path to the repository to be used. + // RepoPath is the local path to the repository to be used. RepoPath string + + // GCPProjectID is the GCP project to use to submit the job. + GCPProjectID string } // FastForward is the main structure of this package. @@ -82,6 +85,7 @@ func (f *FastForward) Run() (err error) { options.FastForward = true options.NoMock = f.options.NoMock options.Stream = true + options.Project = f.options.GCPProjectID return f.Submit(options) } diff --git a/pkg/release/release.go b/pkg/release/release.go index 7e82173f525..19614f85951 100644 --- a/pkg/release/release.go +++ b/pkg/release/release.go @@ -52,6 +52,7 @@ const ( // TODO(vdf): Need to reference K8s Infra project here DefaultKubernetesStagingProject = "kubernetes-release-test" + DefaultRelengStagingTestProject = "k8s-staging-releng-test" DefaultRelengStagingProject = "k8s-staging-releng" DefaultDiskSize = "500" BucketPrefix = "kubernetes-release-"