Details
-
Suggestion
-
Resolution: Fixed
Description
The workflow for environment variables is a little strange.
If I try to define the environment variables before creating the bitbucket-pipelines.yml file, I get an error:
You need to enable Pipelines for this repository to add Environment variables
But if I create the bitbucket-pipelines.yml file before, and reference an environment variable, I'll get an error because it doesn't exist yet and the build will probably fail. I got this error, but it could really be anything caused by a blank variable:
Runtime exception: Invalid email provided for docker login.
So this kind of seems like a chicken and egg problem: I need the variables to create the yml file but I also need the yml file to create the variables.
There is a workaround, which is creating a blank bitbucket-pipelines.yml file, then adding the variables, then editing the yml. But this is bad because I'll always have a first build that doesn't represent my code.