Define an Array in Bitbucket Pipelines Deployment Environment Variables - bitbucket

In a config.json file that's passed to Auth0's deploy cli, I have the following variable defined in a config.json file:
"CALLBACKS": ["http://localhost:3000", "https://myapplication.com" ]
That variable can be overridden by an environment variable if it's present. I'm therefore trying to put the same value in the Deployment environment variables but it's not seeing it as an array.
Anything I should do to make it understand that the value above is not a string?

Related

List of available environment variables for cdk CLI?

Is there a list of environment variables that can be set for the AWS CDK CLI? I see there is a CDK_NEW_BOOTSTRAP at https://docs.aws.amazon.com/cdk/v2/guide/bootstrapping.html and a CDK_DEFAULT_REGION and CDK_DEFAULT_REGION at https://docs.aws.amazon.com/cdk/v2/guide/environments.html.
Is there any documentation around the configuration that can be set by environment variables? For example, can I set the qualifier by an environment variable?

How to unset environment variable in Jenkins

I have a Jenkinsfile and the JAVA_HOME environment variable is already set when the process starts up. Unfortunately, this environment variable is being passed into my container when I run a script in docker.inside and is overriding the correct value of the environment variable that is already set in the image.
How do I unset an environment variable in a Jenkins script?

BRANCH env variable is undefined using gatsby cloud

Read-only variables
These variables are pre-defined for both Builds and Preview environments. They are set automatically and cannot be changed. You can reference them in your gatsby-config.js or anywhere else you would normally reference an environment variable.
BRANCH: The name of the current git branch. Useful for swapping environment variables depending on the branch.
CI: Always true.
GATSBY_CLOUD: Always true. Useful for checking if your build is running on Gatsby Cloud.
This is what gatsby cloud doc said.
but when I print out console for the process.env.BRANCH, it was undefined while process.env.GATSBY_CLOUD is true as expected.
Any help is welcomed.

How to set environment variables used by docker container using Bamboo

I am using Bamboo for building and deploying my docker container. My code uses environment variables. I am using a shell script to set values of those variables with those values being hardcoded in .sh file. Ideally, I would like the values for those environment variables to be passed through bamboo variables. One option is to generate a shell script during bamboo build plan and call that shell script from startup file. Is there any better option to set system environment variables using bamboo variables?
When adding the Docker task in the Plan configuration, you have the option to pass environment variables.
For example, if your Dockerfile has ENV variable test_db_pass you should pass in the Docker task field "Container environment variables" the following: test_db_pass=${bamboo.test_db_pass}
It is possible to define either plan or global variables in Bamboo.
You can then use them in you build.
It's in the documentation :
https://confluence.atlassian.com/bamboo/defining-plan-variables-289276859.html

access ENV_INJECT variables in Jenkins job DSL

I am unable to access any Jenkins environment Variables inside the groovy script of a JobDSL. I can see values of system environment variables.
Here is the groovy script I am running:
println(System.getenv("HOME"))
println(System.getenv("WORKSPACE"))
Here is the output:
/users/s051464
null
I have tried setting environment variables using Environment Injection and that doesn't work either (all set variables are null).
You should be able to use ${VAR_NAME}, more info here. One exception is node specific variables such as WORKSPACE, in those cases you need to do the following (from here):
hudson.FilePath workspace = hudson.model.Executor.currentExecutor().getCurrentWorkspace()

Resources