Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
13

I've had two runs at doing environment variables in a scalable way and neither has ended up perfect because, as I've discovered, is a very tricky thing to get right. I'll give a summary of both of my experiences below: Common Factors Environment variables are stored in a separate repository from the original source code (they are submoduled together but ...


4

The reason; having a more a version-agnostic and more backward-compatible directive in my server-environment-establishment script, to change the values of these two variables. If you're trying to configure a server, you should use a configuration management system (Ansible, Puppet, Chef, Salt) or bake images for immutable infrastructure; trying to hack ...


3

I'm not entirely sure what you're trying to ask in your question, so I'm answering the question I believe you're trying to ask. A build does not necessarily have a single commit author. It has a list of committers, which can be empty or can contain many committers. To create this list, you can use this snippet in a scripted Pipeline (note that you may ...


3

If your environments are per customer, I would suggest in your specific case to have a repository per customer. (In general it is repository per environment.) This repository would have a standard directory structure for environment variables, ansible variables and inventories, strongly encrypted secrets (account access tokens, private keys, etc.). You ...


2

PHP has supported conf.d configuration subdirectories for ages now (cf. PHP_INI_SCAN_DIR in its documentation, this stuff is as old as PHP 5 basically) - allowing you to simply add a small file containing just the snippet of config you need in there, and as long as you make sure it's named so that it's ordered in a way it overrides the defaults, you're done. ...


2

If you have envsubst installed (part or gnu gettext) you can use something like that: export STAGE_NAME="xyz" export STAGE_NETWORK_PREFIX="1.2.3.4" docker-compose -f <(envsubst docker-compose.yml) ... If your shell does not support process substitution, something like that would do the trick: envsubst docker-compose.yml | docker-compose -f - ...


1

I recommend that you use the printenv command for list system Variable: printenv and also An easy way to obtain the Jenkins environment variables list from your local installation is to append env-vars.html to the server's URL. the URL would be http://{jenkins_url}/env-vars.html


Only top voted, non community-wiki answers of a minimum length are eligible