diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2024-02-13 08:59:46 -0500 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2024-02-13 09:04:14 -0500 |
commit | 4d93e40e26a925bce41d100c0a64f89eeafa9906 (patch) | |
tree | 0d06abf3dc71a797622f5c81e2a8280680448c0a /src | |
parent | 8d924982d713d564880b5d2ea2b0ab888d12accb (diff) | |
download | stasis-4d93e40e26a925bce41d100c0a64f89eeafa9906.tar.gz |
Use Globals.jfrog.repo when OMC_JF_REPO is unset
* Reworded warnings about OMC_JF_REPO and [deploy:artifaction] config section
* Do not push build information on bad config state
Diffstat (limited to 'src')
-rw-r--r-- | src/deliverable.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/deliverable.c b/src/deliverable.c index 593b0b5..e443e45 100644 --- a/src/deliverable.c +++ b/src/deliverable.c @@ -1426,10 +1426,14 @@ int delivery_artifact_upload(struct Delivery *ctx) { if (!ctx->deploy[i].repo) { ctx->deploy[i].repo = strdup(repo); } + } else if (globals.jfrog.repo) { + ctx->deploy[i].repo = strdup(globals.jfrog.repo); } else { - fprintf(stderr, "Artifactory destination repository is not configured:\n"); - fprintf(stderr, "set OMC_JF_REPO to a remote repository path\n"); - continue; + msg(OMC_MSG_WARN, "Artifactory repository path is not configured!\n"); + fprintf(stderr, "set OMC_JF_REPO environment variable...\nOr append to configuration file:\n\n"); + fprintf(stderr, "[deploy:artifactory]\nrepo = example/generic/repo/path\n\n"); + status++; + break; } if (jfrt_auth_init(&ctx->deploy[i].auth_ctx)) { @@ -1456,7 +1460,7 @@ int delivery_artifact_upload(struct Delivery *ctx) { } } - if (ctx->deploy[0].files && ctx->deploy[0].dest) { + if (!status && ctx->deploy[0].files && ctx->deploy[0].dest) { jfrog_cli_rt_build_collect_env(&ctx->deploy[0].auth_ctx, ctx->deploy[0].upload_ctx.build_name, ctx->deploy[0].upload_ctx.build_number); jfrog_cli_rt_build_publish(&ctx->deploy[0].auth_ctx, ctx->deploy[0].upload_ctx.build_name, ctx->deploy[0].upload_ctx.build_number); } |