ci-accelerator/ci-accelerator
Builds/Build 250/Step [linux/amd64 build 9/9]
Step [linux/amd64 build 9/9] · build-image · #3080357985

RUN --mount=type=cache,target=/go/pkg/mod GOOS=linux GOARCH=amd64 go list -deps -f '{{with .Module}}{{if not .Main}}{{.Path}} {{.Version}} {{.Dir}}{{end}}{{end}}' ./cmd/ci-accelerator | sort -u > /tmp/modules && GOOS=linux GOARCH=amd64 go list -deps -f '{{with .Module}}{{if not .Main}}{{.Path}} {{.Dir}} {{$.Dir}}{{end}}{{end}}' ./cmd/ci-accelerator | sort -u > /tmp/packages && while read -r path moddir dir; do while :; do for f in "$dir"/LICENSE* "$dir"/LICENCE* "$dir"/COPYING* "$dir"/NOTICE* "$dir"/*-LICENSE*; do [ ! -f "$f" ] || { to="/out/licenses/$path${dir#"$moddir"}"; mkdir -p "$to"; cp "$f" "$to/"; }; done; case "$dir" in "$moddir"/*) dir=$(dirname "$dir") ;; *) break ;; esac; done; done < /tmp/packages && while read -r path version dir; do [ -n "$(find "/out/licenses/$path" -maxdepth 1 -type f 2>/dev/null)" ] || { echo "no licence file in $path ($dir)" >&2; exit 1; }; done < /tmp/modules && mkdir -p /out/licenses/go && cp "$(go env GOROOT)/LICENSE" /out/licenses/go/LICENSE && { echo "/ci-accelerator is Apache-2.0 (ci-accelerator/LICENSE). It links the Go modules below, unmodified;"; echo "each one's licence and notices are in the directory of its path. The source of each, at the"; echo "version listed, is published by the Go module proxy: https://proxy.golang.org/<path>/@v/<version>.zip"; echo "(also: go mod download <path>@<version>)."; echo "It also links the Go standard library and runtime of $(go env GOVERSION): its licence is go/LICENSE."; mpl=$(grep -rlE --include=LICENSE --include=LICENSE.txt --include=LICENSE.md 'Mozilla Public License,? [Vv]ersion 2\.0' /out/licenses | sed -e 's|^/out/licenses/||' -e 's|/[^/]*$||' | sort -u); [ -z "$mpl" ] || { echo; echo "Under MPL-2.0 (its source as above):"; for m in $mpl; do grep "^$m " /tmp/modules | cut -d' ' -f1,2; done; }; echo; echo "Modules (path version):"; cut -d' ' -f1,2 /tmp/modules; } > /out/licenses/README

from cacheCame from cache on this node — 0 s of work.

Dockerfile, line 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43

28RUN --mount=type=cache,target=/go/pkg/mod \
29 GOOS=$TARGETOS GOARCH=$TARGETARCH go list -deps -f '{{with .Module}}{{if not .Main}}{{.Path}} {{.Version}} {{.Dir}}{{end}}{{end}}' ./cmd/ci-accelerator \
30 | sort -u > /tmp/modules \
31 && GOOS=$TARGETOS GOARCH=$TARGETARCH go list -deps -f '{{with .Module}}{{if not .Main}}{{.Path}} {{.Dir}} {{$.Dir}}{{end}}{{end}}' ./cmd/ci-accelerator \
32 | sort -u > /tmp/packages \
33 && while read -r path moddir dir; do \
34 while :; do \
35 for f in "$dir"/LICENSE* "$dir"/LICENCE* "$dir"/COPYING* "$dir"/NOTICE* "$dir"/*-LICENSE*; do \
36 [ ! -f "$f" ] || { to="/out/licenses/$path${dir#"$moddir"}"; mkdir -p "$to"; cp "$f" "$to/"; }; \
37 done; \
38 case "$dir" in "$moddir"/*) dir=$(dirname "$dir") ;; *) break ;; esac; \
39 done; \
40 done < /tmp/packages \
41 && while read -r path version dir; do \
42 [ -n "$(find "/out/licenses/$path" -maxdepth 1 -type f 2>/dev/null)" ] || { echo "no licence file in $path ($dir)" >&2; exit 1; }; \
43 done < /tmp/modules \
Result
from cache
Duration
0.0 s
Started
+1.0 s into the build
Node
7ljc8
Job
build-image

Output

A step that comes from cache prints nothing.

History · registry.gitlab.com/ci-accelerator/ci-accelerator · 12 builds

49ee6a09aba3a09cfffc9f4949e8adb6a3f377b7f3d18e47d35b243869c3352f3f0a8ac2

Rebuilt in 4 of 12 builds that had this step · median 6.3 s when rebuilt. A bar opens that build's step.