From 77bb6bb82247cb4a046fa2c639a0d318517c5b2d Mon Sep 17 00:00:00 2001 From: DmitriyLewen Date: Fri, 26 Apr 2024 12:57:30 +0600 Subject: [PATCH] update CI/CD settings for release --- .github/workflows/reusable-release.yaml | 7 -- ci/deploy-rpm.sh | 4 +- goreleaser.yml | 103 +++++++++--------------- 3 files changed, 38 insertions(+), 76 deletions(-) diff --git a/.github/workflows/reusable-release.yaml b/.github/workflows/reusable-release.yaml index 752d48e5138e..4cc7859605cf 100644 --- a/.github/workflows/reusable-release.yaml +++ b/.github/workflows/reusable-release.yaml @@ -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/checkout@v4.1.2 with: diff --git a/ci/deploy-rpm.sh b/ci/deploy-rpm.sh index 32a328dbbdee..13717f12ab22 100755 --- a/ci/deploy-rpm.sh +++ b/ci/deploy-rpm.sh @@ -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 } @@ -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 } diff --git a/goreleaser.yml b/goreleaser.yml index 6e24883428dd..473abb8c9e8f 100644 --- a/goreleaser.yml +++ b/goreleaser.yml @@ -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 @@ -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 @@ -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 @@ -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 @@ -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