Skip to content

Commit

Permalink
Build trivy parts in sequence to avoid Go version races.
Browse files Browse the repository at this point in the history
Signed-off-by: Nashwan Azhari <[email protected]>
  • Loading branch information
aznashwan committed Jul 29, 2024
1 parent 4f96b10 commit b94e72b
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions v2.6.3/trivy-adapter-photon/rockcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,20 @@ parts:
# should/can we do the same?
trivy-adapter:
after: [image-prep]
build-snaps:
- go/1.18/stable
after: [image-prep, trivy]
# build-snaps:
# - go/1.18/stable
plugin: go
source-type: git
source: https://github.com/aquasecurity/harbor-scanner-trivy
source-tag: v0.30.6
source-depth: 1
override-build: |
# NOTE(aznashwan): trivy needs Go >= 1.19, while the trivy-adapter-photon
# needs Go <= 1.18. `build-snaps` override each-other even when the tasks
# are set to execute sequentially, so we manually refresh the Go snap here:
snap refresh go --channel=1.18/stable
export GOOS=linux
export GO111MODULE=on
export CGO_ENABLED=0
Expand Down

0 comments on commit b94e72b

Please sign in to comment.