Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve PaC params as default #1397

Open
LvanLeeuwen opened this issue Aug 30, 2023 · 3 comments
Open

Resolve PaC params as default #1397

LvanLeeuwen opened this issue Aug 30, 2023 · 3 comments
Labels
feature New feature or request

Comments

@LvanLeeuwen
Copy link

We have added some of the default Pipelines-as-code parameters to the parameter list of the PipelineRun like this:

params:
  - name: REPO_NAME
    value: "{{ repo_name }}"
  - name: REPO_URL
    value: "{{ repo_url }}"
  - name: REVISION
    value: "{{ revision }}"
  - name: BRANCH
    value: "{{ source_branch }}"
  - name: PULL_REQUEST_NUMBER
    value: "{{ pull_request_number }}"

Adding these values as a default in the Pipeline spec and omitting it in the PipelineRun doesn't seem to resolve the params.
Pipeline.yaml:

params:
  - name: REPO_NAME
    default: "{{ repo_name }}"
  - name: REVISION
  - name: BRANCH
  - name: PULL_REQUEST_NUMBER

PipelineRun.yaml:

params:
  - name: REPO_URL
    value: "{{ repo_url }}"
  - name: REVISION
    value: "{{ revision }}"
  - name: BRANCH
    value: "{{ source_branch }}"
  - name: PULL_REQUEST_NUMBER
    value: "{{ pull_request_number }}"

For example when using a github-set-status task I get the following error:
http.client.InvalidURL: URL can't contain control characters. '/repos/< organisation>/{{ repo_name }}/statuses/< sha>' (found at least ' ')

Would it be possible to enable using pipelines-as-code parameters as default values in the pipeline spec?

@chmouel
Copy link
Member

chmouel commented Aug 30, 2023

yeah, we don't resolve params on remote resources..

I am not against adding it.. (as well having remote tasks from remote pipeline annotations).

any chance you can fill in a RFE on red hat access so we can prioritize this?

@chmouel chmouel added the feature New feature or request label Aug 30, 2023
@Waterstraal
Copy link

Waterstraal commented Aug 30, 2023

yeah, we don't resolve params on remote resources..

I am not against adding it.. (as well having remote tasks from remote pipeline annotations).

any chance you can fill in a RFE on red hat access so we can prioritize this?

Hi @chmouel, I'll be happy to pick that up. Could you explain what an RFE entails, and how the process works of filling one in on Red Hat Access works?

@Waterstraal
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Development

No branches or pull requests

3 participants