You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by nf...@apache.org on 2019/12/13 20:11:17 UTC

[camel-k] branch master updated (4442007 -> 363cfb6)

This is an automated email from the ASF dual-hosted git repository.

nferraro pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/camel-k.git.


    from 4442007  Update to maven 3.6.3
     new 44eb5d8  chore(regen): regen deepcopy
     new 363cfb6  fix #1126: remove constraints and use default versions

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 pkg/apis/camel/v1alpha1/zz_generated.deepcopy.go | 20 +++++++++++++++-----
 pkg/platform/defaults.go                         |  4 ++--
 pkg/trait/builder_test.go                        |  2 +-
 pkg/trait/quarkus.go                             |  4 ++--
 pkg/util/camel/catalog.go                        |  2 +-
 pkg/util/defaults/defaults.go                    | 13 +------------
 script/Makefile                                  | 17 +----------------
 7 files changed, 23 insertions(+), 39 deletions(-)


[camel-k] 02/02: fix #1126: remove constraints and use default versions

Posted by nf...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

nferraro pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-k.git

commit 363cfb6d6f2507524b4404e2e3af624a1ed29df7
Author: Nicola Ferraro <ni...@gmail.com>
AuthorDate: Fri Dec 13 16:36:21 2019 +0100

    fix #1126: remove constraints and use default versions
---
 pkg/platform/defaults.go      |  4 ++--
 pkg/trait/builder_test.go     |  2 +-
 pkg/util/camel/catalog.go     |  2 +-
 pkg/util/defaults/defaults.go | 13 +------------
 script/Makefile               | 17 +----------------
 5 files changed, 6 insertions(+), 32 deletions(-)

diff --git a/pkg/platform/defaults.go b/pkg/platform/defaults.go
index 640e385..94f2e63 100644
--- a/pkg/platform/defaults.go
+++ b/pkg/platform/defaults.go
@@ -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
diff --git a/pkg/trait/builder_test.go b/pkg/trait/builder_test.go
index a9f2c00..d2ec6c3 100644
--- a/pkg/trait/builder_test.go
+++ b/pkg/trait/builder_test.go
@@ -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,
 				},
 			},
 		},
diff --git a/pkg/util/camel/catalog.go b/pkg/util/camel/catalog.go
index 12289e2..f6c268e 100644
--- a/pkg/util/camel/catalog.go
+++ b/pkg/util/camel/catalog.go
@@ -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,
 	})
 }
diff --git a/pkg/util/defaults/defaults.go b/pkg/util/defaults/defaults.go
index d9ee9eb..5afb15e 100644
--- a/pkg/util/defaults/defaults.go
+++ b/pkg/util/defaults/defaults.go
@@ -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
 
 // ***********************
@@ -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"
 
diff --git a/script/Makefile b/script/Makefile
index 7de91f8..f1c4e00 100644
--- a/script/Makefile
+++ b/script/Makefile
@@ -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
@@ -72,6 +68,7 @@ codegen:
 	@echo "/*" > $(VERSIONFILE)
 	@echo "$$LICENSE_HEADER" >> $(VERSIONFILE)
 	@echo "*/" >> $(VERSIONFILE)
+	@echo "" >> $(VERSIONFILE)
 	@echo "package defaults" >> $(VERSIONFILE)
 	@echo "" >> $(VERSIONFILE)
 	@echo "// ***********************" >> $(VERSIONFILE)
@@ -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)


[camel-k] 01/02: chore(regen): regen deepcopy

Posted by nf...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

nferraro pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-k.git

commit 44eb5d81a18c88af0dcdbb4df581660dc65fd227
Author: Nicola Ferraro <ni...@gmail.com>
AuthorDate: Fri Dec 13 16:35:15 2019 +0100

    chore(regen): regen deepcopy
---
 pkg/apis/camel/v1alpha1/zz_generated.deepcopy.go | 20 +++++++++++++++-----
 pkg/trait/quarkus.go                             |  4 ++--
 2 files changed, 17 insertions(+), 7 deletions(-)

diff --git a/pkg/apis/camel/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/camel/v1alpha1/zz_generated.deepcopy.go
index fff2f0a..a930cce 100644
--- a/pkg/apis/camel/v1alpha1/zz_generated.deepcopy.go
+++ b/pkg/apis/camel/v1alpha1/zz_generated.deepcopy.go
@@ -5,7 +5,8 @@
 package v1alpha1
 
 import (
-	v1 "k8s.io/api/core/v1"
+	corev1 "k8s.io/api/core/v1"
+	v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 	runtime "k8s.io/apimachinery/pkg/runtime"
 )
 
@@ -723,7 +724,11 @@ func (in *IntegrationPlatformBuildSpec) DeepCopyInto(out *IntegrationPlatformBui
 		}
 	}
 	out.Registry = in.Registry
-	out.Timeout = in.Timeout
+	if in.Timeout != nil {
+		in, out := &in.Timeout, &out.Timeout
+		*out = new(v1.Duration)
+		**out = **in
+	}
 	in.Maven.DeepCopyInto(&out.Maven)
 	if in.KanikoBuildCache != nil {
 		in, out := &in.KanikoBuildCache, &out.KanikoBuildCache
@@ -864,6 +869,7 @@ func (in *IntegrationPlatformSpec) DeepCopy() *IntegrationPlatformSpec {
 // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
 func (in *IntegrationPlatformStatus) DeepCopyInto(out *IntegrationPlatformStatus) {
 	*out = *in
+	in.IntegrationPlatformSpec.DeepCopyInto(&out.IntegrationPlatformSpec)
 	if in.Conditions != nil {
 		in, out := &in.Conditions, &out.Conditions
 		*out = make([]IntegrationPlatformCondition, len(*in))
@@ -994,7 +1000,11 @@ func (in *IntegrationStatus) DeepCopy() *IntegrationStatus {
 func (in *MavenSpec) DeepCopyInto(out *MavenSpec) {
 	*out = *in
 	in.Settings.DeepCopyInto(&out.Settings)
-	out.Timeout = in.Timeout
+	if in.Timeout != nil {
+		in, out := &in.Timeout, &out.Timeout
+		*out = new(v1.Duration)
+		**out = **in
+	}
 	return
 }
 
@@ -1107,12 +1117,12 @@ func (in *ValueSource) DeepCopyInto(out *ValueSource) {
 	*out = *in
 	if in.ConfigMapKeyRef != nil {
 		in, out := &in.ConfigMapKeyRef, &out.ConfigMapKeyRef
-		*out = new(v1.ConfigMapKeySelector)
+		*out = new(corev1.ConfigMapKeySelector)
 		(*in).DeepCopyInto(*out)
 	}
 	if in.SecretKeyRef != nil {
 		in, out := &in.SecretKeyRef, &out.SecretKeyRef
-		*out = new(v1.SecretKeySelector)
+		*out = new(corev1.SecretKeySelector)
 		(*in).DeepCopyInto(*out)
 	}
 	return
diff --git a/pkg/trait/quarkus.go b/pkg/trait/quarkus.go
index 72a5be7..97d7395 100644
--- a/pkg/trait/quarkus.go
+++ b/pkg/trait/quarkus.go
@@ -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 {
@@ -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
 }