Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: matrix build for testing #4587

Merged
merged 6 commits into from
Jun 12, 2023
Merged

Conversation

knqyf263
Copy link
Collaborator

@knqyf263 knqyf263 commented Jun 8, 2023

Description

  • Split builds in the GoReleaser configuration
  • Build binaries on each environment
  • Drop arm32 support

PRs

Checklist

  • I've read the guidelines for contributing to this repository.
  • I've followed the conventions in the PR title.
  • I've added tests that prove my fix is effective or that my feature works.
  • I've updated the documentation with the relevant information (if needed).
  • I've added usage information (if the PR introduces new options)
  • I've included a "before" and "after" example to the description (if the PR is a user interface change).

@knqyf263 knqyf263 self-assigned this Jun 8, 2023
@knqyf263 knqyf263 marked this pull request as ready for review June 8, 2023 12:57
@knqyf263 knqyf263 requested a review from afdesk June 8, 2023 12:57
@afdesk
Copy link
Contributor

afdesk commented Jun 8, 2023

Should we add builds block only for Linux rpm/deb packages?

    # Build IDs for the builds you want to create NFPM packages for.
    # Defaults empty, which means no filtering.
    builds:
      - build

trivy/goreleaser.yml

Lines 50 to 79 in d52b0b7

nfpms:
-
formats:
- deb
- rpm
vendor: "aquasecurity"
homepage: "https://github.com/aquasecurity"
maintainer: "Teppei Fukuda <knqyf263@gmail.com>"
description: "A Fast Vulnerability Scanner for Containers"
license: "Apache-2.0"
file_name_template: >-
{{ .ProjectName }}_{{ .Version }}_
{{- if eq .Os "darwin" }}macOS
{{- else if eq .Os "openbsd" }}OpenBSD
{{- else if eq .Os "netbsd" }}NetBSD
{{- else if eq .Os "freebsd" }}FreeBSD
{{- else if eq .Os "dragonfly" }}DragonFlyBSD
{{- else}}{{- title .Os }}{{ end }}-
{{- if eq .Arch "amd64" }}64bit
{{- else if eq .Arch "386" }}32bit
{{- else if eq .Arch "arm" }}ARM
{{- else if eq .Arch "arm64" }}ARM64
{{- else if eq .Arch "ppc64le" }}PPC64LE
{{- else }}{{ .Arch }}{{ end }}
contents:
- src: contrib/*.tpl
dst: /usr/local/share/trivy/templates
rpm:
signature:
key_file: '{{ .Env.GPG_FILE }}'

.github/workflows/test.yaml Outdated Show resolved Hide resolved
.github/workflows/test.yaml Outdated Show resolved Hide resolved
@knqyf263
Copy link
Collaborator Author

knqyf263 commented Jun 8, 2023

Should we add builds block only for Linux rpm/deb packages?

Yes, it would be the next task. This PR focuses on splitting builds and speeding up tests.

@knqyf263
Copy link
Collaborator Author

@afdesk Addressed comments

Copy link
Contributor

@afdesk afdesk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@knqyf263 knqyf263 merged commit 9e6411e into aquasecurity:main Jun 12, 2023
@knqyf263 knqyf263 deleted the matrix_build branch June 12, 2023 07:49
@afdesk afdesk mentioned this pull request Jun 15, 2023
6 tasks
AnaisUrlichs pushed a commit to AnaisUrlichs/trivy that referenced this pull request Aug 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants