From d7660abb3fe11ef724e45277b4f48c31f1c94952 Mon Sep 17 00:00:00 2001 From: Matej Vasek Date: Wed, 5 Apr 2023 18:51:38 +0200 Subject: [PATCH] doc: refer specific verision of Tekton not latest (#1669) * doc: refer specific verision of Tekton not latest Signed-off-by: Matej Vasek * fixup Signed-off-by: Matej Vasek * fixup: shell-check Signed-off-by: Matej Vasek --------- Signed-off-by: Matej Vasek --- docs/building-functions/on_cluster_build.md | 2 +- hack/tekton.sh | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/building-functions/on_cluster_build.md b/docs/building-functions/on_cluster_build.md index 144bc84c..01e10f66 100644 --- a/docs/building-functions/on_cluster_build.md +++ b/docs/building-functions/on_cluster_build.md @@ -8,7 +8,7 @@ This guide describes how you can build a Function on Cluster with Tekton Pipelin ## Prerequisite 1. Install Tekton Pipelines on the cluster. Please refer to [Tekton Pipelines documentation](https://github.com/tektoncd/pipeline/blob/main/docs/install.md) or run the following command: ```bash -kubectl apply -f https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml +kubectl apply -f https://storage.googleapis.com/tekton-releases/pipeline/previous/v0.42.0/release.yaml ``` ## Enabling a namespace to run Function related Tekton Pipelines diff --git a/hack/tekton.sh b/hack/tekton.sh index c66977f7..0ba405ff 100755 --- a/hack/tekton.sh +++ b/hack/tekton.sh @@ -22,29 +22,29 @@ set -o pipefail export TERM="${TERM:-dumb}" -tekton_release="previous/v0.38.3" +tekton_release="previous/v0.42.0" git_clone_release="0.4" namespace="${NAMESPACE:-default}" -tasks_source_path=$(dirname $(cd $(dirname $0) && pwd )) +tasks_source_path="$(dirname "$(cd "$(dirname "$0")" && pwd )")" tekton() { echo "Installing Tekton..." - kubectl apply -f https://storage.googleapis.com/tekton-releases/pipeline/${tekton_release}/release.yaml + kubectl apply -f "https://storage.googleapis.com/tekton-releases/pipeline/${tekton_release}/release.yaml" sleep 10 kubectl wait pod --for=condition=Ready --timeout=180s -n tekton-pipelines -l "app=tekton-pipelines-controller" kubectl wait pod --for=condition=Ready --timeout=180s -n tekton-pipelines -l "app=tekton-pipelines-webhook" sleep 10 - kubectl create clusterrolebinding ${namespace}:knative-serving-namespaced-admin \ - --clusterrole=knative-serving-namespaced-admin --serviceaccount=${namespace}:default + kubectl create clusterrolebinding "${namespace}:knative-serving-namespaced-admin" \ + --clusterrole=knative-serving-namespaced-admin --serviceaccount="${namespace}:default" } tekton_tasks() { echo "Creating Pipeline tasks..." - kubectl apply -f https://raw.githubusercontent.com/tektoncd/catalog/master/task/git-clone/${git_clone_release}/git-clone.yaml - kubectl apply -f ${tasks_source_path}/pkg/pipelines/resources/tekton/task/func-buildpacks/0.1/func-buildpacks.yaml - kubectl apply -f ${tasks_source_path}/pkg/pipelines/resources/tekton/task/func-s2i/0.1/func-s2i.yaml - kubectl apply -f ${tasks_source_path}/pkg/pipelines/resources/tekton/task/func-deploy/0.1/func-deploy.yaml + kubectl apply -f "https://raw.githubusercontent.com/tektoncd/catalog/master/task/git-clone/${git_clone_release}/git-clone.yaml" + kubectl apply -f "${tasks_source_path}/pkg/pipelines/resources/tekton/task/func-buildpacks/0.1/func-buildpacks.yaml" + kubectl apply -f "${tasks_source_path}/pkg/pipelines/resources/tekton/task/func-s2i/0.1/func-s2i.yaml" + kubectl apply -f "${tasks_source_path}/pkg/pipelines/resources/tekton/task/func-deploy/0.1/func-deploy.yaml" } ## Parse input parameters @@ -56,7 +56,7 @@ if [ $# -gt 1 ] ; then exit 1 fi if [ $# -eq 1 ] ; then - if [ $1 == "--tasks-only" ] + if [ "$1" == "--tasks-only" ] then tasks_only=true else