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

chore: add generation workflow #2825

Merged
merged 4 commits into from
May 30, 2024
Merged

Conversation

JoeWang1127
Copy link
Collaborator

@JoeWang1127 JoeWang1127 commented May 28, 2024

In this PR:

  • Add workflow and shell scripts used in library generation.

@product-auto-label product-auto-label bot added the size: l Pull request size is large. label May 28, 2024
@JoeWang1127 JoeWang1127 marked this pull request as ready for review May 29, 2024 18:47
@JoeWang1127 JoeWang1127 requested a review from a team as a code owner May 29, 2024 18:47
- name: Build image
shell: bash
run: |
docker build \
Copy link
Collaborator

Choose a reason for hiding this comment

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

Compare to the workflow in google-cloud-java, is this the only main change?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Changes compared to google-cloud-java

  1. build local image
  2. install gapic-generator-java-pom-parent

Copy link
Contributor

Choose a reason for hiding this comment

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

An idea to get rid of the .m2 volume mapping.
Our workflows build and publish a docker image every time we merge a PR in this repo. The tag is the commit SHA of the merged (squashed) commit.

Would it be useful to run mvn install -pl ggj-pom-parent in the Dockerfile and label the image as x.x.x-SNAPSHOT as well (we can have two tags)?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This step is specific to generate common protos.

Putting mvn install in the Dockerfile will apply to all libraries, which is a redundant step.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I feel it's better to put these two shell scripts under .github/ as they are only used by github workflows, WDYT? Same thing for the scripts in google-cloud-java.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think it's fine.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.

- name: Build image
shell: bash
run: |
docker build \
Copy link
Contributor

Choose a reason for hiding this comment

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

An idea to get rid of the .m2 volume mapping.
Our workflows build and publish a docker image every time we merge a PR in this repo. The tag is the commit SHA of the merged (squashed) commit.

Would it be useful to run mvn install -pl ggj-pom-parent in the Dockerfile and label the image as x.x.x-SNAPSHOT as well (we can have two tags)?

Copy link

sonarcloud bot commented May 29, 2024

Quality Gate Passed Quality Gate passed for 'gapic-generator-java-root'

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@JoeWang1127 JoeWang1127 requested a review from blakeli0 May 29, 2024 22:27
Copy link

sonarcloud bot commented May 29, 2024

Quality Gate Passed Quality Gate passed for 'java_showcase_integration_tests'

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@JoeWang1127 JoeWang1127 merged commit 1638f99 into main May 30, 2024
47 of 48 checks passed
@JoeWang1127 JoeWang1127 deleted the chore/add-generation-workflow branch May 30, 2024 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: l Pull request size is large.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants