Skip to content

Commit

Permalink
update CI/CD settings for release
Browse files Browse the repository at this point in the history
  • Loading branch information
DmitriyLewen committed Apr 26, 2024
1 parent 7811ad0 commit 77bb6bb
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 76 deletions.
7 changes: 0 additions & 7 deletions .github/workflows/reusable-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,6 @@ jobs:
username: ${{ env.GH_USER }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Login to ECR
uses: docker/login-action@v3
with:
registry: public.ecr.aws
username: ${{ secrets.ECR_ACCESS_KEY_ID }}
password: ${{ secrets.ECR_SECRET_ACCESS_KEY }}

- name: Checkout code
uses: actions/[email protected]
with:
Expand Down
4 changes: 2 additions & 2 deletions ci/deploy-rpm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function create_common_rpm_repo () {

mkdir -p $rpm_path/$arch
cp ../dist/*${prefix}.rpm ${rpm_path}/$arch/
createrepo_c -u https://github.com/aquasecurity/trivy/releases/download/ --location-prefix="v"$TRIVY_VERSION --update $rpm_path/$arch
createrepo_c -u https://github.com/dmitriylewen/trivy/releases/download/ --location-prefix="v"$TRIVY_VERSION --update $rpm_path/$arch
rm ${rpm_path}/$arch/*${prefix}.rpm
done
}
Expand All @@ -28,7 +28,7 @@ function create_rpm_repo () {
mkdir -p $rpm_path
cp ../dist/*64bit.rpm ${rpm_path}/

createrepo_c -u https://github.com/aquasecurity/trivy/releases/download/ --location-prefix="v"$TRIVY_VERSION --update $rpm_path
createrepo_c -u https://github.com/dmitriylewen/trivy/releases/download/ --location-prefix="v"$TRIVY_VERSION --update $rpm_path

rm ${rpm_path}/*64bit.rpm
}
Expand Down
103 changes: 36 additions & 67 deletions goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,25 +130,12 @@ archives:
- goos: windows
format: zip


brews:
-
repository:
owner: aquasecurity
name: homebrew-trivy
homepage: "https://github.com/aquasecurity/trivy"
description: "Scanner for vulnerabilities in container images, file systems, and Git repositories, as well as for configuration issues"
test: |
system "#{bin}/trivy", "--version"
dockers:
- image_templates:
- "docker.io/aquasec/trivy:{{ .Version }}-amd64"
- "docker.io/aquasec/trivy:latest-amd64"
- "ghcr.io/aquasecurity/trivy:{{ .Version }}-amd64"
- "ghcr.io/aquasecurity/trivy:latest-amd64"
- "public.ecr.aws/aquasecurity/trivy:latest-amd64"
- "public.ecr.aws/aquasecurity/trivy:{{ .Version }}-amd64"
- "docker.io/dmitriylewen/trivy:{{ .Version }}-amd64"
- "docker.io/dmitriylewen/trivy:latest-amd64"
- "ghcr.io/dmitriylewen/trivy:{{ .Version }}-amd64"
- "ghcr.io/dmitriylewen/trivy:latest-amd64"
use: buildx
goos: linux
goarch: amd64
Expand All @@ -168,12 +155,10 @@ dockers:
extra_files:
- contrib/
- image_templates:
- "docker.io/aquasec/trivy:{{ .Version }}-arm64"
- "docker.io/aquasec/trivy:latest-arm64"
- "ghcr.io/aquasecurity/trivy:{{ .Version }}-arm64"
- "ghcr.io/aquasecurity/trivy:latest-arm64"
- "public.ecr.aws/aquasecurity/trivy:latest-arm64"
- "public.ecr.aws/aquasecurity/trivy:{{ .Version }}-arm64"
- "docker.io/dmitriylewen/trivy:{{ .Version }}-arm64"
- "docker.io/dmitriylewen/trivy:latest-arm64"
- "ghcr.io/dmitriylewen/trivy:{{ .Version }}-arm64"
- "ghcr.io/dmitriylewen/trivy:latest-arm64"
use: buildx
goos: linux
goarch: arm64
Expand All @@ -193,12 +178,10 @@ dockers:
extra_files:
- contrib/
- image_templates:
- "docker.io/aquasec/trivy:{{ .Version }}-s390x"
- "docker.io/aquasec/trivy:latest-s390x"
- "ghcr.io/aquasecurity/trivy:{{ .Version }}-s390x"
- "ghcr.io/aquasecurity/trivy:latest-s390x"
- "public.ecr.aws/aquasecurity/trivy:latest-s390x"
- "public.ecr.aws/aquasecurity/trivy:{{ .Version }}-s390x"
- "docker.io/dmitriylewen/trivy:{{ .Version }}-s390x"
- "docker.io/dmitriylewen/trivy:latest-s390x"
- "ghcr.io/dmitriylewen/trivy:{{ .Version }}-s390x"
- "ghcr.io/dmitriylewen/trivy:latest-s390x"
use: buildx
goos: linux
goarch: s390x
Expand All @@ -218,12 +201,10 @@ dockers:
extra_files:
- contrib/
- image_templates:
- "docker.io/aquasec/trivy:{{ .Version }}-ppc64le"
- "docker.io/aquasec/trivy:latest-ppc64le"
- "ghcr.io/aquasecurity/trivy:{{ .Version }}-ppc64le"
- "ghcr.io/aquasecurity/trivy:latest-ppc64le"
- "public.ecr.aws/aquasecurity/trivy:latest-ppc64le"
- "public.ecr.aws/aquasecurity/trivy:{{ .Version }}-ppc64le"
- "docker.io/dmitriylewen/trivy:{{ .Version }}-ppc64le"
- "docker.io/dmitriylewen/trivy:latest-ppc64le"
- "ghcr.io/dmitriylewen/trivy:{{ .Version }}-ppc64le"
- "ghcr.io/dmitriylewen/trivy:latest-ppc64le"
use: buildx
goos: linux
goarch: ppc64le
Expand All @@ -244,42 +225,30 @@ dockers:
- contrib/

docker_manifests:
- name_template: 'aquasec/trivy:{{ .Version }}'
image_templates:
- 'aquasec/trivy:{{ .Version }}-amd64'
- 'aquasec/trivy:{{ .Version }}-arm64'
- 'aquasec/trivy:{{ .Version }}-s390x'
- 'aquasec/trivy:{{ .Version }}-ppc64le'
- name_template: 'ghcr.io/aquasecurity/trivy:{{ .Version }}'
image_templates:
- 'ghcr.io/aquasecurity/trivy:{{ .Version }}-amd64'
- 'ghcr.io/aquasecurity/trivy:{{ .Version }}-arm64'
- 'ghcr.io/aquasecurity/trivy:{{ .Version }}-s390x'
- 'ghcr.io/aquasecurity/trivy:{{ .Version }}-ppc64le'
- name_template: 'public.ecr.aws/aquasecurity/trivy:{{ .Version }}'
- name_template: 'dmitriylewen/trivy:{{ .Version }}'
image_templates:
- 'public.ecr.aws/aquasecurity/trivy:{{ .Version }}-amd64'
- 'public.ecr.aws/aquasecurity/trivy:{{ .Version }}-arm64'
- 'public.ecr.aws/aquasecurity/trivy:{{ .Version }}-s390x'
- 'public.ecr.aws/aquasecurity/trivy:{{ .Version }}-ppc64le'
- name_template: 'aquasec/trivy:latest'
- 'dmitriylewen/trivy:{{ .Version }}-amd64'
- 'dmitriylewen/trivy:{{ .Version }}-arm64'
- 'dmitriylewen/trivy:{{ .Version }}-s390x'
- 'dmitriylewen/trivy:{{ .Version }}-ppc64le'
- name_template: 'ghcr.io/dmitriylewen/trivy:{{ .Version }}'
image_templates:
- 'aquasec/trivy:{{ .Version }}-amd64'
- 'aquasec/trivy:{{ .Version }}-arm64'
- 'aquasec/trivy:{{ .Version }}-s390x'
- 'aquasec/trivy:{{ .Version }}-ppc64le'
- name_template: 'ghcr.io/aquasecurity/trivy:latest'
- 'ghcr.io/dmitriylewen/trivy:{{ .Version }}-amd64'
- 'ghcr.io/dmitriylewen/trivy:{{ .Version }}-arm64'
- 'ghcr.io/dmitriylewen/trivy:{{ .Version }}-s390x'
- 'ghcr.io/dmitriylewen/trivy:{{ .Version }}-ppc64le'
- name_template: 'dmitriylewen/trivy:latest'
image_templates:
- 'ghcr.io/aquasecurity/trivy:{{ .Version }}-amd64'
- 'ghcr.io/aquasecurity/trivy:{{ .Version }}-arm64'
- 'ghcr.io/aquasecurity/trivy:{{ .Version }}-s390x'
- 'ghcr.io/aquasecurity/trivy:{{ .Version }}-ppc64le'
- name_template: 'public.ecr.aws/aquasecurity/trivy:latest'
- 'dmitriylewen/trivy:{{ .Version }}-amd64'
- 'dmitriylewen/trivy:{{ .Version }}-arm64'
- 'dmitriylewen/trivy:{{ .Version }}-s390x'
- 'dmitriylewen/trivy:{{ .Version }}-ppc64le'
- name_template: 'ghcr.io/dmitriylewen/trivy:latest'
image_templates:
- 'public.ecr.aws/aquasecurity/trivy:{{ .Version }}-amd64'
- 'public.ecr.aws/aquasecurity/trivy:{{ .Version }}-arm64'
- 'public.ecr.aws/aquasecurity/trivy:{{ .Version }}-s390x'
- 'public.ecr.aws/aquasecurity/trivy:{{ .Version }}-ppc64le'
- 'ghcr.io/dmitriylewen/trivy:{{ .Version }}-amd64'
- 'ghcr.io/dmitriylewen/trivy:{{ .Version }}-arm64'
- 'ghcr.io/dmitriylewen/trivy:{{ .Version }}-s390x'
- 'ghcr.io/dmitriylewen/trivy:{{ .Version }}-ppc64le'

signs:
- cmd: cosign
Expand Down

0 comments on commit 77bb6bb

Please sign in to comment.