Skip to content

Commit

Permalink
Add go-licenses to the test-runner image πŸŽ‰
Browse files Browse the repository at this point in the history
This will reduce the need to get and compile it, speeding the CI.

Signed-off-by: Vincent Demeester <vdemeest@redhat.com>
  • Loading branch information
vdemeester authored and tekton-robot committed Feb 17, 2020
1 parent d4e51c2 commit cd0db6e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
6 changes: 2 additions & 4 deletions scripts/library.sh
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ function update_licenses() {
local dst=$1
shift
if [ -f "${REPO_ROOT_DIR}/go.mod" ]; then
run_go_tool github.com/google/go-licenses go-licenses save ./... --save_path=${dst} --force
go-licenses save ./... --save_path=${dst} --force
# Hack to make sure directories retain write permissions after save. This
# can happen if the directory being copied is a Go module.
# See https://github.com/google/go-licenses/issues/11
Expand All @@ -347,10 +347,8 @@ function update_licenses() {
# Parameters: $1...$n - directories and files to inspect.
function check_licenses() {
if [ -f "${REPO_ROOT_DIR}/go.mod" ]; then
run_go_tool github.com/google/go-licenses go-licenses check ./...
go-licenses check ./...
else
# Fetch the google/licenseclassifier for its license db
go get -u github.com/google/licenseclassifier
# Check that we don't have any forbidden licenses in our images.
run_go_tool ./vendor/github.com/knative/test-infra/tools/dep-collector dep-collector -check $@
fi
Expand Down
1 change: 1 addition & 0 deletions tekton/images/test-runner/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ RUN apt-get install -y rubygems # for mdl
RUN go get -u github.com/google/ko/cmd/ko
RUN go get -u github.com/golang/dep/cmd/dep
RUN go get -u github.com/google/licenseclassifier
RUN go get -u github.com/google/go-licenses
RUN go get -u github.com/jstemmer/go-junit-report
RUN GO111MODULE="on" go get -u github.com/raviqqe/liche

Expand Down

0 comments on commit cd0db6e

Please sign in to comment.