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?
Related
I have a Gatsby project that is integrated with a jenkins CI/CD pipeline. I define a variable in the jenkins pipeline like so:
environment {
my_env = "${env.GIT_BRANCH"
}
I have pipelines that run from the dev and master branches of the repo hosting my Gatsby project. I want to use this variable in my Gatsby config file so that when I run a pipeline gatsby will pull content from either the dev or master environments of the CMS I'm using.
The problem is Gatsby seems only able to read environment variables from .env files out of the box. I am not sure how to get it to read variable from something that's not a .env but also stored in the root (in this case, a jenkinsfile). Is there any workaround for this?
If you set your enviornment variable in jenkinsfile,and using the same agent , then you can just access that variable using env..
environment {
MY_ENV_VAR="myvalue"
}
// you can access using:
env.MY_ENV_VAR
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?
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?
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
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()