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

feat: Add CI & CD #7

Merged
merged 13 commits into from
Dec 20, 2022
Merged

feat: Add CI & CD #7

merged 13 commits into from
Dec 20, 2022

Conversation

viccuad
Copy link
Member

@viccuad viccuad commented Dec 16, 2022

Description

Fix #5

Test

Yes please.

Additional Information

At the end, ended up lifting the approach from kubewarden-controller, with renaming.

Successful container build job run in my fork, https://github.com/viccuad/audit-scanner/pkgs/container/audit-scanner.

release-drafter needs its config in main prior to working.

Tradeoff

Potential improvement

TODO:

  • fossa needs secrets.FOSSA_API_TOKEN
  • openssf needs adding the labels to readme after first job run
  • before release, uncomment the relevant golangci-lint linters under TODO

Signed-off-by: Víctor Cuadrado Juan <[email protected]>
Signed-off-by: Víctor Cuadrado Juan <[email protected]>
Signed-off-by: Víctor Cuadrado Juan <[email protected]>
Signed-off-by: Víctor Cuadrado Juan <[email protected]>
TODO:
fossa needs `secrets.FOSSA_API_TOKEN`.
openssf needs adding the labels to readme after first job run.

Signed-off-by: Víctor Cuadrado Juan <[email protected]>
distroless/static gives us only:

- no libc (fine, we static-compile)
- ca-certificates
- A /etc/passwd entry for a root user (which we don't use)
- A /tmp directory
- tzdata

See:
https://github.com/GoogleContainerTools/distroless/blob/main/base/README.md

We could also go with scratch.

Signed-off-by: Víctor Cuadrado Juan <[email protected]>
Do it by using a reusable workflow for the container build.

Lifted from kubewarden-controller.

Signed-off-by: Víctor Cuadrado Juan <[email protected]>
Signed-off-by: Víctor Cuadrado Juan <[email protected]>
.github/release-drafter.yml Outdated Show resolved Hide resolved
Change `area/dependencies` to trigger patch releases instead of minor
ones.

Signed-off-by: Flavio Castelli <[email protected]>
@flavio
Copy link
Member

flavio commented Dec 20, 2022

Looking at the TODOs:

fossa needs secrets.FOSSA_API_TOKEN

I think we have nothing to do in that regard. The fossa token is a secret shared with all the GH workers of our organization.

openssf needs adding the labels to readme after first job run

I've created #9 to keep track of that

before release, uncomment the relevant golangci-lint linters under TODO

This isn't clear to me, I found only

# TODO REMOVE THESE BEFORE RELEASE
- wrapcheck
- godox
- forbidigo
- ireturn

Can you file an issue that provides more context please?

@flavio flavio merged commit 95f3b8d into kubewarden:main Dec 20, 2022
@viccuad
Copy link
Member Author

viccuad commented Jan 2, 2023

on the linters removal before release, it's just the block that you pointed at, so I would be ok without an issue. We should grep for TODOs before release anyways.

@viccuad viccuad deleted the cicd branch May 10, 2023 10:40
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.

audit-scanner - CI/CD
3 participants