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 a Cloud Build config to push library generation image to Artifact Registry #3251

Merged
merged 7 commits into from
Oct 1, 2024

Conversation

JoeWang1127
Copy link
Collaborator

@JoeWang1127 JoeWang1127 commented Sep 27, 2024

In this PR:

  • Add a Cloud Build config to push library generation image to an image repository under java-hermetic-build-prod project.

This PR will allow us to push the library generation image to two image repositories so that we can test our generation script can pull from us-docker.pkg.dev while the downstream libraries can still use images from gcr.io.

Repository name changed in cl/679753674
Cloud build trigger changed in cl/680040538

@product-auto-label product-auto-label bot added the size: xs Pull request size is extra small. label Sep 27, 2024
@JoeWang1127 JoeWang1127 marked this pull request as ready for review September 27, 2024 20:38
@@ -14,7 +14,7 @@

timeout: 7200s # 2 hours
substitutions:
_IMAGE_NAME: "gcr.io/cloud-devrel-public-resources/java-library-generation"
_IMAGE_NAME: "us-docker.pkg.dev/java-hermetic-build-prod/java-hermetic-build-prod-images"
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think the project name java-hermetic-build-prod is a generated name from java-hermetic-build? I don't think we need to repeat java-hermetic-build-prod again in the image name. Can we choose a different image name? library-generation actually sounds fine to me, but you may have a better idea.

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'll take a look about how to change the image name.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Repository name updated in cl/679753674.

Copy link
Collaborator

@blakeli0 blakeli0 left a comment

Choose a reason for hiding this comment

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

Is this PR to resolve the permission issues you mentioned in the description? Or those are the issues will run into?

@JoeWang1127
Copy link
Collaborator Author

JoeWang1127 commented Sep 27, 2024

Is this PR to resolve the permission issues you mentioned in the description? Or those are the issues will run into?

This is the issue we ran into when pushing images to Artifact registry (which is different from pulling image from AR).

This is the log: https://pantheon.corp.google.com/cloud-build/builds;region=us-central1/a37e1f37-6b2a-4f2b-8b7f-9344cb77330a?e=13803378&mods=monitoring_api_prod&project=java-hermetic-build-prod

@product-auto-label product-auto-label bot added size: m Pull request size is medium. and removed size: xs Pull request size is extra small. labels Sep 28, 2024
@product-auto-label product-auto-label bot added size: s Pull request size is small. and removed size: m Pull request size is medium. labels Sep 28, 2024
@JoeWang1127 JoeWang1127 changed the title chore: change library generation image repo chore: add a Cloud Build config to push library generation image to Artifact Registry Sep 28, 2024

timeout: 7200s # 2 hours
substitutions:
_IMAGE_NAME: "us-docker.pkg.dev/java-hermetic-build-prod/java-hermetic-build-prod-images"
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this name needs to be updated with repository name as well?

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.

id: library-generation-build
waitFor: ["-"]

options:
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this config is a test to try to resolve some permission issue? Did we find it useful?

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 you mean the logging options.

Yes, we can see logs in cloud build.

Copy link

sonarcloud bot commented Oct 1, 2024

Copy link

sonarcloud bot commented Oct 1, 2024

Quality Gate Passed Quality Gate passed for 'java_showcase_integration_tests'

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

@JoeWang1127 JoeWang1127 merged commit bae30a7 into main Oct 1, 2024
48 of 50 checks passed
@JoeWang1127 JoeWang1127 deleted the chore/change-artifact-reg-repo branch October 1, 2024 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: s Pull request size is small.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants