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

Fix #1126: remove constraints and use default versions #1141

Merged
merged 2 commits into from
Dec 13, 2019
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
20 changes: 15 additions & 5 deletions pkg/apis/camel/v1alpha1/zz_generated.deepcopy.go

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

4 changes: 2 additions & 2 deletions pkg/platform/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,10 @@ func setPlatformDefaults(ctx context.Context, c client.Client, p *v1alpha1.Integ
p.Status.Profile = DetermineBestProfile(ctx, c, p)
}
if p.Status.Build.CamelVersion == "" {
p.Status.Build.CamelVersion = defaults.CamelVersionConstraint
p.Status.Build.CamelVersion = defaults.DefaultCamelVersion
}
if p.Status.Build.RuntimeVersion == "" {
p.Status.Build.RuntimeVersion = defaults.RuntimeVersionConstraint
p.Status.Build.RuntimeVersion = defaults.DefaultRuntimeVersion
}
if p.Status.Build.BaseImage == "" {
p.Status.Build.BaseImage = defaults.BaseImage
Expand Down
2 changes: 1 addition & 1 deletion pkg/trait/builder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ func createBuilderTestEnv(cluster v1alpha1.IntegrationPlatformCluster, strategy
Build: v1alpha1.IntegrationPlatformBuildSpec{
PublishStrategy: strategy,
Registry: v1alpha1.IntegrationPlatformRegistrySpec{Address: "registry"},
CamelVersion: defaults.CamelVersionConstraint,
CamelVersion: defaults.DefaultCamelVersion,
},
},
},
Expand Down
4 changes: 2 additions & 2 deletions pkg/trait/quarkus.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ func (t *quarkusTrait) determineQuarkusVersion(e *Environment) string {
e.Platform.Status.Build.RuntimeProvider.Quarkus.QuarkusVersion != "" {
return e.Platform.Status.Build.RuntimeProvider.Quarkus.QuarkusVersion
}
return defaults.QuarkusVersionConstraint
return defaults.DefaultQuarkusVersion
}

func (t *quarkusTrait) determineCamelQuarkusVersion(e *Environment) string {
Expand All @@ -224,5 +224,5 @@ func (t *quarkusTrait) determineCamelQuarkusVersion(e *Environment) string {
e.Platform.Status.Build.RuntimeProvider.Quarkus.CamelQuarkusVersion != "" {
return e.Platform.Status.Build.RuntimeProvider.Quarkus.CamelQuarkusVersion
}
return defaults.CamelQuarkusVersionConstraint
return defaults.DefaultCamelQuarkusVersion
}
2 changes: 1 addition & 1 deletion pkg/util/camel/catalog.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func DefaultCatalog() (*RuntimeCatalog, error) {
// QuarkusCatalog --
func QuarkusCatalog() (*RuntimeCatalog, error) {
return catalogForRuntimeProvider(v1alpha1.QuarkusRuntimeProvider{
CamelQuarkusVersion: defaults.CamelQuarkusVersionConstraint,
CamelQuarkusVersion: defaults.DefaultCamelQuarkusVersion,
QuarkusVersion: defaults.DefaultQuarkusVersion,
})
}
Expand Down
13 changes: 1 addition & 12 deletions pkg/util/defaults/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package defaults

// ***********************
Expand All @@ -27,27 +28,15 @@ const (
// DefaultCamelVersion --
DefaultCamelVersion = "3.0.0-RC3"

// CamelVersionConstraint --
CamelVersionConstraint = ">=3.0.0-RC3"

// DefaultRuntimeVersion --
DefaultRuntimeVersion = "1.0.7"

// RuntimeVersionConstraint --
RuntimeVersionConstraint = ">=1.0.7"

// DefaultCamelQuarkusVersion --
DefaultCamelQuarkusVersion = "0.3.1"

// CamelQuarkusVersionConstraint --
CamelQuarkusVersionConstraint = ">=0.3.1"

// DefaultQuarkusVersion --
DefaultQuarkusVersion = "0.27.0"

// QuarkusVersionConstraint --
QuarkusVersionConstraint = ">=0.27.0"

// KanikoVersion --
KanikoVersion = "0.9.0"

Expand Down
17 changes: 1 addition & 16 deletions script/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,9 @@ VERSIONFILE := pkg/util/defaults/defaults.go
VERSION := 1.0.0-M5-SNAPSHOT
LAST_RELEASED_VERSION := 1.0.0-M3
RUNTIME_VERSION := 1.0.7
RUNTIME_VERSION_CONSTRAINT := >=1.0.7
CAMEL_VERSION := 3.0.0-RC3
CAMEL_VERSION_CONSTRAINT := >=3.0.0-RC3
CAMEL_QUARKUS_VERSION := 0.3.1
CAMEL_QUARKUS_VERSION_CONSTRAINT := >=0.3.1
QUARKUS_VERSION := 0.27.0
QUARKUS_VERSION_CONSTRAINT := >=0.27.0
KANIKO_VERSION := 0.9.0
BASE_IMAGE := fabric8/s2i-java:3.0-java8
LOCAL_REPOSITORY := /tmp/artifacts/m2
Expand Down Expand Up @@ -72,6 +68,7 @@ codegen:
@echo "/*" > $(VERSIONFILE)
@echo "$$LICENSE_HEADER" >> $(VERSIONFILE)
@echo "*/" >> $(VERSIONFILE)
@echo "" >> $(VERSIONFILE)
@echo "package defaults" >> $(VERSIONFILE)
@echo "" >> $(VERSIONFILE)
@echo "// ***********************" >> $(VERSIONFILE)
Expand All @@ -85,27 +82,15 @@ codegen:
@echo " // DefaultCamelVersion -- " >> $(VERSIONFILE)
@echo " DefaultCamelVersion = \"$(CAMEL_VERSION)\"" >> $(VERSIONFILE)
@echo "" >> $(VERSIONFILE)
@echo " // CamelVersionConstraint -- " >> $(VERSIONFILE)
@echo " CamelVersionConstraint = \"$(CAMEL_VERSION_CONSTRAINT)\"" >> $(VERSIONFILE)
@echo "" >> $(VERSIONFILE)
@echo " // DefaultRuntimeVersion -- " >> $(VERSIONFILE)
@echo " DefaultRuntimeVersion = \"$(RUNTIME_VERSION)\"" >> $(VERSIONFILE)
@echo "" >> $(VERSIONFILE)
@echo " // RuntimeVersionConstraint -- " >> $(VERSIONFILE)
@echo " RuntimeVersionConstraint = \"$(RUNTIME_VERSION_CONSTRAINT)\"" >> $(VERSIONFILE)
@echo "" >> $(VERSIONFILE)
@echo " // DefaultCamelQuarkusVersion -- " >> $(VERSIONFILE)
@echo " DefaultCamelQuarkusVersion = \"$(CAMEL_QUARKUS_VERSION)\"" >> $(VERSIONFILE)
@echo "" >> $(VERSIONFILE)
@echo " // CamelQuarkusVersionConstraint -- " >> $(VERSIONFILE)
@echo " CamelQuarkusVersionConstraint = \"$(CAMEL_QUARKUS_VERSION_CONSTRAINT)\"" >> $(VERSIONFILE)
@echo "" >> $(VERSIONFILE)
@echo " // DefaultQuarkusVersion -- " >> $(VERSIONFILE)
@echo " DefaultQuarkusVersion = \"$(QUARKUS_VERSION)\"" >> $(VERSIONFILE)
@echo "" >> $(VERSIONFILE)
@echo " // QuarkusVersionConstraint -- " >> $(VERSIONFILE)
@echo " QuarkusVersionConstraint = \"$(QUARKUS_VERSION_CONSTRAINT)\"" >> $(VERSIONFILE)
@echo "" >> $(VERSIONFILE)
@echo " // KanikoVersion -- " >> $(VERSIONFILE)
@echo " KanikoVersion = \"$(KANIKO_VERSION)\"" >> $(VERSIONFILE)
@echo "" >> $(VERSIONFILE)
Expand Down