chore: ability to install only Tekton Tasks (#1284)

Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>

Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
This commit is contained in:
Zbynek Roubalik 2022-09-27 17:36:15 +02:00 committed by GitHub
parent e0bbcc2d08
commit 047a6d875d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 22 additions and 1 deletions

View File

@ -44,7 +44,28 @@ tekton_tasks() {
kubectl apply -f ./pipelines/resources/tekton/task/func-deploy/0.1/func-deploy.yaml kubectl apply -f ./pipelines/resources/tekton/task/func-deploy/0.1/func-deploy.yaml
} }
tekton ## Parse input parameters
# Supported parameters:
# --tasks-only - install only Tekton Tasks
tasks_only=false
if [ $# -gt 1 ] ; then
echo "Unknown parameters, use '--tasks-only' to only install Tekton Tasks"
exit 1
fi
if [ $# -eq 1 ] ; then
if [ $1 == "--tasks-only" ]
then
tasks_only=true
else
echo "Unknown parameter '${1}', use '--tasks-only' to only install Tekton Tasks"
exit 1
fi
fi
## Installation phase
if [ $tasks_only = false ] ; then
tekton
fi
tekton_tasks tekton_tasks
echo Done echo Done