You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ts...@apache.org on 2022/12/20 03:21:38 UTC
[camel-k] 05/05: (e2e): replaces deprecated set-output command
This is an automated email from the ASF dual-hosted git repository.
tsato pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-k.git
commit 0df10f38d01889c0909dfd4c68abe630419f59e4
Author: phantomjinx <p....@phantomjinx.co.uk>
AuthorDate: Tue Nov 8 17:38:31 2022 +0000
(e2e): replaces deprecated set-output command
* github has deprecated set-output function. Replaces with new syntax
---
.github/actions/e2e-upgrade/action.yml | 2 +-
.github/actions/kamel-build-binary/build-binary.sh | 4 ++--
.../actions/kamel-build-bundle/build-bundle-image.sh | 2 +-
.../actions/kamel-build-bundle/build-index-image.sh | 2 +-
.../kamel-config-cluster-custom/connect-cluster.sh | 20 ++++++++++----------
.../kamel-config-cluster-kind/extract-config.sh | 14 +++++++-------
.github/actions/kamel-config-cluster-ocp3/action.yml | 16 ++++++++--------
.github/actions/kamel-config-cluster/action.yaml | 15 ++++++++-------
.../actions/kamel-config-cluster/output-config.sh | 20 ++++++++++----------
.github/actions/kamel-prepare-env/action.yml | 2 +-
10 files changed, 49 insertions(+), 48 deletions(-)
diff --git a/.github/actions/e2e-upgrade/action.yml b/.github/actions/e2e-upgrade/action.yml
index bacf81189..6e11d6bea 100644
--- a/.github/actions/e2e-upgrade/action.yml
+++ b/.github/actions/e2e-upgrade/action.yml
@@ -75,7 +75,7 @@ runs:
mv /tmp/kamel ${RELEASED_KAMEL_BINARY}
if [ $? == 0 ]; then
echo "Info: Kamel version installed: $(${RELEASED_KAMEL_BINARY} version)"
- echo "::set-output name=released-kamel-binary::${RELEASED_KAMEL_BINARY}"
+ echo "released-kamel-binary=${RELEASED_KAMEL_BINARY}" >> $GITHUB_OUTPUT
else
echo "Error: Failed to install kamel binary ${KAMEL_VERSION}"
exit 1
diff --git a/.github/actions/kamel-build-binary/build-binary.sh b/.github/actions/kamel-build-binary/build-binary.sh
index 0ba377283..cbf64e352 100755
--- a/.github/actions/kamel-build-binary/build-binary.sh
+++ b/.github/actions/kamel-build-binary/build-binary.sh
@@ -107,6 +107,6 @@ echo "Kamel version installed: $(kamel version)"
BUILD_BINARY_LOCAL_IMAGE_NAME="${REGISTRY_PULL_HOST}/${IMAGE_NAMESPACE}/camel-k"
BUILD_BINARY_LOCAL_IMAGE_VERSION="$(make get-version)"
echo "Setting build-binary-local-image-name to ${BUILD_BINARY_LOCAL_IMAGE_NAME}"
-echo "::set-output name=build-binary-local-image-name::${BUILD_BINARY_LOCAL_IMAGE_NAME}"
+echo "build-binary-local-image-name=${BUILD_BINARY_LOCAL_IMAGE_NAME}" >> $GITHUB_OUTPUT
echo "Setting build-binary-local-image-name-version to ${BUILD_BINARY_LOCAL_IMAGE_VERSION}"
-echo "::set-output name=build-binary-local-image-version::${BUILD_BINARY_LOCAL_IMAGE_VERSION}"
+echo "build-binary-local-image-version=${BUILD_BINARY_LOCAL_IMAGE_VERSION}" >> $GITHUB_OUTPUT
diff --git a/.github/actions/kamel-build-bundle/build-bundle-image.sh b/.github/actions/kamel-build-bundle/build-bundle-image.sh
index f6c509cbf..625ac0f2b 100755
--- a/.github/actions/kamel-build-bundle/build-bundle-image.sh
+++ b/.github/actions/kamel-build-bundle/build-bundle-image.sh
@@ -134,4 +134,4 @@ fi
#
PULL_BUNDLE_LOCAL_IMAGE="${REGISTRY_PULL_HOST}/${IMAGE_NAMESPACE}/${BUNDLE_IMAGE_BASE_NAME}:${IMAGE_VERSION}"
echo "Setting build-bundle-local-image to ${PULL_BUNDLE_LOCAL_IMAGE}"
-echo "::set-output name=build-bundle-local-image::${PULL_BUNDLE_LOCAL_IMAGE}"
+echo "build-bundle-local-image=${PULL_BUNDLE_LOCAL_IMAGE}" >> $GITHUB_OUTPUT
diff --git a/.github/actions/kamel-build-bundle/build-index-image.sh b/.github/actions/kamel-build-bundle/build-index-image.sh
index 48d5c2a79..670f46997 100755
--- a/.github/actions/kamel-build-bundle/build-index-image.sh
+++ b/.github/actions/kamel-build-bundle/build-index-image.sh
@@ -259,4 +259,4 @@ docker build . -f catalog.Dockerfile -t ${LOCAL_IIB}
docker push ${LOCAL_IIB}
BUILD_BUNDLE_LOCAL_IMAGE_BUNDLE_INDEX="${REGISTRY_PULL_HOST}/${IMAGE_NAMESPACE}/camel-k-iib:${IMAGE_VERSION}"
echo "Setting build-bundle-image-bundle-index to ${BUILD_BUNDLE_LOCAL_IMAGE_BUNDLE_INDEX}"
-echo "::set-output name=build-bundle-image-bundle-index::${BUILD_BUNDLE_LOCAL_IMAGE_BUNDLE_INDEX}"
+echo "build-bundle-image-bundle-index=${BUILD_BUNDLE_LOCAL_IMAGE_BUNDLE_INDEX}" >> $GITHUB_OUTPUT
diff --git a/.github/actions/kamel-config-cluster-custom/connect-cluster.sh b/.github/actions/kamel-config-cluster-custom/connect-cluster.sh
index 006f32c4e..019dc7173 100755
--- a/.github/actions/kamel-config-cluster-custom/connect-cluster.sh
+++ b/.github/actions/kamel-config-cluster-custom/connect-cluster.sh
@@ -83,25 +83,25 @@ if [ ! $(has_property image-registry-push-host) ]; then
exit 1
fi
-echo "::set-output name=cluster-image-registry-push-host::$(get_property image-registry-push-host)"
-echo "::set-output name=cluster-image-registry-pull-host::$(get_property image-registry-pull-host)"
-echo "::set-output name=cluster-image-registry-insecure::$(get_property image-registry-insecure)"
-echo "::set-output name=cluster-catalog-source-name::$(get_property catalog-source-name)"
-echo "::set-output name=cluster-catalog-source-namespace::$(get_property catalog-source-namespace)"
-echo "::set-output name=cluster-global-operator-namespace::$(get_property global-operator-namespace)"
+echo "cluster-image-registry-push-host=$(get_property image-registry-push-host)" >> $GITHUB_OUTPUT
+echo "cluster-image-registry-pull-host=$(get_property image-registry-pull-host)" >> $GITHUB_OUTPUT
+echo "cluster-image-registry-insecure=$(get_property image-registry-insecure)" >> $GITHUB_OUTPUT
+echo "cluster-catalog-source-name=$(get_property catalog-source-name)" >> $GITHUB_OUTPUT
+echo "cluster-catalog-source-namespace=$(get_property catalog-source-namespace)" >> $GITHUB_OUTPUT
+echo "cluster-global-operator-namespace=$(get_property global-operator-namespace)" >> $GITHUB_OUTPUT
#
# Export the image namespace if defined in the cluster config
#
if [ $(has_property image-namespace) ]; then
- echo "::set-output name=cluster-image-namespace::$(get_property image-namespace)"
+ echo "cluster-image-namespace=$(get_property image-namespace)" >> $GITHUB_OUTPUT
fi
#
# Export the context used for admin and user
#
-echo "::set-output name=cluster-kube-admin-user-ctx::$(get_property kube-admin-user-ctx)"
-echo "::set-output name=cluster-kube-user-ctx::$(get_property kube-user-ctx)"
+echo "cluster-kube-admin-user-ctx=$(get_property kube-admin-user-ctx)" >> $GITHUB_OUTPUT
+echo "cluster-kube-user-ctx=$(get_property kube-user-ctx)" >> $GITHUB_OUTPUT
#
# Keep values private in the log
@@ -114,7 +114,7 @@ echo "::add-mask::$(get_property kube-user-ctx)"
#
# Export the flag for olm capability
#
-echo "::set-output name=cluster-has-olm::$(get_property has-olm)"
+echo "cluster-has-olm=$(get_property has-olm)" >> $GITHUB_OUTPUT
#
# Login to docker if registry is externally secured
diff --git a/.github/actions/kamel-config-cluster-kind/extract-config.sh b/.github/actions/kamel-config-cluster-kind/extract-config.sh
index 69b492465..b23e0dae2 100755
--- a/.github/actions/kamel-config-cluster-kind/extract-config.sh
+++ b/.github/actions/kamel-config-cluster-kind/extract-config.sh
@@ -26,19 +26,19 @@
set -e
# Kind has the same interface for both pushing and pulling images in its registry
-echo "::set-output name=cluster-image-registry-push-host::${KIND_REGISTRY}"
-echo "::set-output name=cluster-image-registry-pull-host::${KIND_REGISTRY}"
-echo "::set-output name=cluster-image-registry-insecure::$(echo true)"
+echo "cluster-image-registry-push-host=${KIND_REGISTRY}" >> $GITHUB_OUTPUT
+echo "cluster-image-registry-pull-host=${KIND_REGISTRY}" >> $GITHUB_OUTPUT
+echo "cluster-image-registry-insecure=$(echo true)" >> $GITHUB_OUTPUT
#
# Export the context used for admin and user
# Since kind has no rbac switched on then these can be the same
#
-echo "::set-output name=cluster-kube-admin-user-ctx::$(kubectl config current-context)"
-echo "::set-output name=cluster-kube-user-ctx::$(kubectl config current-context)"
+echo "cluster-kube-admin-user-ctx=$(kubectl config current-context)" >> $GITHUB_OUTPUT
+echo "cluster-kube-user-ctx=$(kubectl config current-context)" >> $GITHUB_OUTPUT
# Set the image namespace
-echo "::set-output name=cluster-image-namespace::$(echo apache)"
+echo "cluster-image-namespace=$(echo apache)" >> $GITHUB_OUTPUT
#
# cluster-catalog-source-namespace intentionally blank as OLM not routinely installed
@@ -48,4 +48,4 @@ echo "::set-output name=cluster-image-namespace::$(echo apache)"
#
# Export the flag for olm capability
#
-echo "::set-output name=cluster-has-olm::$(echo false)"
+echo "cluster-has-olm=$(echo false)" >> $GITHUB_OUTPUT
diff --git a/.github/actions/kamel-config-cluster-ocp3/action.yml b/.github/actions/kamel-config-cluster-ocp3/action.yml
index aa772b547..f87c87107 100644
--- a/.github/actions/kamel-config-cluster-ocp3/action.yml
+++ b/.github/actions/kamel-config-cluster-ocp3/action.yml
@@ -105,7 +105,7 @@ runs:
oc login -u system:admin
# Export the context used for admin login
- echo "::set-output name=cluster-kube-admin-user-ctx::$(oc config current-context)"
+ echo "cluster-kube-admin-user-ctx=$(oc config current-context)" >> $GITHUB_OUTPUT
# Aggregate pod eviction permission to the default admin role
cat <<EOF | oc apply -f -
@@ -192,18 +192,18 @@ runs:
oc login -u developer
# Export the context used for developer login
- echo "::set-output name=cluster-kube-user-ctx::$(oc config current-context)"
+ echo "cluster-kube-user-ctx=$(oc config current-context)" >> $GITHUB_OUTPUT
- id: extract-config
shell: bash
if: ${{ env.CLUSTER_OCP3_CONFIGURED != 'true' }}
run: |
- echo "::set-output name=cluster-image-registry-pull-host::"
- echo "::set-output name=cluster-image-registry-push-host::"
- echo "::set-output name=cluster-image-registry-insecure::$(echo true)"
- echo "::set-output name=cluster-has-olm::$(echo false)"
- echo "::set-output name=cluster-image-namespace::$(echo apache)"
- echo "::set-output name=cluster-global-operator-namespace::$(echo openshift-operators)"
+ echo "cluster-image-registry-pull-host=" >> $GITHUB_OUTPUT
+ echo "cluster-image-registry-push-host=" >> $GITHUB_OUTPUT
+ echo "cluster-image-registry-insecure=$(echo true)" >> $GITHUB_OUTPUT
+ echo "cluster-has-olm=$(echo false)" >> $GITHUB_OUTPUT
+ echo "cluster-image-namespace=$(echo apache)" >> $GITHUB_OUTPUT
+ echo "cluster-global-operator-namespace=$(echo openshift-operators)" >> $GITHUB_OUTPUT
/* cluster-catalog-source-namespace intentionally blank due to using straight docker */
outputs:
diff --git a/.github/actions/kamel-config-cluster/action.yaml b/.github/actions/kamel-config-cluster/action.yaml
index 3f2b88e52..d73b44e90 100644
--- a/.github/actions/kamel-config-cluster/action.yaml
+++ b/.github/actions/kamel-config-cluster/action.yaml
@@ -43,16 +43,17 @@ runs:
# Have custom cluster-config-data so override cluster-type
#
echo "Have cluster-config-data so setting cluster-type to custom"
- echo "CLUSTER_TYPE=custom" >> $GITHUB_ENV
+ calculated_cluster_type=custom
elif [ -n "${{ inputs.cluster-type }}" ]; then
echo "Cluster-type specified so setting accordingly"
- echo "CLUSTER_TYPE=${{ inputs.cluster-type }}" >> $GITHUB_ENV
+ calculated_cluster_type=${{ inputs.cluster-type }}
else
echo "Info: No cluster configuration supplied. Default to kind."
- echo "CLUSTER_TYPE=kind" >> $GITHUB_ENV
+ calculated_cluster_type=kind
fi
- echo "CLUSTER_TYPE -> ${{ env.CLUSTER_TYPE }}"
+ echo "CLUSTER_TYPE -> ${calculated_cluster_type}"
+ echo "CLUSTER_TYPE=${calculated_cluster_type}" >> $GITHUB_ENV
- id: execute-kind
name: Maybe Execute Kind Cluster
@@ -134,14 +135,14 @@ runs:
if [ "${{ steps.cluster-config.outputs.cluster-has-olm }}" == "true" ]; then
# OLM already installed by default
echo "OLM already available in cluster"
- echo "::set-output name=cluster-has-olm::${{ steps.cluster-config.outputs.cluster-has-olm }}"
+ echo "cluster-has-olm=${{ steps.cluster-config.outputs.cluster-has-olm }}" >> $GITHUB_OUTPUT
exit 0
fi
if [ "${{ inputs.require-olm }}" != "true" ]; then
# OLM not explicitly requested
echo "OLM not explicity required for testing"
- echo "::set-output name=cluster-has-olm::$(echo false)"
+ echo "cluster-has-olm=$(echo false)" >> $GITHUB_OUTPUT
exit 0
fi
@@ -176,7 +177,7 @@ runs:
echo "Return to original kube context"
kubectl config use-context "${ctx}"
- echo "::set-output name=cluster-has-olm::$(echo true)"
+ echo "cluster-has-olm=$(echo true)" >> $GITHUB_OUTPUT
echo "Complete"
diff --git a/.github/actions/kamel-config-cluster/output-config.sh b/.github/actions/kamel-config-cluster/output-config.sh
index 2b196f31d..8b552e56e 100755
--- a/.github/actions/kamel-config-cluster/output-config.sh
+++ b/.github/actions/kamel-config-cluster/output-config.sh
@@ -69,25 +69,25 @@ while getopts ":a:b:c:g:n:o:p:q:s:u:" opt; do
done
shift $((OPTIND-1))
-echo "::set-output name=cluster-image-registry-push-host::${PUSH_HOST}"
-echo "::set-output name=cluster-image-registry-pull-host::${PULL_HOST}"
-echo "::set-output name=cluster-image-registry-insecure::${INSECURE}"
-echo "::set-output name=cluster-kube-admin-user-ctx::${ADMIN_USER_CTX}"
-echo "::set-output name=cluster-kube-user-ctx::${USER_CTX}"
+echo "cluster-image-registry-push-host=${PUSH_HOST}" >> $GITHUB_OUTPUT
+echo "cluster-image-registry-pull-host=${PULL_HOST}" >> $GITHUB_OUTPUT
+echo "cluster-image-registry-insecure=${INSECURE}" >> $GITHUB_OUTPUT
+echo "cluster-kube-admin-user-ctx=${ADMIN_USER_CTX}" >> $GITHUB_OUTPUT
+echo "cluster-kube-user-ctx=${USER_CTX}" >> $GITHUB_OUTPUT
# Set the image namespace
-echo "::set-output name=cluster-image-namespace::${IMAGE_NAMESPACE}"
+echo "cluster-image-namespace=${IMAGE_NAMESPACE}" >> $GITHUB_OUTPUT
# Set the catalog source
-echo "::set-output name=cluster-catalog-source-name::${CATALOG_SOURCE_NAME}"
-echo "::set-output name=cluster-catalog-source-namespace::${CATALOG_SOURCE_NAMESPACE}"
+echo "cluster-catalog-source-name=${CATALOG_SOURCE_NAME}" >> $GITHUB_OUTPUT
+echo "cluster-catalog-source-namespace=${CATALOG_SOURCE_NAMESPACE}" >> $GITHUB_OUTPUT
#
# Export the flag for olm capability
#
-echo "::set-output name=cluster-has-olm::${HAS_OLM}"
+echo "cluster-has-olm=${HAS_OLM}" >> $GITHUB_OUTPUT
#
# Export the flag for testing using global operator
#
-echo "::set-output name=cluster-global-operator-namespace::${GLOBAL_OPERATOR_NAMESPACE}"
+echo "cluster-global-operator-namespace=${GLOBAL_OPERATOR_NAMESPACE}" >> $GITHUB_OUTPUT
diff --git a/.github/actions/kamel-prepare-env/action.yml b/.github/actions/kamel-prepare-env/action.yml
index 120d6fc7b..66cbaf7ef 100644
--- a/.github/actions/kamel-prepare-env/action.yml
+++ b/.github/actions/kamel-prepare-env/action.yml
@@ -95,7 +95,7 @@ runs:
# Install a version of kubectl for generic access to cluster
#
- id: install-kubectl
- uses: azure/setup-kubectl@v1
+ uses: azure/setup-kubectl@v3
if: ${{ env.KAMEL_PREPARE_ENV != 'true' }}
with:
version: 'latest'