Skip to content
This repository has been archived by the owner on Sep 16, 2023. It is now read-only.

docs(sample): Add sample for Native Image Support #711

Merged
merged 8 commits into from
Mar 2, 2022
Merged

Conversation

mpeddada1
Copy link
Contributor

This PR copies over the SecretManager sample, Setup Instructions and README for native image support from GoogleCloudPlatform/native-image-support-java. It also adds an integration test that can be run as a native image.

Calling mvn package -Pnative -DskipTests builds the native image for the application and calling mvn test -Pnative runs the test as a native image.

For more information: https://graalvm.github.io/native-build-tools/latest/maven-plugin.html#configuration

@mpeddada1 mpeddada1 requested a review from a team as a code owner February 28, 2022 18:40
@product-auto-label product-auto-label bot added api: secretmanager Issues related to the googleapis/java-secretmanager API. samples Issues that are directly related to samples. labels Feb 28, 2022
@generated-files-bot
Copy link

Warning: This pull request is touching the following templated files:

  • samples/pom.xml

Copy link
Member

@suztomo suztomo left a comment

Choose a reason for hiding this comment

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

The newly-added integration test is not shown in "Kokoro - Test: Samples" https://source.cloud.google.com/results/invocations/0a560e5f-f023-468b-a0c3-ea928e4df001.

private static final String NATIVE_TEST_SECRET_ID = "native-test-secret" + UUID.randomUUID();
private static String PROJECT_ID = ServiceOptions.getDefaultProjectId();
private ByteArrayOutputStream bout;
private PrintStream out;
Copy link
Member

Choose a reason for hiding this comment

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

My intelliJ told me that this variable is unnecessary.

@mpeddada1
Copy link
Contributor Author

mpeddada1 commented Mar 2, 2022

Quick note: For now, the sample will be run as part of the nightly builds (similar to how samples in snippets/ are run). We can revisit this to see if we want add this sample to the presubmit build.

@mpeddada1 mpeddada1 merged commit 1afd3aa into main Mar 2, 2022
@mpeddada1 mpeddada1 deleted the add-native-sample branch March 2, 2022 19:42
gcf-merge-on-green bot pushed a commit that referenced this pull request Mar 30, 2022
🤖 I have created a release *beep* *boop*
---


### [2.1.4](v2.1.3...v2.1.4) (2022-03-29)


### Documentation

* **sample:** Add sample for Native Image Support ([#711](#711)) ([1afd3aa](1afd3aa))


### Dependencies

* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.9.0 ([#739](#739)) ([6a58447](6a58447))
* update dependency com.google.cloud:native-image-support to v0.12.10 ([#731](#731)) ([3e9211a](3e9211a))
* update dependency com.google.cloud:native-image-support to v0.12.11 ([#738](#738)) ([afe2969](afe2969))
* update dependency com.google.cloud:native-image-support to v0.12.6 ([#723](#723)) ([a2803ca](a2803ca))
* update dependency com.google.cloud:native-image-support to v0.12.7 ([#727](#727)) ([fa8e4ed](fa8e4ed))
* update dependency com.google.cloud:native-image-support to v0.12.8 ([#729](#729)) ([1a9d2b8](1a9d2b8))
* update dependency com.google.cloud:native-image-support to v0.12.9 ([#730](#730)) ([60e8336](60e8336))
* update dependency org.graalvm.buildtools:junit-platform-native to v0.9.10 ([#724](#724)) ([604a9bc](604a9bc))
* update dependency org.graalvm.buildtools:junit-platform-native to v0.9.11 ([#735](#735)) ([6123ddc](6123ddc))
* update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.10 ([#725](#725)) ([6a71213](6a71213))
* update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.11 ([#736](#736)) ([d54de52](d54de52))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api: secretmanager Issues related to the googleapis/java-secretmanager API. samples Issues that are directly related to samples.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants