| 2490 | } |
| 2491 | |
| 2492 | static int export_after_publish(cbm_pipeline_t *p, const char *final_path) { |
| 2493 | if (p->persistence) { |
| 2494 | CBM_PROF_START(t_art); |
| 2495 | int rc = cbm_artifact_export(final_path, p->repo_path, p->project_name, CBM_ARTIFACT_BEST); |
| 2496 | CBM_PROF_END("persist", "6_artifact_export", t_art); |
| 2497 | if (rc != 0) { |
| 2498 | const char *err = cbm_artifact_export_last_error(); |
| 2499 | cbm_log_error("pipeline.err", "phase", "artifact_export", "err", err ? err : "unknown"); |
| 2500 | } |
| 2501 | return rc; |
| 2502 | } |
| 2503 | if (p->repo_path && cbm_artifact_exists(p->repo_path)) { |
| 2504 | (void)cbm_artifact_export(final_path, p->repo_path, p->project_name, CBM_ARTIFACT_FAST); |
| 2505 | } |
| 2506 | return 0; |
| 2507 | } |
| 2508 | |
| 2509 | int cbm_pipeline_run(cbm_pipeline_t *p) { |
| 2510 | if (!p) { |
no test coverage detected