zuul/tests/fixtures
James E. Blair be50a6ca42 Freeze job variables at start of build
Freze Zuul job variables when starting a build so that jinja
templates can not be used to expose secrets.  The values will be
frozen by running a playbook with set_fact, and that playbook
will run without access to secrets.  After the playbook
completes, the frozen variables are read from and then removed
from the fact cache.  They are then supplied as normal inventory
variables for any trusted playbooks or playbooks with secrets.

The regular un-frozen variables are used for all other untrusted
playbooks.

Extra-vars are now only used to establish precedence among all
Zuul job variables.  They are no longer passed to Ansible with
the "-e" command line option, as that level of precedence could
also be used to obtain secrets.

Much of this work is accomplished by "squashing" all of the Zuul
job, host, group, and extra variables into a flat structure for
each host in the inventory.  This means that much of the variable
precedence is now handled by Zuul, which then gives Ansible
variables as host vars.  The actual inventory files will be much
more verbose now, since each host will have a copy of every "all"
value.  But this allows the freezing process to be much simpler.

When writing the inventory for the setup playbook, we now use the
!unsafe YAML tag which is understood by Ansible to indicate that
it should not perform jinja templating on variables.  This may
help to avoid any mischief with templated variables since they
have not yet been frozen.

Also, be more strict about what characters are allowed in ansible
variable names.  We already checked job variables, but we didn't
verify that secret names/aliases met the ansible variable
requirements.  A check is added for that (and a unit test that
relied on the erroneous behavior is updated).

Story: 2008664
Story: 2008682
Change-Id: I04d8b822fda6628e87a4a57dc368f20d84ae5ea9
2021-06-24 06:24:23 -07:00
..
auth JWT drivers: Deprecate RS256withJWKS, introduce OpenIDConnect 2020-02-11 09:30:15 +00:00
bwrap-mounts Add missing localhost delegation checks to some modules 2018-03-22 20:42:01 +01:00
cgroup Add cgroup support to ram sensor 2018-12-18 22:25:27 +01:00
config Freeze job variables at start of build 2021-06-24 06:24:23 -07:00
gearman Add ssl support to gearman / gearman_server 2017-06-14 10:10:45 -04:00
gerrit Update gerrit pagination test fixtures 2019-09-17 14:15:18 -07:00
layouts Merge "Support multiple semaphores" 2021-05-28 02:48:50 +00:00
tenants Re-enable test_delayed_repo_init 2017-08-14 23:37:56 -07:00
app_key Exercise github auth handling in tests 2020-09-03 13:50:33 +02:00
clonemap.yaml cloner to easily clone dependent repositories 2014-07-29 09:03:59 +00:00
fake_git.sh Add comment explaining gitpython requirement 2017-10-10 11:15:06 -07:00
fake_kubectl.sh Stream output from kubectl pods 2020-02-27 07:49:40 -08:00
git_fetch_error.sh Merger: retry network operations 2018-01-31 13:20:36 -08:00
layout-cloner.yaml Case sensitive label matching 2017-07-27 07:46:35 +02:00
layout-connections-multiple-voters.yaml Add in extra connections tests 2015-12-06 14:48:32 +11:00
layout-disable-at.yaml Case sensitive label matching 2017-07-27 07:46:35 +02:00
layout-live-reconfiguration-functions.yaml Case sensitive label matching 2017-07-27 07:46:35 +02:00
layout-merge-queues.yaml Case sensitive label matching 2017-07-27 07:46:35 +02:00
layout-requirement-vote.yaml Case sensitive label matching 2017-07-27 07:46:35 +02:00
layout-smtp.yaml Case sensitive label matching 2017-07-27 07:46:35 +02:00
layout-success-pattern.yaml Add extra test for bad url patterns 2016-04-23 10:40:12 +10:00
layout.yaml Case sensitive label matching 2017-07-27 07:46:35 +02:00
private.pem Add per-repo public and private keys 2017-03-29 12:43:41 -07:00
public.pem Serve public keys through webapp 2017-03-29 12:44:43 -07:00
ssh.pem Create per-project ssh keys 2018-09-04 15:42:41 -07:00
ssh.pub Serve project SSH keys and document 2018-09-04 15:42:43 -07:00
test_id_rsa Add SSH Agent Primitives and usage 2017-05-26 09:52:22 -07:00
test_id_rsa.pub Add SSH Agent Primitives and usage 2017-05-26 09:52:22 -07:00
zuul-admin-web-no-override.conf Required SQL reporters 2021-02-03 13:41:55 -08:00
zuul-admin-web-oidc.conf Required SQL reporters 2021-02-03 13:41:55 -08:00
zuul-admin-web-token-expiry.conf Required SQL reporters 2021-02-03 13:41:55 -08:00
zuul-admin-web.conf Required SQL reporters 2021-02-03 13:41:55 -08:00
zuul-connections-cgit.conf Required SQL reporters 2021-02-03 13:41:55 -08:00
zuul-connections-gerrit-and-github.conf Required SQL reporters 2021-02-03 13:41:55 -08:00
zuul-connections-gitweb.conf Required SQL reporters 2021-02-03 13:41:55 -08:00
zuul-connections-merger.conf Required SQL reporters 2021-02-03 13:41:55 -08:00
zuul-connections-multiple-gerrits.conf Required SQL reporters 2021-02-03 13:41:55 -08:00
zuul-connections-same-gerrit.conf Required SQL reporters 2021-02-03 13:41:55 -08:00
zuul-crd-pagure.conf Required SQL reporters 2021-02-03 13:41:55 -08:00
zuul-default-ansible-version.conf Required SQL reporters 2021-02-03 13:41:55 -08:00
zuul-disk-accounting.conf Required SQL reporters 2021-02-03 13:41:55 -08:00
zuul-elastic-driver.conf Required SQL reporters 2021-02-03 13:41:55 -08:00
zuul-executor-ansible-callback.conf Required SQL reporters 2021-02-03 13:41:55 -08:00
zuul-executor-hostname.conf Required SQL reporters 2021-02-03 13:41:55 -08:00
zuul-gerrit-github.conf Required SQL reporters 2021-02-03 13:41:55 -08:00
zuul-gerrit-no-stream.conf Required SQL reporters 2021-02-03 13:41:55 -08:00
zuul-gerrit-web.conf Required SQL reporters 2021-02-03 13:41:55 -08:00
zuul-git-driver.conf Required SQL reporters 2021-02-03 13:41:55 -08:00
zuul-github-driver-enterprise.conf Required SQL reporters 2021-02-03 13:41:55 -08:00
zuul-github-driver.conf Required SQL reporters 2021-02-03 13:41:55 -08:00
zuul-gitlab-driver.conf Required SQL reporters 2021-02-03 13:41:55 -08:00
zuul-hold-expiration.conf Required SQL reporters 2021-02-03 13:41:55 -08:00
zuul-mqtt-driver.conf Required SQL reporters 2021-02-03 13:41:55 -08:00
zuul-pagure-driver-whitelist.conf Required SQL reporters 2021-02-03 13:41:55 -08:00
zuul-pagure-driver.conf Required SQL reporters 2021-02-03 13:41:55 -08:00
zuul-push-reqs.conf Required SQL reporters 2021-02-03 13:41:55 -08:00
zuul-sql-driver-mysql.conf Required SQL reporters 2021-02-03 13:41:55 -08:00
zuul-sql-driver-postgres.conf Required SQL reporters 2021-02-03 13:41:55 -08:00
zuul-sql-driver-prefix-mysql.conf Required SQL reporters 2021-02-03 13:41:55 -08:00
zuul-sql-driver-prefix-postgres.conf Required SQL reporters 2021-02-03 13:41:55 -08:00
zuul-winrm.conf Required SQL reporters 2021-02-03 13:41:55 -08:00
zuul.conf Required SQL reporters 2021-02-03 13:41:55 -08:00