Skip to content

Commit

Permalink
Merge branch 'main' into fix-relative-paths-last-good
Browse files Browse the repository at this point in the history
Signed-off-by: Simar <[email protected]>
  • Loading branch information
simar7 committed Apr 5, 2023
2 parents bd52bba + 6c8b042 commit 0337b65
Show file tree
Hide file tree
Showing 165 changed files with 3,392 additions and 1,268 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/canary.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Restore Trivy binaries from cache
uses: actions/cache@v3.2.6
uses: actions/cache@v3.3.1
with:
path: dist/
key: ${{ runner.os }}-bins-${{github.workflow}}-${{github.sha}}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
python-version: 3.7
- name: Setup Chart Linting
id: lint
uses: helm/chart-testing-action@afea100a513515fbd68b0e72a7bb0ae34cb62aec
uses: helm/chart-testing-action@e8788873172cb653a90ca2e819d79d65a66d4e76
- name: Setup Kubernetes cluster (KIND)
uses: helm/kind-action@d8ccf8fb623ce1bb360ae2f45f323d9d5c5e9f00
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
fetch-depth: 0

- name: Restore Trivy binaries from cache
uses: actions/cache@v3.2.6
uses: actions/cache@v3.3.1
with:
path: dist/
key: ${{ runner.os }}-bins-${{github.workflow}}-${{github.sha}}
Expand Down
16 changes: 2 additions & 14 deletions .github/workflows/reusable-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
fetch-depth: 0

- name: Setup Go
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version-file: go.mod

Expand All @@ -75,25 +75,13 @@ jobs:
args: mod -licenses -json -output bom.json
version: ^v1

- name: "save gpg key"
env:
GPG_KEY: ${{ secrets.GPG_KEY }}
run: |
echo "$GPG_KEY" > gpg.txt
- name: GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
version: v1.4.1
args: release -f=${{ inputs.goreleaser_config}} ${{ inputs.goreleaser_options}}
env:
GITHUB_TOKEN: ${{ secrets.ORG_REPO_TOKEN }}
NFPM_DEFAULT_RPM_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
GPG_FILE: "gpg.txt"

- name: "remove gpg key"
run: |
rm gpg.txt

## push images to registries
## only for canary build
Expand All @@ -111,7 +99,7 @@ jobs:
public.ecr.aws/aquasecurity/trivy:canary
- name: Cache Trivy binaries
uses: actions/cache@v3.2.6
uses: actions/cache@v3.3.1
with:
path: dist/
# use 'github.sha' to create a unique cache folder for each run.
Expand Down
39 changes: 26 additions & 13 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version: oldstable

Expand All @@ -46,13 +46,22 @@ jobs:
skip-cache: true # https://github.com/golangci/golangci-lint-action/issues/244#issuecomment-1052197778
if: matrix.operating-system == 'ubuntu-latest'

# Install tools
- uses: aquaproj/[email protected]
- name: Install tools
uses: aquaproj/[email protected]
with:
aqua_version: v1.25.0

- name: Check if CLI references are up-to-date
run: |
mage docs:generate
if [ -n "$(git status --porcelain)" ]; then
echo "Run 'mage docs:generate' and push it"
exit 1
fi
if: matrix.operating-system == 'ubuntu-latest'

- name: Run unit tests
run: make test
run: mage test:unit

integration:
name: Integration Test
Expand All @@ -62,12 +71,17 @@ jobs:
uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version-file: go.mod

- name: Install tools
uses: aquaproj/[email protected]
with:
aqua_version: v1.25.0

- name: Run integration tests
run: make test-integration
run: mage test:integration

module-test:
name: Module Integration Test
Expand All @@ -77,19 +91,19 @@ jobs:
uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version-file: go.mod

# Install tools
- uses: aquaproj/[email protected]
- name: Install tools
uses: aquaproj/[email protected]
with:
aqua_version: v1.25.0

- name: Run module integration tests
shell: bash
run: |
make test-module-integration
mage test:module
build-test:
name: Build Test
Expand All @@ -111,7 +125,7 @@ jobs:
uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version-file: go.mod

Expand All @@ -120,5 +134,4 @@ jobs:
with:
version: v1.4.1
args: release --skip-sign --snapshot --rm-dist --skip-publish --timeout 90m
env:
GPG_FILE: "nofile"

8 changes: 6 additions & 2 deletions .github/workflows/vm-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,13 @@ jobs:
uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version-file: go.mod
- name: Install tools
uses: aquaproj/[email protected]
with:
aqua_version: v1.25.0
- name: Run vm integration tests
run: |
make test-vm-integration
mage test:vm
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,7 @@ integration/testdata/fixtures/vm-images
dist

# WebAssembly
*.wasm
*.wasm

# Signing
gpg.key
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.17.2
FROM alpine:3.17.3
RUN apk --no-cache add ca-certificates git
COPY trivy /usr/local/bin/trivy
COPY contrib/*.tpl contrib/
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.canary
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.17.2
FROM alpine:3.17.3
RUN apk --no-cache add ca-certificates git

# binaries were created with GoReleaser
Expand Down
3 changes: 3 additions & 0 deletions Dockerfile.protoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ RUN curl --retry 5 -OL https://github.com/protocolbuffers/protobuf/releases/down

RUN go install github.com/twitchtv/twirp/[email protected]
RUN go install google.golang.org/protobuf/cmd/[email protected]
RUN go install github.com/magefile/[email protected]

ENV TRIVY_PROTOC_CONTAINER=true
143 changes: 0 additions & 143 deletions Makefile

This file was deleted.

1 change: 1 addition & 0 deletions aqua.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ registries:
ref: v3.106.0 # renovate: depName=aquaproj/aqua-registry
packages:
- name: tinygo-org/[email protected]
- name: magefile/[email protected]
Loading

0 comments on commit 0337b65

Please sign in to comment.