Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing Strategy.APIversion #1398

Merged
merged 1 commit into from
Oct 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions deploy/crds/shipwright.io_buildruns.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6732,9 +6732,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 @@ -10694,9 +10691,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
3 changes: 0 additions & 3 deletions deploy/crds/shipwright.io_builds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2508,9 +2508,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.