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 2022/12/16 09:21:38 UTC

[camel-k] branch main updated: chore: scripts cleaning

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 a1a02952a chore: scripts cleaning
a1a02952a is described below

commit a1a02952ad211c689b7ccb3c6b911ea5855c1643
Author: Pasquale Congiusti <pa...@gmail.com>
AuthorDate: Thu Dec 15 17:15:25 2022 +0100

    chore: scripts cleaning
    
    Examples removed in #3908
    
    Closes #3873
---
 script/Makefile                    | 14 ++-------
 script/install_crc.sh              | 60 --------------------------------------
 script/install_minikube.sh         | 28 ------------------
 script/next_snapshot.sh            | 30 -------------------
 script/package_examples.sh         | 30 -------------------
 script/rat_check.sh                | 29 ------------------
 script/trigger_nightly_build.sh    | 20 -------------
 script/vendor-license-directory.sh | 31 --------------------
 8 files changed, 3 insertions(+), 239 deletions(-)

diff --git a/script/Makefile b/script/Makefile
index d2fae2519..98a70c688 100644
--- a/script/Makefile
+++ b/script/Makefile
@@ -479,14 +479,11 @@ cross-compile:
 	# be processed as a single argument by the cross compile script
 	./script/cross_compile.sh $(CUSTOM_VERSION) $(subst ","\",$(GOFLAGS))
 
-package-examples:
-	./script/package_examples.sh $(CUSTOM_VERSION)
+release: clean codegen set-module-version set-version build-resources check-licenses build images images-push cross-compile git-tag
 
-release: clean codegen set-module-version set-version build-resources check-licenses build images images-push cross-compile package-examples git-tag
+release-staging: clean codegen set-module-version set-version build-resources check-licenses build images images-push-staging cross-compile git-tag
 
-release-staging: clean codegen set-module-version set-version build-resources check-licenses build images images-push-staging cross-compile package-examples git-tag
-
-release-nightly: clean codegen set-module-version set-version build-resources build images images-push cross-compile package-examples
+release-nightly: clean codegen set-module-version set-version build-resources build images images-push cross-compile
 
 release-helm:
 	./script/release_helm.sh
@@ -496,11 +493,6 @@ release-kustomize:
 	RELEASE_NAME=$(PACKAGE) \
 	./script/release_kustomize.sh
 
-install-crc:
-	./script/install_crc.sh $(CUSTOM_VERSION)
-install-minikube:
-	./script/install_minikube.sh
-
 get-staging-repo:
 	@echo $(or ${STAGING_RUNTIME_REPO},https://repository.apache.org/content/repositories/snapshots@id=apache-snapshots@snapshots)
 
diff --git a/script/install_crc.sh b/script/install_crc.sh
deleted file mode 100755
index 52255256e..000000000
--- a/script/install_crc.sh
+++ /dev/null
@@ -1,60 +0,0 @@
-#!/bin/sh
-
-# 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.
-
-# Exit on error
-set -e
-
-eval $(crc oc-env)
-user=$(oc whoami)
-if [ "$project" = "" ]; then
-  project=$(oc project -q)
-else
-  oc new-project $project 2>/dev/null || true
-fi
-
-if [ "$#" -ne 1 ]; then
-    echo "usage: $0 version"
-    exit 1
-fi
-
-make images
-
-# Tag image
-docker tag apache/camel-k:$1 default-route-openshift-image-registry.apps-crc.testing/$project/camel-k:$1
-# Login to Docker registry
-if [ $user = "kube:admin" ]; then
-  docker login -u kubeadmin -p $(oc whoami -t) default-route-openshift-image-registry.apps-crc.testing
-else 
-  docker login -u $(oc whoami) -p $(oc whoami -t) default-route-openshift-image-registry.apps-crc.testing
-fi
-# Push image to Docker registry
-docker push default-route-openshift-image-registry.apps-crc.testing/$project/camel-k:$1
-
-# Try setup with standard user
-ret=0
-cmd="./kamel install --olm=false --operator-image=image-registry.openshift-image-registry.svc:5000/$project/camel-k:$1 --operator-image-pull-policy=Always"
-eval "$cmd -n $project 2>/dev/null || export ret=\$?"
-
-if [ $ret -ne 0 ]; then
-  # Login as admin if cluster setup fails with standard user
-  oc login -u kubeadmin
-  eval "$cmd --cluster-setup"
-  oc login -u $user
-  eval "$cmd -n $project"
-fi
-
-oc delete pod -l name=camel-k-operator -n $project || true
diff --git a/script/install_minikube.sh b/script/install_minikube.sh
deleted file mode 100755
index e8922467c..000000000
--- a/script/install_minikube.sh
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/sh
-
-# 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.
-
-
-# Exit on error
-set -e
-
-eval $(minikube docker-env)
-make images
-
-# Perform installation
-./kamel install
-
-kubectl delete pod -l name=camel-k-operator || true
diff --git a/script/next_snapshot.sh b/script/next_snapshot.sh
deleted file mode 100755
index 80e541c43..000000000
--- a/script/next_snapshot.sh
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/bin/sh
-
-# 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.
-
-set -e
-
-location=$(dirname $0)
-global_version_file=$location/../version/version.go
-
-version=$(cd $location && make get-version)
-version_num=$(echo $version | sed -E "s/([0-9.]*)-SNAPSHOT/\1/g")
-next_version_num=$(echo $version_num | awk 'BEGIN { FS = "." } ; {print $1"."$2"."++$3}')
-next_version="$next_version_num-SNAPSHOT"
-
-echo "Increasing version to $next_version"
-
-$location/set_version.sh $next_version
diff --git a/script/package_examples.sh b/script/package_examples.sh
deleted file mode 100755
index d4b4dd1cc..000000000
--- a/script/package_examples.sh
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/bin/sh
-
-# 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.
-
-location=$(dirname $0)
-rootdir=$(realpath $location/../)
-
-if [ "$#" -ne 1 ]; then
-    echo "usage: $0 version"
-    exit 1
-fi
-
-version=$1
-
-cd $rootdir/examples
-
-tar --exclude=".*" -zcvf ../camel-k-examples-$version.tar.gz *
diff --git a/script/rat_check.sh b/script/rat_check.sh
deleted file mode 100755
index 1e0258517..000000000
--- a/script/rat_check.sh
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/sh
-
-# 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.
-
-if [ "$RAT_HOME" = "" ]; then
-  echo "RAT_HOME is not set, please download the Apache RAT 1.12 "
-  echo "from https://creadur.apache.org/rat/download_rat.cgi,"
-  echo "and export RAT_HOME once you install it."
-  exit 1
-fi
-
-location=$(dirname $0)
-rootdir=$(realpath $location/../)
-echo $rootdir
-
-java -jar $RAT_HOME/apache-rat-*.jar -d $rootdir -e Gopkg.lock Gopkg.toml *.adoc cluster-setup.adoc gke-setup.adoc languages.adoc traits.adoc go.mod go.sum .golangci.yml .pre-commit-config.yaml .gitignore .gitmodules .dockerignore *.json *generated*.go resources-data.txt routes.flow
diff --git a/script/trigger_nightly_build.sh b/script/trigger_nightly_build.sh
deleted file mode 100755
index d157a34ad..000000000
--- a/script/trigger_nightly_build.sh
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/sh
-
-# 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.
-
-V=$(make get-version | sed s/-SNAPSHOT/-nightly.$(date +%Y%m%d%H%M)/)
-git tag v$V
-git push upstream v$V
diff --git a/script/vendor-license-directory.sh b/script/vendor-license-directory.sh
deleted file mode 100755
index 6b667e445..000000000
--- a/script/vendor-license-directory.sh
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/bin/bash
-
-# 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.
-
-# Creates a licenses directory and copies vendor licenses into it.
-
-if [ -d licenses ]
-then
-    rm -rf licenses
-fi
-
-mkdir licenses
-for lic in `find . \( -name "LICENSE*" -o -name "NOTICE*" \) | sed 's|^./||'`
-do
-    dir=licenses/`dirname $lic`
-    mkdir -p $dir
-    cp $lic $dir
-done