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

Proposal: Permit custom buildCommand to export skaffold ENV vars that could be referenced in later in skaffold.yaml templating #3737

Open
bitsofinfo opened this issue Feb 26, 2020 · 4 comments

Comments

@bitsofinfo
Copy link

bitsofinfo commented Feb 26, 2020

Permit custom buildCommand to export skaffold ENV vars that could be referenced in Helm releases

Would be great if this:

build:
  artifacts:
    - image: myreg.test.com/my/my-app
      custom: 
        buildCommand: ./builder.sh
...

Could (via STDOUT or other means) convey some variables that Skaffold could add to its execution environment whereby they could be referenced elsewhere in skaffold.yaml, i.e.

deploy:
  helm:
    releases:
      - name: my-app-{{.SOME_VAR_SET_BY_BUILD_CMD}}
        chartPath: bitsofinfo-appdeploy/appdeploy
        remote: true
        version: 1.1.14
...

maybe something like if the process has STDOUT that contains something like

skaffold.setenvvar.SOME_VAR_SET_BY_BUILD_CMD=myvalue

that could be exported into the skaffold environment for reference later on the templating in skaffold.yaml.

Really really could use this!

Azure pipelines has this kind of functionality so this is not unprecedented in the world of cicd.

https://docs.microsoft.com/en-us/azure/devops/pipelines/process/variables?view=azure-devops&tabs=yaml%2Cbatch#set-variables-in-scripts

@bitsofinfo bitsofinfo changed the title Permit custom buildCommand to export skaffold ENV vars that could be referenced in Helm releases Permit custom buildCommand to export skaffold ENV vars that could be referenced in later in skaffold.yaml templating Feb 26, 2020
@bitsofinfo bitsofinfo changed the title Permit custom buildCommand to export skaffold ENV vars that could be referenced in later in skaffold.yaml templating Proposal: Permit custom buildCommand to export skaffold ENV vars that could be referenced in later in skaffold.yaml templating Feb 26, 2020
@bitsofinfo
Copy link
Author

#1441

@nkubala
Copy link
Contributor

nkubala commented Feb 29, 2020

@bitsofinfo yeah pre-deploy hooks immediately came to mind. would that fully address this for you? if so can we close this as a dupe?

@bitsofinfo
Copy link
Author

@nkubala, well not really, this ticket is about permitting buildCommands to have a way to declare variables that can be consumed by other skaffold components. related I guess, but i don't see anything in that other original poster's issue about what I am proposing here.

@nkubala nkubala added this to the Backlog [P0/P1] milestone Sep 1, 2020
@nkubala nkubala removed this from the Backlog [P0/P1] milestone May 11, 2021
@tejal29 tejal29 added priority/p2 May take a couple of releases and removed area/hooks priority/p1 High impact feature/bug. labels Jul 1, 2021
@tejal29
Copy link
Member

tejal29 commented Jul 1, 2021

Reducing priority for the feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants