aboutsummaryrefslogtreecommitdiff
path: root/src/delivery.c
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@users.noreply.github.com>2024-08-17 17:33:39 -0400
committerGitHub <noreply@github.com>2024-08-17 17:33:39 -0400
commita7568dc03c1c6851ff6c690e8e35ade9a3199c4a (patch)
treea2ae84583730b8b2fe35e7823c3c546c04a546ca /src/delivery.c
parent04ce859e53ef28bc917d4d3a12161e1cfbfa2859 (diff)
downloadstasis-a7568dc03c1c6851ff6c690e8e35ade9a3199c4a.tar.gz
Allow the user to disable uploading build info objects to artifactory (#33)
* Add enable_artifactory_build_info to globals structure * Add --no-artifactory-build-info command line argument to status main() * Useful for diag/test runs when a fully traceable delivery isn't desired
Diffstat (limited to 'src/delivery.c')
-rw-r--r--src/delivery.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/delivery.c b/src/delivery.c
index 16b1f74..e69ce2f 100644
--- a/src/delivery.c
+++ b/src/delivery.c
@@ -1927,9 +1927,15 @@ int delivery_artifact_upload(struct Delivery *ctx) {
}
}
- if (!status && ctx->deploy.jfrog[0].files && ctx->deploy.jfrog[0].dest) {
- jfrog_cli_rt_build_collect_env(&ctx->deploy.jfrog_auth, ctx->deploy.jfrog[0].upload_ctx.build_name, ctx->deploy.jfrog[0].upload_ctx.build_number);
- jfrog_cli_rt_build_publish(&ctx->deploy.jfrog_auth, ctx->deploy.jfrog[0].upload_ctx.build_name, ctx->deploy.jfrog[0].upload_ctx.build_number);
+ if (globals.enable_artifactory_build_info) {
+ if (!status && ctx->deploy.jfrog[0].files && ctx->deploy.jfrog[0].dest) {
+ jfrog_cli_rt_build_collect_env(&ctx->deploy.jfrog_auth, ctx->deploy.jfrog[0].upload_ctx.build_name,
+ ctx->deploy.jfrog[0].upload_ctx.build_number);
+ jfrog_cli_rt_build_publish(&ctx->deploy.jfrog_auth, ctx->deploy.jfrog[0].upload_ctx.build_name,
+ ctx->deploy.jfrog[0].upload_ctx.build_number);
+ }
+ } else {
+ msg(STASIS_MSG_WARN | STASIS_MSG_L2, "Artifactory build info upload is disabled by CLI argument\n");
}
return status;