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

Weaveworks rego policies: create a monorepo structure #806

Open
4 tasks
fabriziosestito opened this issue Jul 10, 2024 · 0 comments
Open
4 tasks

Weaveworks rego policies: create a monorepo structure #806

fabriziosestito opened this issue Jul 10, 2024 · 0 comments
Assignees
Milestone

Comments

@fabriziosestito
Copy link
Contributor

fabriziosestito commented Jul 10, 2024

Is your feature request related to a problem?

Based on the migration script described here: #805, create a monorepo structure containing the migrated policies.

Solution you'd like

Acceptance criteria

  • It should be possible to release policies separately
  • It should be possible to upload a single policy to ArtifactHub after it is released
  • Document release process on README.md

Nice to have:

  • The monorepo CI should be able to run tests on a single policy when changes are detected

Implementation details

Releasing

Given a monorepo with policies in a similar structure:

policies\
   policy1
   policy2
   ...

When a tag with the format policy1/v1.0.2 is created, the automation should be able to release policy1 with version v1.0.2.
This should be easy enough as we will split the tag by / and release the target policy with the target version.
We should use our reusable GitHub actions: https://github.com/kubewarden/github-actions, note that they might need modification to support different paths.

The actions should release the policy on GitHub and change the metadata of the ArtifactHub files. As examples, see artifacthub-pkg.yml and artifacthub-repo.yml on an existing policy repo, such as this monorepo. See also artifacthub-* docs.

Every time we push/open a PR, the tests should be run for only the files/policies changed. This can be achieved by having a script that filters for the files changed with git, exposed via a global makefile target.

@viccuad viccuad changed the title Spike: weaveworks rego policies: create a monorepo structure Weaveworks rego policies: create a monorepo structure Jul 19, 2024
@viccuad viccuad added this to the 1.16 milestone Jul 19, 2024
@flavio flavio moved this to Todo in Kubewarden Aug 9, 2024
@flavio flavio modified the milestones: 1.16, 1.17 Aug 9, 2024
@flavio flavio modified the milestones: 1.17, 1.18 Sep 20, 2024
@viccuad viccuad mentioned this issue Oct 21, 2024
1 task
@flavio flavio modified the milestones: 1.18, 1.19 Oct 24, 2024
@viccuad viccuad self-assigned this Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Progress
Development

No branches or pull requests

4 participants