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

Commit cc5c709

Browse files
feat!: update the Iam methods to use ResourceName (#74)
* [CHANGE ME] Re-generated to pick up changes in the API or client library generator. * remove lower marks, update clirr diff * remove one more class * trigger kokoro * regenerate with only resource names Co-authored-by: yoshi-automation <[email protected]>
1 parent a0fdb5c commit cc5c709

File tree

29 files changed

+1441
-1235
lines changed

29 files changed

+1441
-1235
lines changed

.kokoro/build.sh

Lines changed: 40 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,19 +37,23 @@ if [[ ! -z "${GOOGLE_APPLICATION_CREDENTIALS}" && "${GOOGLE_APPLICATION_CREDENTI
3737
export GOOGLE_APPLICATION_CREDENTIALS=$(realpath ${KOKORO_ROOT}/src/${GOOGLE_APPLICATION_CREDENTIALS})
3838
fi
3939

40+
RETURN_CODE=0
41+
set +e
42+
4043
case ${JOB_TYPE} in
4144
test)
4245
mvn test -B -Dclirr.skip=true -Denforcer.skip=true
43-
bash ${KOKORO_GFILE_DIR}/codecov.sh
44-
bash .kokoro/coerce_logs.sh
46+
RETURN_CODE=$?
4547
;;
4648
lint)
4749
mvn \
4850
-Penable-samples \
4951
com.coveo:fmt-maven-plugin:check
52+
RETURN_CODE=$?
5053
;;
5154
javadoc)
5255
mvn javadoc:javadoc javadoc:test-javadoc
56+
RETURN_CODE=$?
5357
;;
5458
integration)
5559
mvn -B ${INTEGRATION_TEST_ARGS} \
@@ -59,21 +63,46 @@ integration)
5963
-Denforcer.skip=true \
6064
-fae \
6165
verify
62-
bash .kokoro/coerce_logs.sh
66+
RETURN_CODE=$?
6367
;;
6468
samples)
65-
mvn -B \
66-
-Penable-samples \
67-
-DtrimStackTrace=false \
68-
-Dclirr.skip=true \
69-
-Denforcer.skip=true \
70-
-fae \
71-
verify
72-
bash .kokoro/coerce_logs.sh
69+
if [[ -f samples/pom.xml ]]
70+
then
71+
pushd samples
72+
mvn -B \
73+
-Penable-samples \
74+
-DtrimStackTrace=false \
75+
-Dclirr.skip=true \
76+
-Denforcer.skip=true \
77+
-fae \
78+
verify
79+
RETURN_CODE=$?
80+
popd
81+
else
82+
echo "no sample pom.xml found - skipping sample tests"
83+
fi
7384
;;
7485
clirr)
7586
mvn -B -Denforcer.skip=true clirr:check
87+
RETURN_CODE=$?
7688
;;
7789
*)
7890
;;
7991
esac
92+
93+
if [ "${REPORT_COVERAGE}" == "true" ]
94+
then
95+
bash ${KOKORO_GFILE_DIR}/codecov.sh
96+
fi
97+
98+
# fix output location of logs
99+
bash .kokoro/coerce_logs.sh
100+
101+
if [[ "${ENABLE_BUILD_COP}" == "true" ]]
102+
then
103+
chmod +x ${KOKORO_GFILE_DIR}/linux_amd64/buildcop
104+
${KOKORO_GFILE_DIR}/linux_amd64/buildcop -repo=googleapis/java-securitycenter
105+
fi
106+
107+
echo "exiting with ${RETURN_CODE}"
108+
exit ${RETURN_CODE}

.kokoro/continuous/java8.cfg

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,8 @@ env_vars: {
55
key: "TRAMPOLINE_IMAGE"
66
value: "gcr.io/cloud-devrel-kokoro-resources/java8"
77
}
8+
9+
env_vars: {
10+
key: "REPORT_COVERAGE"
11+
value: "true"
12+
}

.kokoro/nightly/integration.cfg

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,17 @@ env_vars: {
55
key: "TRAMPOLINE_IMAGE"
66
value: "gcr.io/cloud-devrel-kokoro-resources/java8"
77
}
8+
9+
env_vars: {
10+
key: "ENABLE_BUILD_COP"
11+
value: "true"
12+
}
13+
14+
before_action {
15+
fetch_keystore {
16+
keystore_resource {
17+
keystore_config_id: 73713
18+
keyname: "java_it_service_account"
19+
}
20+
}
21+
}

.kokoro/nightly/java8.cfg

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,8 @@ env_vars: {
55
key: "TRAMPOLINE_IMAGE"
66
value: "gcr.io/cloud-devrel-kokoro-resources/java8"
77
}
8+
9+
env_vars: {
10+
key: "REPORT_COVERAGE"
11+
value: "true"
12+
}

.kokoro/nightly/samples.cfg

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,28 @@
22

33
# Configure the docker image for kokoro-trampoline.
44
env_vars: {
5-
key: "TRAMPOLINE_IMAGE"
6-
value: "gcr.io/cloud-devrel-kokoro-resources/java8"
5+
key: "TRAMPOLINE_IMAGE"
6+
value: "gcr.io/cloud-devrel-kokoro-resources/java8"
77
}
88

99
env_vars: {
10-
key: "JOB_TYPE"
11-
value: "samples"
10+
key: "JOB_TYPE"
11+
value: "samples"
1212
}
1313

1414
env_vars: {
15-
key: "GCLOUD_PROJECT"
16-
value: "gcloud-devel"
15+
key: "GCLOUD_PROJECT"
16+
value: "gcloud-devel"
1717
}
1818

1919
env_vars: {
20-
key: "GOOGLE_APPLICATION_CREDENTIALS"
21-
value: "keystore/73713_java_it_service_account"
20+
key: "GOOGLE_APPLICATION_CREDENTIALS"
21+
value: "keystore/73713_java_it_service_account"
22+
}
23+
24+
env_vars: {
25+
key: "ENABLE_BUILD_COP"
26+
value: "true"
2227
}
2328

2429
before_action {

.kokoro/presubmit/java8.cfg

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,8 @@ env_vars: {
55
key: "TRAMPOLINE_IMAGE"
66
value: "gcr.io/cloud-devrel-kokoro-resources/java8"
77
}
8+
9+
env_vars: {
10+
key: "REPORT_COVERAGE"
11+
value: "true"
12+
}

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,12 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file
2020
<dependency>
2121
<groupId>com.google.cloud</groupId>
2222
<artifactId>libraries-bom</artifactId>
23-
<version>4.1.0</version>
23+
<version>4.2.0</version>
2424
<type>pom</type>
2525
<scope>import</scope>
2626
</dependency>
2727
</dependencies>
2828
</dependencyManagement>
29-
3029
<dependencies>
3130
<dependency>
3231
<groupId>com.google.cloud</groupId>
@@ -87,6 +86,8 @@ use this Google Cloud Security Command Center Client Library.
8786

8887

8988

89+
90+
9091
## Troubleshooting
9192

9293
To get help, follow the instructions in the [shared Troubleshooting document][troubleshooting].
@@ -158,4 +159,5 @@ Java 11 | [![Kokoro CI][kokoro-badge-image-5]][kokoro-badge-link-5]
158159
[license]: https://github.com/googleapis/java-securitycenter/blob/master/LICENSE
159160

160161
[enable-api]: https://console.cloud.google.com/flows/enableapi?apiid=securitycenter.googleapis.com
161-
[libraries-bom]: https://github.com/GoogleCloudPlatform/cloud-opensource-java/wiki/The-Google-Cloud-Platform-Libraries-BOM
162+
[libraries-bom]: https://github.com/GoogleCloudPlatform/cloud-opensource-java/wiki/The-Google-Cloud-Platform-Libraries-BOM
163+
[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!-- see http://www.mojohaus.org/clirr-maven-plugin/examples/ignored-differences.html -->
3+
<differences>
4+
<difference>
5+
<differenceType>7005</differenceType>
6+
<className>com/google/cloud/securitycenter/v1/SecurityCenterClient</className>
7+
<method>*Iam*</method>
8+
<to>*ResourceName*</to>
9+
</difference>
10+
</differences>

0 commit comments

Comments
 (0)