-
Type:
Suggestion
-
Resolution: Unresolved
-
Component/s: Pipelines - YAML Configuration
-
None
-
1
Issue Summary
Currently, there is no built-in way to determine whether a Bitbucket Pipelines build is being executed on Atlassian's infrastructure or on Runners. This limitation presents challenges for users who need to configure environment-specific settings, such as HTTP proxies, which differ between these environments.
Steps to Reproduce
- Set up a Bitbucket Pipeline that includes steps executed on both Atlassian infrastructure and custom Runners.
- Configure an HTTP_PROXY environment variable needed for Runners to access the internet.
Expected Results
The pipeline should be able to determine the execution environment (Atlassian infrastructure vs. Runners) and apply the appropriate configuration settings, such as the HTTP_PROXY, only when necessary.
Actual Results
Without the ability to differentiate the execution environment, the HTTP_PROXY variable is set globally. This causes builds executed on Atlassian infrastructure to fail due to incorrect proxy configuration, while those on Runners work as intended.
Proposed Solution:
Introduce a default environment variable or another mechanism within Bitbucket Pipelines that:
- Automatically identifies and indicates the environment (Atlassian infrastructure or Runner) in which a build is being executed.
- Allows conditional logic in the pipeline configuration to set environment-specific variables, such as HTTP_PROXY, only when required for builds on Runners.
This enhancement would enable users to maintain efficient and error-free pipeline configurations across different execution environments.