Skip to content

Commit

Permalink
Merge pull request kubernetes#2774 from saschagrunert/stage-verification
Browse files Browse the repository at this point in the history
Verify provided args on `krel stage`

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
  • Loading branch information
k8s-ci-robot authored and saschagrunert committed Nov 29, 2022
2 parents 2a7e0e6 + efc3e93 commit fece571
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions cmd/krel/cmd/stage.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,11 @@ func runStage(options *anago.StageOptions) error {
options.NoMock = rootOpts.nomock
stage := anago.NewStage(options)
if submitJob {
// Perform a local check of the specified options before launching a
// Cloud Build job:
if err := options.Validate(&anago.State{}); err != nil {
return fmt.Errorf("prechecking stage options: %w", err)
}
return stage.Submit(stream)
}
return stage.Run()
Expand Down
2 changes: 1 addition & 1 deletion pkg/gcp/gcb/gcb_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ func TestSetGCBSubstitutionsSuccess(t *testing.T) {
"MINOR_VERSION_TAG": "33",
"PATCH_VERSION_TAG": "7",
"KUBERNETES_VERSION_TAG": "1.33.7",
"KUBERNETES_GCS_BUCKET": "gs://test-bucket/stage/v1.33.7/1.33.7/gcs-stage/1.33.7",
"KUBERNETES_GCS_BUCKET": "gs://test-bucket/stage/v1.33.7/v1.33.7/gcs-stage/v1.33.7",
"K8S_ORG": git.DefaultGithubOrg,
"K8S_REPO": git.DefaultGithubRepo,
"K8S_REF": git.DefaultRef,
Expand Down

0 comments on commit fece571

Please sign in to comment.