Skip to content

Commit

Permalink
Merge pull request #1398 from apoorvajagtap/issue_1363_upstream
Browse files Browse the repository at this point in the history
Removing Strategy.APIversion
  • Loading branch information
openshift-ci[bot] authored Oct 12, 2023
2 parents 0fa3ffa + 765218f commit 4bd3b46
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 24 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 @@ -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.

0 comments on commit 4bd3b46

Please sign in to comment.