question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Handle environment variables in YAML config files

See original GitHub issue

It would be a really great feature to have the base URL be separate from the URL of the test. The main use case for this is in having a single config file that you want to run on multiple environments of a site. In my config file, I’d like to be able to say:

url: /my-page

Then on the command line, be able to set the base with something like:

phantomas --config=my-config.yaml --base-url=http://foo.com

Is this implemented, or possible? I’m happy to help out with a PR here, but I’m not sure where to start.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
rbaylisscommented, Feb 5, 2017

Ah, just realized if this was supported for various configuration keys in the config file, it would also provide a way to change the report type on the fly too. Sweetness!

0reactions
macbrecommented, Feb 8, 2017
$ npm publish 
+ optimist-config-file@1.0.0

https://www.npmjs.com/package/optimist-config-file

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to use a YAML file or environment variables to populate ...
In most cases, we suggest using a config variables YAML file. YAML files make variables more visible, easily editable, and allow for modularization...
Read more >
Use environment variables in the configuration - Elastic
You can use environment variable references in the config file to set values that need to be configurable during deployment. To do this,...
Read more >
Environmentalize your YAML configuration
Enable environmentalization. To enable environmentalization, create a file named values.yaml in the root directory where your YAML entity store is located. The ...
Read more >
Python YAML configuration with environment variables parsing
Load a YAML configuration file and resolve any environment variables Note: ... Python YAML configuration with environment variables parsing.
Read more >
Document how to use environment variables in `.yml` config file
yml ) to use graphql-codegen on a CI server. Describe the solution you'd like. Be able to pass headers in via the CLI,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found