Last active
October 22, 2023 12:06
-
-
Save swyxio/c53634e7e63f0015e43c16bc26832283 to your computer and use it in GitHub Desktop.
BIG FAT LIST OF NETLIFY ENV VARS - now documented at https://docs.netlify.com/configure-builds/environment-variables/#declare-variables
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// please check https://docs.netlify.com/configure-builds/environment-variables/#declare-variables for most up to date info | |
// this was created before those docs existed | |
process.env = { | |
/** | |
* | |
* AUTOMATICALLY SET BY NETLIFY. IMMUTABLE! | |
* docs: https://www.netlify.com/docs/continuous-deployment/#environment-variables | |
* | |
*/ | |
NETLIFY: 'true', | |
// // URLs | |
DEPLOY_URL: 'https://5d4aeac2ccabf517d2f219b7--plsdelete-potato2323.netlify.com', | |
DEPLOY_PRIME_URL: 'https://5d4aeac2ccabf517d2f219b7--plsdelete-potato2323.netlify.com', | |
NETLIFY_IMAGES_CDN_DOMAIN: 'd33wubrfki0l68.cloudfront.net', | |
REPOSITORY_URL: 'https://x-access-token:[email protected]/sw-yx/plsdelete-potato123232', // URL to the Git repository the build pulls changes from. | |
URL: 'https://plsdelete-potato2323.netlify.com', | |
// // git | |
BRANCH: 'master', // Reference to check out after fetching changes from the Git repository. useful in split testing https://www.netlify.com/docs/split-testing/#exposing-split-test-information-in-your-site | |
COMMIT_REF: '1652d2fa7fe231835e4971ca8ba367f6fd629e8a', // Reference of the commit we’re building. | |
HEAD: 'master', // Name of the head branch received from a Git provider. | |
// netlify metadata you can use | |
BUILD_ID: '5d4aeac2ccabf517d2f219b8', | |
CONTEXT: 'production', // Name of the context a deploy is built around, it can be `production`, `deploy-preview` or `branch-deploy`. | |
DEPLOY_ID: '5d4aeac2ccabf517d2f219b7', | |
// // PR DEPLOY PREVIEW Related | |
PULL_REQUEST: 'false', // Whether the build is from a pull/merge request or not. | |
REVIEW_ID: 'deploy-preview-1211', // the ID of a Deploy Preview and the pull/merge request that generated it (e.g. 1211). These two numbers will always match (deploy-preview-12 is for PR # 12 in your repository). | |
// // WEBHOOK TRIGGERED Related | |
INCOMING_HOOK_TITLE: 'foo', // todo: document | |
INCOMING_HOOK_URL: 'foo', // todo: document | |
INCOMING_HOOK_BODY: 'foo', // todo: document https://www.netlify.com/docs/webhooks/#build-hook-payload | |
// note build hooks accept metadata as well https://www.netlify.com/docs/webhooks/#build-hook-metadata | |
/** | |
* THINGS YOU CAN SET TO CHANGE THE BUILD ENVIRONMENT | |
* https://www.netlify.com/docs/build-settings/#build-environment-variables | |
*/ | |
// // settings | |
GIT_LFS_ENABLED: undefined, // If you set a GIT_LFS_ENABLED variable, we’ll use git lfs clone to check out your repository — otherwise we just use git clone. https://www.netlify.com/docs/build-settings/#additional-variables-that-can-affect-the-build | |
// https://www.netlify.com/docs/build-settings/#node-npm-and-yarn | |
NODE_ENV: 'development', | |
YARN_VERSION: '1.17', // only if yarn.lock exists | |
YARN_FLAGS: '--ignore-optional', // only if yarn.lock exists | |
NPM_VERSION: '?', // if package.json exists but yarn.lock does not exist. same npm version that ships with NODE_VERSION | |
NPM_FLAGS: '', // if package.json exists but yarn.lock does not exist. | |
NPM_TOKEN: '?', // If you use NPM, then you can set an NPM_TOKEN environment variable which can be configured to use to fetch dependencies from npmjs.org. TODO: document. https://gist.github.com/biilmann/0b2250095eedc188d0c9 | |
// if bower.json exists we also run bower install --config.interactive=false https://www.netlify.com/docs/build-settings/#bower | |
// grunt: https://www.netlify.com/docs/build-settings/#grunt | |
// build image (Xenial vs Legacy): set in UI https://www.netlify.com/docs/build-settings/#build-image-selection | |
// env version numbers | |
CUSTOM_RUBY: '0', | |
GIMME_GO_VERSION: '1.12', | |
GO_VERSION: '1.12', | |
JAVA_VERSION: 'default_sdk', | |
NODE_VERSION: 'v10.16.2', // can also set a /.nvmrc https://www.netlify.com/docs/continuous-deployment/#node | |
PIPENV_DEFAULT_PYTHON_VERSION: '2.7', | |
PIPENV_RUNTIME: '2.7', // can also set runtime.txt https://www.netlify.com/docs/continuous-deployment/#python | |
// or requirements.txt https://www.netlify.com/docs/build-settings/#python | |
PIPENV_VENV_IN_PROJECT: '1', | |
PS1: '(python2.7) ', | |
RUBY_VERSION: '2.6.2', // can also set .ruby-version https://www.netlify.com/docs/continuous-deployment/#ruby and https://www.netlify.com/docs/build-settings/#ruby | |
SHLVL: '1', | |
YARN_VERSION: '1.17.0', | |
_system_arch: 'x86_64', | |
_system_version: '16.04', | |
rvm_ruby_string: 'ruby-2.6.2', | |
rvm_version: '1.29.7 (latest)', | |
HUGO_VERSION: 'foo', // todo: document https://www.netlify.com/docs/continuous-deployment/#common-build-tools | |
// or https://www.netlify.com/docs/build-settings/#hugo | |
// settings for functions | |
GO_IMPORT_PATH: 'foo', // todo: document https://www.netlify.com/docs/functions/#building-go-functions-with-netlify-s-continuous-deployment | |
AWS_LAMBDA_JS_RUNTIME: '8.10' // you can set to 'nodejs10.x'. todo: document https://www.netlify.com/docs/functions/#javascript-runtime-settings | |
/** | |
* | |
* MISC VARS | |
* | |
*/ | |
// settings & flags | |
GIMME_CGO_ENABLED: 'true', | |
NVM_CD_FLAGS: '', | |
// directories | |
GEM_HOME: '/opt/buildhome/.rvm/gems/ruby-2.6.2', | |
GEM_PATH: '/opt/buildhome/.rvm/gems/ruby-2.6.2:/opt/buildhome/.rvm/gems/ruby-2.6.2@global', | |
GIMME_ENV_PREFIX: '/opt/buildhome/.gimme/env', | |
GOCACHE: '/opt/buildhome/.gimme_cache/gocache', | |
GOPATH: '/opt/buildhome/.gimme_cache/gopath', | |
GOROOT: '/opt/buildhome/.gimme/versions/go1.12.linux.amd64', | |
HOME: '/opt/buildhome', | |
IRBRC: '/opt/buildhome/.rvm/rubies/ruby-2.6.2/.irbrc', | |
MY_RUBY_HOME: '/opt/buildhome/.rvm/rubies/ruby-2.6.2', | |
NETLIFY_BUILD_BASE: '/opt/build', | |
NVM_BIN: '/opt/buildhome/.nvm/versions/node/v10.16.2/bin', | |
NVM_DIR: '/opt/buildhome/.nvm', | |
OLDPWD: '/opt/build/repo', | |
PATH: '/opt/buildhome/.wasmer/bin:/opt/buildhome/.wasmer/globals/wapm_packages/.bin:/opt/buildhome/.gimme/versions/go1.12.linux.amd64/bin:/opt/buildhome/.rvm/gems/ruby-2.6.2/bin:/opt/buildhome/.rvm/gems/ruby-2.6.2@global/bin:/opt/buildhome/.rvm/rubies/ruby-2.6.2/bin:/opt/buildhome/.rvm/bin:/opt/buildhome/.nvm/versions/node/v10.16.2/bin:/opt/buildhome/python2.7/bin:/opt/buildhome/.php:/opt/buildhome/.binrc/bin:/usr/local/rvm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/buildhome/.cask/bin:/opt/buildhome/.gimme/bin:/opt/buildhome/.dotnet/tools:/opt/buildhome/.dotnet', | |
PWD: '/opt/build/repo', | |
RVM_DIR: '/opt/buildhome/.rvm', | |
VIRTUAL_ENV: '/opt/buildhome/python2.7', | |
WASMER_CACHE_DIR: '/opt/buildhome/.wasmer/cache', | |
WASMER_DIR: '/opt/buildhome/.wasmer', | |
_: '/opt/buildhome/.nvm/versions/node/v10.16.2/bin/node', | |
rvm_bin_path: '/opt/buildhome/.rvm/bin', | |
rvm_path: '/opt/buildhome/.rvm', | |
rvm_prefix: '/opt/buildhome', | |
// misc 🤷🏼 | |
GIMME_NO_ENV_ALIAS: 'true', | |
GIMME_TYPE: 'binary', | |
LANG: 'en_US.UTF-8', | |
LANGUAGE: 'en_US:en', | |
LC_ALL: 'en_US.UTF-8', | |
_system_name: 'Ubuntu', | |
_system_type: 'Linux', | |
rvm_delete_flag: '0', | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
more build stuff: https://github.com/netlify/build-image/blob/xenial/run-build-functions.sh