diff --git a/docs/create-ingress.yaml b/docs/create-ingress.yaml index 8aa0cd97b..1cfb4ed16 100644 --- a/docs/create-ingress.yaml +++ b/docs/create-ingress.yaml @@ -9,14 +9,14 @@ spec: params: - name: CreateCertificate - description: "Enables/disables the creation of a self-signed certificate for $(inputs.params.ExternalDomain)" + description: "Enables/disables the creation of a self-signed certificate for $(params.ExternalDomain)" default: "true" - name: CertificateKeyPassphrase description: "Phrase that protects private key. This must be provided when the self-signed certificate is created" - name: CertificateSecretName description: "Secret name for Ingress certificate. The Secret should not exist if the self-signed certificate creation is enabled" - name: ExternalDomain - description: "The external domain for the EventListener e.g. `$(inputs.params.EventListenerName).PROXYIP.nip.io`" + description: "The external domain for the EventListener e.g. `$(params.EventListenerName).PROXYIP.nip.io`" - name: Service description: "The name of the Service used in the Ingress. This will also be the name of the Ingress." - name: ServicePort @@ -39,13 +39,13 @@ spec: set -e cat <.nip.io`" + description: "The external domain for the EventListener e.g. `$(params.EventListenerName)..nip.io`" - name: GitHubUser description: "The GitHub user" - name: GitHubRepo @@ -42,8 +42,8 @@ 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\": \"1\" ,\"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 + if [ $(params.GitHubDomain) = "github.com" ];then + curl -v -d "{\"name\": \"web\",\"active\": true,\"events\": $(params.WebhookEvents),\"config\": {\"url\": \"https://$(params.ExternalDomain)\",\"content_type\": \"json\",\"insecure_ssl\": \"1\" ,\"secret\": \"$(cat /var/secret/$(params.GitHubSecretStringKey))\"}}" -X POST -u $(params.GitHubUser):$(cat /var/secret/$(params.GitHubAccessTokenKey)) -L https://api.github.com/repos/$(params.GitHubOrg)/$(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 + curl -d "{\"name\": \"web\",\"active\": true,\"events\": $(params.WebhookEvents),\"config\": {\"url\": \"https://$(params.ExternalDomain)/\",\"content_type\": \"json\",\"insecure_ssl\": \"1\" ,\"secret\": \"$(cat /var/secret/$(params.GitHubSecretStringKey))\"}}" -X POST -u $(params.GitHubUser):$(cat /var/secret/$(params.GitHubAccessTokenKey)) -L https://$(params.GitHubDomain)/api/v3/repos/$(params.GitHubOrg)/$(params.GitHubRepo)/hooks fi