Skip to content
This repository has been archived by the owner on Oct 12, 2023. It is now read-only.

Add/update a GitHub action to verify that generated manifests/resources match what is in git #78

Closed
jgwest opened this issue Dec 17, 2020 · 1 comment
Assignees

Comments

@jgwest
Copy link
Member

jgwest commented Dec 17, 2020

Add a GitHub action (or add a check to an existing GH action's build steps, if this makes more sense) to verify that generated manifests/resources match what is in git.

Essentially, steps something like this:

# clone the applicationset repo
mkdir /tmp/pre-make
cp -r ./ /tmp/pre-make

# run generator
make manifests

# compare old and new, and fail if different
diff -r manifests /tmp/pre-make
# check for non-zero error code to indicate that the generated files have changed, then fail the build and output a message saying user should run make manifests and check in the results into their PR

This will catch any uncommitted changes to manifests that the user has made, and which require updated artifacts to be checked in for (CRDs, generated .go files).

For example, this would have caught the regression fixed by this PR.

This should also include resources generated by controller-gen.

@jgwest jgwest added this to the Milestone 1 milestone Jan 12, 2021
@jgwest
Copy link
Member Author

jgwest commented Jan 27, 2021

The fix for this was included as part of #105

@jgwest jgwest closed this as completed Jan 27, 2021
@jgwest jgwest self-assigned this Jan 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant