summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoropenshift-ci[bot] <75433959+openshift-ci[bot]@users.noreply.github.com>2022-07-12 13:54:11 +0000
committerGitHub <noreply@github.com>2022-07-12 13:54:11 +0000
commita51a63023c773afae601628fbb89461249c5a043 (patch)
tree121b286912ff24300a8ed65e419978335027f5cf
parent4d111fa9af0352d25d4c9ecc7d203f20f5727d09 (diff)
parent3ed323e1bb76ff195fa10cf4f69a054ecdb47496 (diff)
downloadpodman-a51a63023c773afae601628fbb89461249c5a043.tar.gz
podman-a51a63023c773afae601628fbb89461249c5a043.tar.bz2
podman-a51a63023c773afae601628fbb89461249c5a043.zip
Merge pull request #14896 from edsantiago/logformatter_by_task
logformatter: link by *task ID*, not build ID
-rwxr-xr-xcontrib/cirrus/logformatter20
1 files changed, 8 insertions, 12 deletions
diff --git a/contrib/cirrus/logformatter b/contrib/cirrus/logformatter
index 59969c3e7..1dc618768 100755
--- a/contrib/cirrus/logformatter
+++ b/contrib/cirrus/logformatter
@@ -560,18 +560,14 @@ END_HTML
# See #14569 for more info.
#
# [1] https://cirrus-ci.org/guide/writing-tasks/#latest-build-artifacts
- if ($have_formatted_log && $ENV{CIRRUS_BUILD_ID} && $ENV{CIRRUS_TASK_NAME}) {
- my $URL_BASE = "https://api.cirrus-ci.com";
- my $build_id = $ENV{CIRRUS_BUILD_ID};
- my $task_name = $ENV{CIRRUS_TASK_NAME};
-
- # Escape spaces in task names ("int fedora 35 podman root etc")
- $task_name =~ s/\s/%20/g;
-
- # URL is long and cumbersome and duplicaty. The task name cannot be
- # reduced; the file name could, but I choose to leave it because I
- # sometimes download HTML logs and oh how I hate "log.html" filenames.
- my $URL = "${URL_BASE}/v1/artifact/build/$build_id/$task_name/html/${outfile}";
+ if ($have_formatted_log && $ENV{CIRRUS_TASK_ID}) {
+ my $URL_BASE = "https://api.cirrus-ci.com";
+ my $task_id = $ENV{CIRRUS_TASK_ID};
+
+ # Link by *taskID*, not buildID + taskname. First, this is shorter
+ # and less duplicaty. Second, and more important, buildID + taskname
+ # is non-unique, and a link to a flake log will be clobbered.
+ my $URL = "${URL_BASE}/v1/artifact/task/$task_id/html/${outfile}";
print "\n\nAnnotated results:\n $URL\n";
}