This Bitbucket dotenv pipe uses a dotenv application which has not yet been made public.
The example below shows how to use the Bitbucket pipe in your bitbucket-pipelines.yml.
script:
- pipe: docker://programic/pipe-dotenv:latest
variables:
DOTENV_PROJECT: $DOTENV_PROJECT
DOTENV_ENVIRONMENT: $DOTENV_ENVIRONMENT
DOTENV_API_URL: $DOTENV_API_URL
DOTENV_API_TOKEN: $DOTENV_API_TOKEN
DOTENV_TYPE: "env" # Optional: type of output, e.g. "env" (default) or "js"
DOTENV_FILE_SOURCE: ".env.example"
DOTENV_FILE_TARGET: ".env"
EXTRAS_BITBUCKET_COMMIT: $BITBUCKET_COMMIT
EXTRAS_BITBUCKET_BUILD_NUMBER: $BITBUCKET_BUILD_NUMBER
EXTRAS_BITBUCKET_DEPLOYMENT_ENVIRONMENT: $BITBUCKET_DEPLOYMENT_ENVIRONMENT
Below is an example of what an source file can look like.
APP_NAME="My Project"
APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_URL=https://my-project.test
BITBUCKET_COMMIT=
BITBUCKET_BUILD_NUMBER=
BITBUCKET_DEPLOYMENT_ENVIRONMENT=
SENTRY_LARAVEL_DSN=
SENTRY_ENVIRONMENT="${BITBUCKET_DEPLOYMENT_ENVIRONMENT}"
SENTRY_RELEASE="${BITBUCKET_COMMIT}"
module.exports = {
NODE_ENV: '"local"',
API_URL: '"https://my-project.test"',
SENTRY_DSN: ''
}