diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2024-08-17 16:49:43 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2024-08-17 16:49:43 -0400 |
commit | 4f78fff7a069a51e3aa463ee086258a7087df473 (patch) | |
tree | be5c63596e63435e6c39136d6c48cfcf3621c793 /src/delivery.c | |
parent | fa22e7e9ee5b59caea2553fd747b9d46f94f3b5c (diff) | |
download | stasis-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.c | 12 |
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; |