Automatically parse all created environment variables to Pipes

Issue #18922 wontfix
Leonardo Montiel staff created an issue

This feature request is for having the Bitbucket Pipelines "Pipes" feature, by default, copy to its container all environment variables that are present on the build container, if not defined in the Pipes definition.

This will prevent huge Pipes options definitions inside the Pipelines yml, as Pipes will already fetch all necessary variables for it to run.

Comments (5)

  1. aneita staff

    Thanks for reaching out and for the suggestion.

    Can you elaborate on your use case for this? Which pipes are you using, where this functionality would be useful?

  2. Alex Maceda

    We’re creating custom pipes that contain our lint/unit testing, deploy, and some integration testing. For example, we need the AWS login credentials and NPM_TOKENS from our Bitbucket Pipelines variables inside the Pipe contexts.

    We’re using Pipes so as we roll out additional pipeline functionality all projects are updated, among other things.

  3. aneita staff

    While I can see how passing all the variables to the pipe by default can simplify the configuration of the pipe, it goes against the value of using pipes. Pipes are meant to be deterministic and reusable for users in any repository, regardless of what their build environment is - users don’t need to worry about having the right variables configured outside of the pipe.

    I can see value in passing the default pipeline variables through to the pipe, but not user-defined variables. Given this, I’m going to close this ticket as wontfix.

  4. Alex Maceda

    The goal here is to remove the need to have user-defined variables passed into the pipe to configure it. Currently all these variables are set in the account level Pipeline variables which users don’t, and shouldn’t have access to, by not allowing us to pass account level variables to our Pipes, then it’s forcing us to use user defined variables in a place that users are required to ensure they exist.

    If you don’t see the value in passing the entire environment, I’m sure you can see the value in passing default pipeline and account level pipeline variables.

  5. Log in to comment