HomePhabricator
Diffusion Scap 6cc814405462

Add config deployment

Description

Add config deployment

What happens on tin

  1. Looks for environment-specific ./scap/config-files.yaml with target

files in the format:

/path/to/target:

template: env-specific-template.yaml.j2
remote_vars: /optional/remote/variable/file.yaml
  1. Looks for environment-specific ./scap/vars.yaml that includes

variables used to render the template. These variables will be overridden
by any conflicting variables in the file specified by remote_vars

  1. Variables from any environment-specific vars.yaml file are combined

with variables from the root vars.yaml file.

  1. A yaml file is created at [repo]/.git/config-files/[revision].yaml

that contains the final path to any environment-specific templates as
well as a final list of combined variables.

What happens on targets

  1. Download the file from tin:[repo]/.git/config-files/[revision].yaml
  1. Loop through the config files, and render each template using the

variables from the downloaded yaml file and the variables from the (now)
local remove_vars file

  1. moves [repo]-cache/tmp/[rev]/config-files/[path]) to final location

in [repo]-cache/current/.git/config-files

  1. Links files from [repo]-cache/current/.git/config-files to final

locations

Bug: T109512
Change-Id: I3a7c116aa90a0cc3e470931bfd7423634f075b19