aboutsummaryrefslogtreecommitdiff
path: root/src/delivery.c
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2024-08-17 16:49:43 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2024-08-17 16:49:43 -0400
commit4f78fff7a069a51e3aa463ee086258a7087df473 (patch)
treebe5c63596e63435e6c39136d6c48cfcf3621c793 /src/delivery.c
parentfa22e7e9ee5b59caea2553fd747b9d46f94f3b5c (diff)
downloadstasis-optional-artifactory-build-info.tar.gz
Allow the user to disable uploading build info objects to artifactoryoptional-artifactory-build-info
* 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;