Skip to content

Commit

Permalink
removing Strategy.APIversion
Browse files Browse the repository at this point in the history
  • Loading branch information
apoorvajagtap committed Oct 9, 2023
1 parent 1660379 commit 5e0ac4d
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 27 deletions.
6 changes: 0 additions & 6 deletions deploy/crds/shipwright.io_buildruns.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6593,9 +6593,6 @@ spec:
description: Strategy references the BuildStrategy to use
to build the container image.
properties:
apiVersion:
description: API version of the referent
type: string
kind:
description: BuildStrategyKind indicates the kind of the
buildstrategy, namespaced or cluster scoped.
Expand Down Expand Up @@ -10460,9 +10457,6 @@ spec:
description: Strategy references the BuildStrategy to use to build
the container image.
properties:
apiVersion:
description: API version of the referent
type: string
kind:
description: BuildStrategyKind indicates the kind of the buildstrategy,
namespaced or cluster scoped.
Expand Down
6 changes: 0 additions & 6 deletions deploy/crds/shipwright.io_builds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -455,9 +455,6 @@ spec:
description: Strategy references the BuildStrategy to use to build
the container image.
properties:
apiVersion:
description: API version of the referent
type: string
kind:
description: BuildStrategyKind indicates the kind of the buildstrategy,
namespaced or cluster scoped.
Expand Down Expand Up @@ -2463,9 +2460,6 @@ spec:
description: Strategy references the BuildStrategy to use to build
the container image.
properties:
apiVersion:
description: API version of the referent
type: string
kind:
description: BuildStrategyKind indicates the kind of the buildstrategy,
namespaced or cluster scoped.
Expand Down
10 changes: 4 additions & 6 deletions pkg/apis/build/v1beta1/build_conversion.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,8 @@ func (dest *BuildSpec) ConvertFrom(orig *v1alpha1.BuildSpec) error {

// Handle BuildSpec Strategy
dest.Strategy = Strategy{
Name: orig.StrategyName(),
Kind: (*BuildStrategyKind)(orig.Strategy.Kind),
APIVersion: orig.Strategy.APIVersion,
Name: orig.StrategyName(),
Kind: (*BuildStrategyKind)(orig.Strategy.Kind),
}

// Handle BuildSpec ParamValues
Expand Down Expand Up @@ -213,9 +212,8 @@ func (dest *BuildSpec) ConvertTo(bs *v1alpha1.BuildSpec) error {

// Handle BuildSpec Strategy
bs.Strategy = v1alpha1.Strategy{
Name: dest.StrategyName(),
Kind: (*v1alpha1.BuildStrategyKind)(dest.Strategy.Kind),
APIVersion: dest.Strategy.APIVersion,
Name: dest.StrategyName(),
Kind: (*v1alpha1.BuildStrategyKind)(dest.Strategy.Kind),
}

// Handle BuildSpec Builder, TODO
Expand Down
4 changes: 0 additions & 4 deletions pkg/apis/build/v1beta1/buildstrategy.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,6 @@ type Strategy struct {

// BuildStrategyKind indicates the kind of the buildstrategy, namespaced or cluster scoped.
Kind *BuildStrategyKind `json:"kind,omitempty"`

// API version of the referent
// +optional
APIVersion *string `json:"apiVersion,omitempty"`
}

// BuilderStrategy defines the common elements of build strategies
Expand Down
5 changes: 0 additions & 5 deletions pkg/apis/build/v1beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5e0ac4d

Please sign in to comment.