openshift-pipelines / pipelines-as-code

Pipelines-as-Code for Tekton
https://pipelinesascode.com
Apache License 2.0
137 stars 81 forks source link

`tkn-pac resolve` with private remote HTTP URLs #1812

Open mpreu opened 2 weeks ago

mpreu commented 2 weeks ago

Hi,

I use PAC with a GitHub Enterprise instance and task references like

pipelinesascode.tekton.dev/task: https://ghe.com/org/repo/blob/main/task.yaml

While these work fine in the cluster environment , I cannot get them to work with tkn-pac resolve for testing.

Using tkn-pac resolve -f run.yaml results in

Error: error getting remote task from pipelinerun annotations: remote task from uri: https://ghe.com/org/repo/blob/main/task.yaml cannot be parsed as a kubernetes resource: yaml: line 32: mapping values are not allowed in this context

I have to use the raw URLs, which have a constantly changing token ?token=XXX appended in GHE, or replace all references with local references. Both solutions are not really practical to work with. Adding a provider token with -t does not seem to help either.

Is this expected or is there a solution I am missing?