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

build: run codegen from GitHub actions #621

Merged
merged 4 commits into from
Feb 28, 2022

Conversation

chingor13
Copy link
Contributor

@chingor13 chingor13 commented Feb 22, 2022

This switches codegen to per-service PRs created via GitHub actions. Codegen is started nightly.

Example: chingor13#3

@chingor13 chingor13 marked this pull request as draft February 22, 2022 23:11
@chingor13 chingor13 force-pushed the gha-codegen branch 2 times, most recently from 4e8dd4b to 5c08ba7 Compare February 23, 2022 00:30
@chingor13 chingor13 marked this pull request as ready for review February 23, 2022 00:52
Copy link
Contributor

@bshaffer bshaffer left a comment

Choose a reason for hiding this comment

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

Looks great with one suggestion

python-version: 2.7
- id: find-preferred-versions
run: |
versions=$( cat discovery-artifact-manager/discoveries/index.json | jq -r '[.items[] | select(.name == "${{ matrix.service }}" and .name != "discovery" and .name != "websecurityscanner") | select(.name == "admin" or .preferred).version] | join(",")' )
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we either clean this logic up to make it more readable, or define the logic elsewhere?

Also, I don't think this really needs to be here... can't we ensure "discovery" and "websecurityscanner" don't show up in matrix.service instead?

select(.name == "${{ matrix.service }}" and .name != "discovery" and .name != "websecurityscanner") |

If not, we can add a different step to exclude them, such as:

if: ${{ matrix.service != "discovery" and matrix.service != "websecurityscanner" }} 

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can't update the initial list (it's a shared external workflow that lists all the available services), but I should be able to exclude separately via a matrix exclusion or a separate if clause.

@chingor13 chingor13 merged commit f833b06 into googleapis:main Feb 28, 2022
@chingor13 chingor13 deleted the gha-codegen branch February 28, 2022 21:30
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