Skip to content

Commit

Permalink
[main] Fix override-snapshot generation (#3186)
Browse files Browse the repository at this point in the history
* Install all tools before running generate-override-snapshot

* Fix verify-diff.sh

* Include override-snapshot in update PR

---------

Co-authored-by: Christoph Stäbler <cstabler@redhat.com>
  • Loading branch information
openshift-cherrypick-robot and creydr authored Dec 16, 2024
1 parent 573b630 commit 6a8e3ca
Showing 3 changed files with 6 additions and 8 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/validate.yaml
Original file line number Diff line number Diff line change
@@ -81,6 +81,10 @@ jobs:
REGISTRY_REDHAT_IO_PASSWORD: ${{ secrets.REGISTRY_REDHAT_IO_PASSWORD }}
run: make generate-catalog

- name: Regenerate override-snapshot
working-directory: ./src/github.com/${{ github.repository }}
run: make generate-override-snapshot

# Optional:
# Since we're generating files based on a floating branch in midstream,
# we need to reconcile those files periodically.
@@ -98,12 +102,6 @@ jobs:
body: |
Generated by running `make generated-files`
# Generate override-snapshot to get an early signal when there is something wrong on the override-snapshot creation
# No need to include the updates into the above created PR, as we want to create the override-snapshot intentionally
- name: Regenerate override-snapshot
working-directory: ./src/github.com/${{ github.repository }}
run: make generate-override-snapshot

- name: Check if everything is consistent
working-directory: ./src/github.com/${{ github.repository }}
run: ./hack/verify-diff.sh
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -288,7 +288,7 @@ generate-catalog:
./hack/generate/catalog.sh
.PHONY: generate-catalog

generate-override-snapshot: install-tool-cosign install-tool-opm
generate-override-snapshot: install-tools
./hack/generate/override-snapshot.sh \
.konflux-release/
.PHONY: generate-override-snapshot
2 changes: 1 addition & 1 deletion hack/verify-diff.sh
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@ readonly EXCLUDE_FILES=(
readonly EXCLUDE_PATTERNS=(
'*sha256:*'
'*revision: *'
'*url: "https://github.com/openshift-knative/(*.git|*)"' # some repos in the override-snapshot have the .git suffix, some not ¯\_(ツ)_/¯
'url: \"https://github.com/openshift-knative/.*(\.git)?\"' # some repos in the override-snapshot have the .git suffix, some not ¯\_(ツ)_/¯
)

# Function to check if a file should be excluded

0 comments on commit 6a8e3ca

Please sign in to comment.