inputs > gewoon params is zo een rare change

This commit is contained in:
2020-03-16 14:13:58 +01:00
parent c7474c0132
commit 51d4dd6f4e
20 changed files with 74 additions and 45 deletions

View File

@@ -3,6 +3,7 @@ apiVersion: tekton.dev/v1alpha1
kind: Task
metadata:
name: build-and-push
namespace: tekton-pipeline-1
spec:
params:
- name: context

View File

@@ -3,6 +3,7 @@ apiVersion: tekton.dev/v1alpha1
kind: Task
metadata:
name: create-webhook
namespace: tekton-pipeline-1
spec:
volumes:
- name: github-secret
@@ -44,7 +45,7 @@ spec:
set -e
echo "Create Webhook"
if [ $(inputs.params.GitHubDomain) = "github.com" ];then
curl -v -d "{\"name\": \"web\",\"active\": true,\"events\": $(inputs.params.WebhookEvents),\"config\": {\"url\": \"https://$(inputs.params.ExternalDomain)\",\"content_type\": \"json\",\"insecure_ssl\": \"0\" ,\"secret\": \"$(cat /var/secret/$(inputs.params.GitHubSecretStringKey))\"}}" -X POST -u $(inputs.params.GitHubUser):$(cat /var/secret/$(inputs.params.GitHubAccessTokenKey)) -L https://api.github.com/repos/$(inputs.params.GitHubOrg)/$(inputs.params.GitHubRepo)/hooks
curl -v -d "{\"name\": \"web\",\"active\": true,\"events\": $(inputs.params.WebhookEvents),\"config\": {\"url\": \"https://$(inputs.params.ExternalDomain)\",\"content_type\": \"json\"}}" -X POST -u $(inputs.params.GitHubUser):$(cat /var/secret/$(inputs.params.GitHubAccessTokenKey)) -L https://api.github.com/repos/$(inputs.params.GitHubOrg)/$(inputs.params.GitHubRepo)/hooks
else
curl -d "{\"name\": \"web\",\"active\": true,\"events\": $(inputs.params.WebhookEvents),\"config\": {\"url\": \"https://$(inputs.params.ExternalDomain)/\",\"content_type\": \"json\",\"insecure_ssl\": \"1\" ,\"secret\": \"$(cat /var/secret/$(inputs.params.GitHubSecretStringKey))\"}}" -X POST -u $(inputs.params.GitHubUser):$(cat /var/secret/$(inputs.params.GitHubAccessTokenKey)) -L https://$(inputs.params.GitHubDomain)/api/v3/repos/$(inputs.params.GitHubOrg)/$(inputs.params.GitHubRepo)/hooks
fi

View File

@@ -4,6 +4,7 @@ apiVersion: tekton.dev/v1alpha1
kind: Task
metadata:
name: deploy-app
namespace: tekton-pipeline-1
spec:
params:
- name: yaml-location

View File

@@ -3,6 +3,7 @@ apiVersion: tekton.dev/v1alpha1
kind: Task
metadata:
name: git-clone
namespace: tekton-pipeline-1
spec:
workspaces:
- name: output
@@ -50,17 +51,17 @@ spec:
rm -rf "$CHECKOUT_DIR"/..?*
fi
}
if [[ "$(inputs.params.deleteExisting)" == "true" ]] ; then
if [[ "$(params.deleteExisting)" == "true" ]] ; then
cleandir
ls -lah "$CHECKOUT_DIR"
fi
/ko-app/git-init \
-url "$(inputs.params.url)" \
-revision "$(inputs.params.revision)" \
-url "$(params.url)" \
-revision "$(params.revision)" \
-path "$CHECKOUT_DIR" \
-sslVerify "$(inputs.params.sslVerify)" \
-submodules "$(inputs.params.submodules)" \
-depth "$(inputs.params.depth)"
-sslVerify "$(params.sslVerify)" \
-submodules "$(params.submodules)" \
-depth "$(params.depth)"
cd "$CHECKOUT_DIR"
RESULT_SHA="$(git rev-parse HEAD | tr -d '\n')"
EXIT_CODE="$?"