I am experiencing issues on some builds because the environment variable
CIRCLE_PULL_REQUEST(S) are not being set.
The builds are being triggered by commits to the branch where the changes are being accumulated (not the target branch of the PR). I am using Github.
I have a bash script checking specifically for this environment variable and executing custom logic based on it.
if [[ ! -z $CIRCLE_PULL_REQUEST ]]; then # execute ui tests fi
The logic is pretty trivial and basically executes UI tests or not, based on the presence of the variable.
Today, I had to manually rebuild a job 5 times for the environment variable to be set in the container.