Details
-
Suggestion
-
Resolution: Fixed
Description
Hi there,
I have a request regarding Bitbucket Pipelines.
If I push to branch-A, I want to run tests using branch-A envs.
If I push to branch-B, I want to run tests using branch-B envs.
I have tried the following but it would revert the env to whatever env I set from the Repository Envs.
Test
Prerequisite
- Repository Env already has MY_ENV=hello
branch A
- step1: MY_ENV=world
- step2: echo $MY_ENV (result: hello)
Conclusion
Basically on a new step, whatever ENV I set in the previous step gets reset. I will create an issue in the public issue tracker.
Right now what I am doing is creating duplicate steps that all do the same thing (build, test) but just changes the ENV in the beginning, which isn't a huge issue. It just would be nice to be able to reuse steps instead and just switch out the env.