Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/job.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1408,8 +1408,9 @@ If you know what you're doing and would like to suppress this warning, use one o
}

private async copyArtifactsOut (writeStreams: WriteStreams, expanded: {[key: string]: string}) {
// TODO: update the condition to support when:on_success / when:on_failure
if (this.jobStatus !== "success" && this.artifacts?.when !== "always") return;
if (this.jobStatus !== "success" && this.artifacts?.when === "on_success") return;

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

regression: absent when = on_success in gitlab, so a failed job now uploads. need when ?? on_success + treat warning as failure.

if (this.jobStatus !== "failed" && this.artifacts?.when === "on_failure") return;
if (this.artifacts?.when === "never") return;
if (!this.artifacts) return;
if ((this.artifacts.paths?.length ?? 0) === 0 && this.artifacts.reports?.dotenv == null) return;

Expand Down