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

option for loading build arg files from yaml, supporting dynamic multiline build args #122

Open
featheredtoast opened this issue Sep 8, 2024 · 0 comments · May be fixed by #123
Open

option for loading build arg files from yaml, supporting dynamic multiline build args #122

featheredtoast opened this issue Sep 8, 2024 · 0 comments · May be fixed by #123
Labels
enhancement New feature or request

Comments

@featheredtoast
Copy link

featheredtoast commented Sep 8, 2024

Is your feature request related to a problem? Please describe.

Current build arg file doesn't support multiline build args. However you're able to pass in multiline build args like:

params:
  BUILD_ARG_foo: |
    first line
    second line
    third line
platform: linux
image_resource:
  type: registry-image
  source:
    repository: concourse/oci-build-task

I'd like to have a setup like the following

myvars.yaml - from an input, my-input

  foo: |
    first line
    second line
    third line

task definition:

- task my-oci-build-task
  params:
    BUILD_ARGS_FILE: my-input/myvars.yaml
  platform: linux
  image_resource:
    type: registry-image
    source:
      repository: concourse/oci-build-task
  inputs:
    - name: my-input

When the docker image is built, the build arg foo has a value of:

first line
second line
third line

Describe the solution you'd like

Rather than a key=value file, give an option to pass a yaml file for build args, in the same way we can for raw params direct in the build job.

Describe alternatives you've considered

Currently I'm generating and outputting the entire task from the source, and then feeding that (as a var) into a task defined with a file param.

This works but is not ideal as the task definition moves to the program generating the build arg params.

I've also tried doing this with load_var steps, but build arg params here are also dynamic so I'm unable to pass them down from a load_var step.

Additional context

No response

@featheredtoast featheredtoast added the enhancement New feature or request label Sep 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant