You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "jamesnetherton (via GitHub)" <gi...@apache.org> on 2023/08/07 07:39:42 UTC

[GitHub] [camel-quarkus] jamesnetherton opened a new pull request, #5152: Manage test container versions in the root project pom.xml

jamesnetherton opened a new pull request, #5152:
URL: https://github.com/apache/camel-quarkus/pull/5152

   Also tested with the Quarkus Platform and this worked fine.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-quarkus] ppalaga commented on a diff in pull request #5152: Manage test container versions in the root project pom.xml

Posted by "ppalaga (via GitHub)" <gi...@apache.org>.
ppalaga commented on code in PR #5152:
URL: https://github.com/apache/camel-quarkus/pull/5152#discussion_r1285792175


##########
tooling/scripts/generate-test-containers-config-properties.groovy:
##########
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * 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.
+ */
+
+/**
+ * Writes all Maven properties suffixed with 'container.image' to target/test-classes/META-INF/microprofile-config.properties
+ */
+def fileContent = project.properties.findAll { key, value ->
+    key.endsWith('container.image')
+}.collect { key, value ->
+    "${key}=${value}"
+}.join(System.lineSeparator())
+
+File testClasses = new File("${project.build.testOutputDirectory}")
+if (testClasses.exists()) {
+    File metaInfDir = new File("${testClasses.absolutePath}/META-INF")
+    metaInfDir.mkdir()
+
+    File file = new File("${metaInfDir.absolutePath}/microprofile-config.properties")
+    file.write(fileContent)

Review Comment:
   ```suggestion
       file.write(fileContent)
   ```
   Or the like. Also for the sake of reproducibility.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-quarkus] ppalaga commented on a diff in pull request #5152: Manage test container versions in the root project pom.xml

Posted by "ppalaga (via GitHub)" <gi...@apache.org>.
ppalaga commented on code in PR #5152:
URL: https://github.com/apache/camel-quarkus/pull/5152#discussion_r1285790112


##########
tooling/scripts/generate-test-containers-config-properties.groovy:
##########
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * 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.
+ */
+
+/**
+ * Writes all Maven properties suffixed with 'container.image' to target/test-classes/META-INF/microprofile-config.properties
+ */
+def fileContent = project.properties.findAll { key, value ->
+    key.endsWith('container.image')
+}.collect { key, value ->
+    "${key}=${value}"
+}.join(System.lineSeparator())

Review Comment:
   ```suggestion
   }.join('\n')
   ```
   
   I'd vote for making this reproducible across all platforms.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-quarkus] jamesnetherton commented on a diff in pull request #5152: Manage test container versions in the root project pom.xml

Posted by "jamesnetherton (via GitHub)" <gi...@apache.org>.
jamesnetherton commented on code in PR #5152:
URL: https://github.com/apache/camel-quarkus/pull/5152#discussion_r1285803436


##########
tooling/scripts/generate-test-containers-config-properties.groovy:
##########
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * 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.
+ */
+
+/**
+ * Writes all Maven properties suffixed with 'container.image' to target/test-classes/META-INF/microprofile-config.properties
+ */
+def fileContent = project.properties.findAll { key, value ->
+    key.endsWith('container.image')
+}.collect { key, value ->
+    "${key}=${value}"
+}.join(System.lineSeparator())
+
+File testClasses = new File("${project.build.testOutputDirectory}")
+if (testClasses.exists()) {
+    File metaInfDir = new File("${testClasses.absolutePath}/META-INF")
+    metaInfDir.mkdir()
+
+    File file = new File("${metaInfDir.absolutePath}/microprofile-config.properties")
+    file.write(fileContent)

Review Comment:
   Suggestion code seems to be unaltered to the original.
   
   Was there a specific change you'd like to be made here? 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-quarkus] jamesnetherton merged pull request #5152: Manage test container versions in the root project pom.xml

Posted by "jamesnetherton (via GitHub)" <gi...@apache.org>.
jamesnetherton merged PR #5152:
URL: https://github.com/apache/camel-quarkus/pull/5152


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-quarkus] ppalaga commented on a diff in pull request #5152: Manage test container versions in the root project pom.xml

Posted by "ppalaga (via GitHub)" <gi...@apache.org>.
ppalaga commented on code in PR #5152:
URL: https://github.com/apache/camel-quarkus/pull/5152#discussion_r1286946239


##########
tooling/scripts/generate-test-containers-config-properties.groovy:
##########
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * 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.
+ */
+
+/**
+ * Writes all Maven properties suffixed with 'container.image' to target/test-classes/META-INF/microprofile-config.properties
+ */
+def fileContent = project.properties.findAll { key, value ->
+    key.endsWith('container.image')
+}.collect { key, value ->
+    "${key}=${value}"
+}.join(System.lineSeparator())
+
+File testClasses = new File("${project.build.testOutputDirectory}")
+if (testClasses.exists()) {
+    File metaInfDir = new File("${testClasses.absolutePath}/META-INF")
+    metaInfDir.mkdir()
+
+    File file = new File("${metaInfDir.absolutePath}/microprofile-config.properties")
+    file.write(fileContent)

Review Comment:
   Ups, sorry, I meant something like `file.write(fileContent, 'UTF-8')` IIRC, Groovy has this kind of override. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-quarkus] jamesnetherton commented on a diff in pull request #5152: Manage test container versions in the root project pom.xml

Posted by "jamesnetherton (via GitHub)" <gi...@apache.org>.
jamesnetherton commented on code in PR #5152:
URL: https://github.com/apache/camel-quarkus/pull/5152#discussion_r1286963135


##########
tooling/scripts/generate-test-containers-config-properties.groovy:
##########
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * 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.
+ */
+
+/**
+ * Writes all Maven properties suffixed with 'container.image' to target/test-classes/META-INF/microprofile-config.properties
+ */
+def fileContent = project.properties.findAll { key, value ->
+    key.endsWith('container.image')
+}.collect { key, value ->
+    "${key}=${value}"
+}.join(System.lineSeparator())
+
+File testClasses = new File("${project.build.testOutputDirectory}")
+if (testClasses.exists()) {
+    File metaInfDir = new File("${testClasses.absolutePath}/META-INF")
+    metaInfDir.mkdir()
+
+    File file = new File("${metaInfDir.absolutePath}/microprofile-config.properties")
+    file.write(fileContent)

Review Comment:
   https://github.com/apache/camel-quarkus/pull/5157



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org