You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by pc...@apache.org on 2023/03/16 12:23:00 UTC

[camel-k] branch main updated: chore(ci): camel kamelets catalog scraping

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

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


The following commit(s) were added to refs/heads/main by this push:
     new bf4aad716 chore(ci): camel kamelets catalog scraping
bf4aad716 is described below

commit bf4aad7166c0afe425807d0740a4b0a1144a7ce0
Author: Pasquale Congiusti <pa...@gmail.com>
AuthorDate: Thu Mar 16 13:20:03 2023 +0100

    chore(ci): camel kamelets catalog scraping
---
 .github/actions/automatic-updates/action.yml                 |  2 +-
 script/Makefile                                              |  8 ++++----
 ...{update_default_ck_runtime.sh => update_default_camel.sh} | 12 +++++++++++-
 3 files changed, 16 insertions(+), 6 deletions(-)

diff --git a/.github/actions/automatic-updates/action.yml b/.github/actions/automatic-updates/action.yml
index 3af58429b..e52ed092d 100644
--- a/.github/actions/automatic-updates/action.yml
+++ b/.github/actions/automatic-updates/action.yml
@@ -55,7 +55,7 @@ runs:
       run: |
         make generate
         make update-docs
-        make update-default-ck-runtime
+        make update-default-camel
         git add -A && git commit -m 'chore: nightly resource refresh' && echo "refresh=1" >> $GITHUB_ENV || echo "No changes to make update-docs"
     - name: Push changes
       shell: bash
diff --git a/script/Makefile b/script/Makefile
index ec9c10e76..d53ad0bd7 100644
--- a/script/Makefile
+++ b/script/Makefile
@@ -23,7 +23,7 @@ VERSIONFILE := pkg/util/defaults/defaults.go
 VERSION ?= 2.0.0-SNAPSHOT
 LAST_RELEASED_IMAGE_NAME := camel-k-operator
 LAST_RELEASED_VERSION ?= 1.12.0
-RUNTIME_VERSION := 1.18.0-SNAPSHOT
+RUNTIME_VERSION := 3.20.1-SNAPSHOT
 BUILDAH_VERSION := 1.23.3
 KANIKO_VERSION := 1.9.1
 CONTROLLER_GEN_VERSION := v0.6.1
@@ -86,7 +86,7 @@ STAGING_RUNTIME_REPO :=
 INSTALL_DEFAULT_KAMELETS ?= true
 KAMELET_CATALOG_REPO := https://github.com/apache/camel-kamelets.git
 # Make sure to use a released tag or empty if you want to get the latest development bits
-KAMELET_CATALOG_REPO_TAG := main
+KAMELET_CATALOG_REPO_TAG := v3.20.1.1
 
 # When performing integration tests, it is not necessary to always execute build, especially
 # in e2e tests when lots of tests are being executed sequentially & the build has already taken place.
@@ -143,8 +143,8 @@ default: build
 update-docs: build-resources
 	./script/update_docs.sh
 
-update-default-ck-runtime:
-	./script/update_defaults_ck_runtime.sh
+update-default-camel:
+	./script/update_default_camel.sh
 
 bump-replace:
 	@# Bump version and replace with the variables provided by the user
diff --git a/script/update_default_ck_runtime.sh b/script/update_default_camel.sh
similarity index 71%
rename from script/update_default_ck_runtime.sh
rename to script/update_default_camel.sh
index 66ae65544..796e528cc 100755
--- a/script/update_default_ck_runtime.sh
+++ b/script/update_default_camel.sh
@@ -25,4 +25,14 @@ git clone --depth 1 https://github.com/apache/camel-k-runtime.git /tmp/camel-k-r
 ck_runtime_version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout -f /tmp/camel-k-runtime/pom.xml)
 echo "INFO: last Camel K runtime version set at $ck_runtime_version"
 sed -i "s/^RUNTIME_VERSION := .*$/RUNTIME_VERSION := $ck_runtime_version/" $location/Makefile
-rm -rf /tmp/camel-k-runtime/
\ No newline at end of file
+
+git clone https://github.com/apache/camel-kamelets.git /tmp/camel-kamelets
+pushd /tmp/camel-kamelets
+ck_camel_base_version=$(echo "$ck_runtime_version" | sed -r 's/-SNAPSHOT//g')
+echo "INFO: Looking a suitable Kamelet tag for $ck_camel_base_version camel version"
+kamelets_tag=$(git tag | grep $ck_camel_base_version | sort -r | head -n 1)
+popd
+echo "INFO: Kamelets version set at $kamelets_tag"
+sed -i "s/^KAMELET_CATALOG_REPO_TAG := .*$/KAMELET_CATALOG_REPO_TAG := $kamelets_tag/" $location/Makefile
+
+rm -rf /tmp/camel-k-runtime/ /tmp/camel-kamelets
\ No newline at end of file