Created
July 24, 2020 18:11
-
-
Save harsimranmaan/816ec9f33a5bc573089e3ecb8ffb8cc5 to your computer and use it in GitHub Desktop.
Environment mapping in params.libsonnet
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
// this file returns the params for the current qbec environment | |
// you need to add an entry here every time you add a new environment. | |
local env = std.extVar('qbec.io/env'); | |
local paramsMap = { | |
_: import './environments/base.libsonnet', | |
default: import './environments/default.libsonnet', | |
}; | |
if std.objectHas(paramsMap, env) then paramsMap[env] else error 'environment ' + env + ' not defined in ' + std.thisFile | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment