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

added pr testing and scorecard #80

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

garethahealy
Copy link
Contributor

Any PRs to the workflows in this repo have to be manually tested outside of the repo. I've done this by changing a consumer repo (i.e.: redhat-cop/group-sync-operator) to use the new version of my fork.

This change adds the ability to run the PR workflow against redhat-cop/group-sync-operator, improving confidence any changes to the PR workflow are OK and will at least work against redhat-cop/group-sync-operator

The new input is to allow the workflow to work against another repo, since this one doesn't contain any code.

Copy link
Contributor

@sabre1041 sabre1041 left a comment

Choose a reason for hiding this comment

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

As a whole it looks good. Added a few comments

.github/workflows/pr.yaml Outdated Show resolved Hide resolved
.github/workflows/scorecard.yml Outdated Show resolved Hide resolved
.github/workflows/scorecard.yml Outdated Show resolved Hide resolved
.github/workflows/scorecard.yml Show resolved Hide resolved
@garethahealy
Copy link
Contributor Author

resolved comments

@garethahealy
Copy link
Contributor Author

@sabre1041 good to merge? or want anything else changed?

@garethahealy
Copy link
Contributor Author

@sabre1041 good to merge?

@raffaelespazzoli
Copy link
Contributor

gareth, I think theres's value to this PR. How hard would it be to test against multiple repos? A sort of running this a matrix of repos.
The important repos are: vault-config, namespace-config, patch-operator, cert-utils. And of course group-sync which you already have.
Also can we make this periodic, so it runs every week or so? This way we should get an early warning when build stop to work.

@garethahealy
Copy link
Contributor Author

@raffaelespazzoli ; i can look to do that, not sure when I will have time (maybe in a few weeks), so can we get this PR merged? and then I'll do that suggestion on another PR.

@sabre1041
Copy link
Contributor

@garethahealy we have a things we want to clear with our operators first. then we can look to integrate this PR in

@garethahealy garethahealy force-pushed the main branch 5 times, most recently from 3e9b0d7 to 625385f Compare November 27, 2024 11:55
- name: Check out code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
repository: ${{ inputs.CHECKOUT_CODE }}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

moved checkout further up the stack due to variable setting paths

run: |
echo "repository_name=$(basename $GITHUB_REPOSITORY)" >> $GITHUB_OUTPUT
echo "repository_name=$(basename ${{ env.CHECKOUT_CODE }})" >> $GITHUB_OUTPUT
Copy link
Contributor Author

Choose a reason for hiding this comment

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

needs to be the repo we are actually working against, not what github checked out for us (i.e.: this one)

@@ -479,7 +497,7 @@ jobs:
shell: bash
run: |
# Render Helm Chart
make helmchart VERSION=${{ env.HELM_RELEASE_VERSION }} IMG=${{ env.OPERATOR_IMAGE_REPOSITORY }}:${{ env.OPERATOR_VERSION }}
make helmchart OPERATOR_NAME=${{ env.REPOSITORY_NAME }} VERSION=${{ env.HELM_RELEASE_VERSION }} IMG=${{ env.OPERATOR_IMAGE_REPOSITORY }}:${{ env.OPERATOR_VERSION }}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

OPERATOR_NAME defaults to pwd but thats wrong when testing. so supply the name which is resolved in the setup

@garethahealy
Copy link
Contributor Author

@sabre1041 @raffaelespazzoli added tests for several repos as requested and comments explaining changes

@@ -0,0 +1,24 @@
name: Testing group-sync-operator
on:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

action file per test is needed to stop conflicts from the upload action

@garethahealy garethahealy deleted the branch redhat-cop:main November 27, 2024 14:31
@garethahealy garethahealy deleted the main branch November 27, 2024 14:31
@garethahealy garethahealy reopened this Nov 28, 2024
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.

3 participants