Skip to content

Commit

Permalink
build: include licenses information into distributed artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
joshiste committed Sep 19, 2023
1 parent 965dab8 commit 0a34188
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
/coverageout
/.idea
*.iml
/licenses
5 changes: 4 additions & 1 deletion .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ project_name: steadybit-extension-container
before:
hooks:
- go mod download
- make licenses-report

release:
prerelease: "false"
builds:
Expand Down Expand Up @@ -63,7 +65,8 @@ nfpms:
type: config
- src: ./sidecar_{{ .Os }}_{{ .Arch }}.tar
dst: /opt/steadybit/extension-container/sidecar.tar

- src: ./licenses
dst: /opt/steadybit/extension-aws/licenses

scripts:
preinstall: ./linuxpkg/scripts/preinstall.sh
Expand Down
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ WORKDIR /

ADD ./sidecar_linux_$TARGETARCH.tar /sidecar
COPY --from=build /app/extension /extension
COPY --from=build /app/licenses /licenses

EXPOSE 8086 8082

Expand Down
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ help:
@echo 'Usage:'
@sed -n 's/^##//p' ${MAKEFILE_LIST} | column -t -s ':' | sed -e 's/^/ /'

## licenses-report: generate a report of all licenses
.PHONY: licenses-report
licenses-report:
rm -rf ./licenses
go run github.com/google/[email protected] save . --save_path ./licenses
go run github.com/google/[email protected] report . > ./licenses/THIRD-PARTY.csv
cp LICENSE ./licenses/LICENSE.txt

# ==================================================================================== #
# QUALITY CONTROL
Expand Down

0 comments on commit 0a34188

Please sign in to comment.