aboutsummaryrefslogtreecommitdiff
path: root/src/globals.c
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2024-07-20 11:46:29 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2024-07-20 11:46:29 -0400
commit14a4a198d55713280648344f8b2a01d6e65092f1 (patch)
tree04cce26181be7bae8bacb0d08731c55709f94d33 /src/globals.c
parent07dc44efdc5c2fbc2b34c969e623d3b0bc0df15a (diff)
downloadstasis-14a4a198d55713280648344f8b2a01d6e65092f1.tar.gz
Found too many bugs
* Implements a regression test * Moves and completely refactors the envctl code * Allows the user to keep @STR@ values in output files (if you want full control over where external packages comes from post-build) * Fixes wording in a few places * envctl redaction is not implemented yet. The original redaction code hasn't been modified.
Diffstat (limited to 'src/globals.c')
-rw-r--r--src/globals.c20
1 files changed, 4 insertions, 16 deletions
diff --git a/src/globals.c b/src/globals.c
index 18a32b5..5fdf05d 100644
--- a/src/globals.c
+++ b/src/globals.c
@@ -36,22 +36,7 @@ struct STASIS_GLOBAL globals = {
.enable_docker = true,
.enable_artifactory = true,
.enable_testing = true,
- .envctl = {
- {.flags = STASIS_ENVCTL_PASSTHRU, .name = {"TMPDIR", NULL}},
- {.flags = STASIS_ENVCTL_PASSTHRU, .name = {"STASIS_ROOT", NULL}},
- {.flags = STASIS_ENVCTL_PASSTHRU, .name = {"STASIS_SYSCONFDIR", NULL}},
- {.flags = STASIS_ENVCTL_PASSTHRU, .name = {"STASIS_CPU_COUNT", "CPU_COUNT", NULL}},
- {.flags = STASIS_ENVCTL_REQUIRED | STASIS_ENVCTL_REDACT, .name={"STASIS_GH_TOKEN", "GITHUB_TOKEN", NULL}},
- {.flags = STASIS_ENVCTL_REDACT, .name = {"STASIS_JF_ACCESS_TOKEN", NULL}},
- {.flags = STASIS_ENVCTL_PASSTHRU, .name = {"STASIS_JF_USER", NULL}},
- {.flags = STASIS_ENVCTL_REDACT, .name = {"STASIS_JF_PASSWORD", NULL}},
- {.flags = STASIS_ENVCTL_REDACT, .name = {"STASIS_JF_SSH_KEY_PATH", NULL}},
- {.flags = STASIS_ENVCTL_REDACT, .name = {"STASIS_JF_SSH_PASSPHRASE", NULL}},
- {.flags = STASIS_ENVCTL_REDACT, .name = {"STASIS_JF_CLIENT_CERT_CERT_PATH", NULL}},
- {.flags = STASIS_ENVCTL_REDACT, .name = {"STASIS_JF_CLIENT_CERT_KEY_PATH", NULL}},
- {.flags = STASIS_ENVCTL_REQUIRED, .name = {"STASIS_JF_REPO", NULL}},
- {.flags = 0, .name = {NULL}},
- }
+ .enable_rewrite_spec_stage_2 = true,
};
void globals_free() {
@@ -71,4 +56,7 @@ void globals_free() {
guard_free(globals.jfrog.remote_filename);
guard_free(globals.workaround.tox_posargs);
guard_free(globals.workaround.conda_reactivate);
+ if (globals.envctl) {
+ envctl_free(&globals.envctl);
+ }
}