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

Allow use of --custom argument for image repository, tag, and/or digest values #2842

Open
madrum opened this issue Jul 28, 2023 · 0 comments
Labels
suggestion Idea for maintainers to consider. Do not take this issue until triaged.

Comments

@madrum
Copy link

madrum commented Jul 28, 2023

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

  • It is cumbersome to maintain logic/scripts to update image repository, tag, and/or digest values in the porter.yaml file within a pipeline when the logic could be simplified if the porter CLI allowed setting these values with --custom arguments.
  • Scenario:
    • A pipeline builds an application and creates/pushes/tags a docker image for that application.
    • A subsequent stage of the pipeline creates a porter bundle that includes this image.
      • In order for the bundle to include the proper image, the porter.yaml must be updated with the tag used in the first stage of the pipeline run.
    • The next stage uses the porter bundle to deploy the application and dependencies in a temporary environment for an end-to-end test.

Describe the solution you'd like

Describe alternatives you've considered
We currently use a script to modify the porter.yaml file before creating porter bundles.

Additional context
Example porter.yaml snippet that would allow the custom application image tag to be updated with a custom argument.

name: mybundle

custom:
  powershellImageTag: latest # 7.3.6, 7.3.5, 7.2.13
  myCustomAppImageTag: 1.2.3.4
  myCustomAppImageRepoProject: main

images:
  powershell:
    description: Basic PowerShell docker image... usually "latest", but not always
    repository: mcr.microsoft.com/powershell
    tag: ${ bundle.custom.powershellImageTag }
  my-custom-application:
    description: My custom application image where image tag changes with every build pipeline run, and repo path can vary depending on which branch the code was built from.
    repository: myacr.azurecr.io/${ bundle.custom.myCustomAppImageRepoProject }/my-custom-app
    tag: ${ bundle.custom.myCustomAppImageTag }
@madrum madrum added the suggestion Idea for maintainers to consider. Do not take this issue until triaged. label Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
suggestion Idea for maintainers to consider. Do not take this issue until triaged.
Projects
Status: 🆕 New
Development

No branches or pull requests

1 participant