Sharing Configuration between Nodes¶
If you are repeating the same environment variables, services, or other configuration between nodes, you can also move them to a level directly below build to share them between all nodes.
In the example below, we moved the environment variable FOO_PATH as well as the test commands directly below build. These settings are inherited by all nodes unless a node specifically chooses to overwrite a setting:
build: environment: variables: FOO_PATH: 'BAR' tests: override: - phpunit nodes: php: environment: php: 5.6 php71: environment: php: 7.1 This configuration is equivalent to:
build: nodes: php: environment: php: 5.6 variables: FOO_PATH: 'BAR' tests: override: - phpunit php71: environment: php: 7.1 variables: FOO_PATH: 'BAR' tests: override: - phpunit