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 cloudbuild setup to publish docker images #2298

Merged
merged 12 commits into from
Dec 15, 2023
Merged

Conversation

mpeddada1
Copy link
Contributor

@mpeddada1 mpeddada1 commented Dec 11, 2023

Cloud Build Trigger for the docker image push is set to:

Screenshot 2023-12-14 at 3 06 16 PM

@product-auto-label product-auto-label bot added the size: m Pull request size is medium. label Dec 11, 2023
@mpeddada1 mpeddada1 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 12, 2023
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 12, 2023
@mpeddada1 mpeddada1 closed this Dec 12, 2023
@mpeddada1 mpeddada1 reopened this Dec 12, 2023
@mpeddada1 mpeddada1 closed this Dec 12, 2023
@mpeddada1 mpeddada1 reopened this Dec 12, 2023
@mpeddada1
Copy link
Contributor Author

mpeddada1 commented Dec 13, 2023

/gcbrun

@mpeddada1
Copy link
Contributor Author

Now running into:

Step #1: 00:00:45:335 [INFO] -------------------------------------------------------
Step #1: 00:00:47:331 [INFO] Running com.google.cloud.kms.it.ITKmsTest
Step #1: 00:00:50:377 [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 3.019 s <<< FAILURE! -- in com.google.cloud.kms.it.ITKmsTest
Step #1: 00:00:50:378 [ERROR] com.google.cloud.kms.it.ITKmsTest.ensureKmsKeyRingExists -- Time elapsed: 2.983 s <<< ERROR!
Step #1: io.grpc.StatusRuntimeException: PERMISSION_DENIED: Permission 'cloudkms.keyRings.get' denied on resource 'projects/cloud-java-ci-test/locations/us/keyRings/gcs_test_kms_key_ring' (or it may not exist).

@mpeddada1 mpeddada1 added the owlbot:run Add this label to trigger the Owlbot post processor. label Dec 14, 2023
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Dec 14, 2023
@mpeddada1 mpeddada1 marked this pull request as ready for review December 14, 2023 20:07
@mpeddada1 mpeddada1 requested a review from a team as a code owner December 14, 2023 20:07
Copy link

sonarcloud bot commented Dec 14, 2023

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

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

Copy link

sonarcloud bot commented Dec 14, 2023

Quality Gate Passed Quality Gate passed for 'java_showcase_integration_tests'

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@mpeddada1 mpeddada1 merged commit fc140f7 into main Dec 15, 2023
37 checks passed
@mpeddada1 mpeddada1 deleted the docker-infra branch December 15, 2023 15:35
diegomarquezp added a commit that referenced this pull request Feb 26, 2024
Similar changes to those of
#2298 by @mpeddada1

This setup uses two triggers:
- The first one is
[library-generation-presubmit-sdk-platform-java](https://pantheon.corp.google.com/cloud-build/triggers;region=global/edit/5783744f-0820-419f-bc5e-abbbece4be0b?e=13803378&mods=monitoring_api_prod&project=cloud-devrel-kokoro-resources),
which runs on each pull request. It builds a docker image with the
contents of `library_generation` at HEAD and runs
`library_generation/integration_tests.py` with such image
- The second one is
[library-generation-sdk-platform-java](https://pantheon.corp.google.com/cloud-build/triggers;region=global/edit/e3373892-82a2-4eac-a1f2-95523966df70?e=13803378&mods=monitoring_api_prod&project=cloud-devrel-kokoro-resources),
which:
   - is triggered upon a commit pushed to the `main` branch, then
   - builds a docker image with two tags
- `latest`, which will be constantly updated to match the latest build
     - a tag based on the branch `${COMMIT_SHA}`
   - then the image is pushed with both tags



### tasks

- [x] create dockerfile
- [x] create cloudbuild.yaml for testing
- [x] create cloudbuild test infra
- [x] create cloudbuild.yaml for releasing the image
- [x] create cloudbuild release infra

---------

Co-authored-by: Joe Wang <106995533+JoeWang1127@users.noreply.github.com>
lqiu96 pushed a commit that referenced this pull request Feb 26, 2024
Similar changes to those of
#2298 by @mpeddada1

This setup uses two triggers:
- The first one is
[library-generation-presubmit-sdk-platform-java](https://pantheon.corp.google.com/cloud-build/triggers;region=global/edit/5783744f-0820-419f-bc5e-abbbece4be0b?e=13803378&mods=monitoring_api_prod&project=cloud-devrel-kokoro-resources),
which runs on each pull request. It builds a docker image with the
contents of `library_generation` at HEAD and runs
`library_generation/integration_tests.py` with such image
- The second one is
[library-generation-sdk-platform-java](https://pantheon.corp.google.com/cloud-build/triggers;region=global/edit/e3373892-82a2-4eac-a1f2-95523966df70?e=13803378&mods=monitoring_api_prod&project=cloud-devrel-kokoro-resources),
which:
   - is triggered upon a commit pushed to the `main` branch, then
   - builds a docker image with two tags
- `latest`, which will be constantly updated to match the latest build
     - a tag based on the branch `${COMMIT_SHA}`
   - then the image is pushed with both tags



### tasks

- [x] create dockerfile
- [x] create cloudbuild.yaml for testing
- [x] create cloudbuild test infra
- [x] create cloudbuild.yaml for releasing the image
- [x] create cloudbuild release infra

---------

Co-authored-by: Joe Wang <106995533+JoeWang1127@users.noreply.github.com>
lqiu96 pushed a commit that referenced this pull request Feb 28, 2024
Similar changes to those of
#2298 by @mpeddada1

This setup uses two triggers:
- The first one is
[library-generation-presubmit-sdk-platform-java](https://pantheon.corp.google.com/cloud-build/triggers;region=global/edit/5783744f-0820-419f-bc5e-abbbece4be0b?e=13803378&mods=monitoring_api_prod&project=cloud-devrel-kokoro-resources),
which runs on each pull request. It builds a docker image with the
contents of `library_generation` at HEAD and runs
`library_generation/integration_tests.py` with such image
- The second one is
[library-generation-sdk-platform-java](https://pantheon.corp.google.com/cloud-build/triggers;region=global/edit/e3373892-82a2-4eac-a1f2-95523966df70?e=13803378&mods=monitoring_api_prod&project=cloud-devrel-kokoro-resources),
which:
   - is triggered upon a commit pushed to the `main` branch, then
   - builds a docker image with two tags
- `latest`, which will be constantly updated to match the latest build
     - a tag based on the branch `${COMMIT_SHA}`
   - then the image is pushed with both tags



### tasks

- [x] create dockerfile
- [x] create cloudbuild.yaml for testing
- [x] create cloudbuild test infra
- [x] create cloudbuild.yaml for releasing the image
- [x] create cloudbuild release infra

---------

Co-authored-by: Joe Wang <106995533+JoeWang1127@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: m Pull request size is medium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants