Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/generated-files-bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ externalManifests:
file: '.github/readme/synth.metadata/synth.metadata'
jsonpath: '$.generatedFiles[*]'
ignoreAuthors:
- 'cloud-java-bot'
- 'renovate-bot'
- 'yoshi-automation'
- 'release-please[bot]'
Expand Down
13 changes: 10 additions & 3 deletions .kokoro/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,13 @@ if [[ ! -z "${GOOGLE_APPLICATION_CREDENTIALS}" && "${GOOGLE_APPLICATION_CREDENTI
export GOOGLE_APPLICATION_CREDENTIALS=$(realpath ${KOKORO_GFILE_DIR}/${GOOGLE_APPLICATION_CREDENTIALS})
fi


export TEST_UNIVERSE_DOMAIN_CREDENTIAL=$(realpath ${KOKORO_GFILE_DIR}/secret_manager/client-library-test-universe-domain-credential)
export TEST_UNIVERSE_DOMAIN=$(gcloud secrets versions access latest --project cloud-devrel-kokoro-resources --secret=client-library-test-universe-domain)
export TEST_UNIVERSE_PROJECT_ID=$(gcloud secrets versions access latest --project cloud-devrel-kokoro-resources --secret=client-library-test-universe-project-id)
export TEST_UNIVERSE_LOCATION=$(gcloud secrets versions access latest --project cloud-devrel-kokoro-resources --secret=client-library-test-universe-storage-location)


RETURN_CODE=0
set +e

Expand Down Expand Up @@ -75,12 +77,17 @@ integration)
verify
RETURN_CODE=$?
;;
graalvm)
graalvmA)
# Run Unit and Integration Tests with Native Image
mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative test
RETURN_CODE=$?
;;
graalvmB)
# Run Unit and Integration Tests with Native Image
mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative test
RETURN_CODE=$?
;;
graalvm17)
graalvmC)
# Run Unit and Integration Tests with Native Image
mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative test
RETURN_CODE=$?
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not sure why we need tree different job types that are all exactly the same.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I discussed with @mpeddada1 and this redundancy was probably kept under the assumption they may eventually differ, but it hasn't happened so far. Thanks again for pointing this inconsistency out. I'll soon use a singe graalvm) case.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We decided to just use graalvm)

Expand Down Expand Up @@ -137,4 +144,4 @@ then
fi

echo "exiting with ${RETURN_CODE}"
exit ${RETURN_CODE}
exit ${RETURN_CODE}
38 changes: 38 additions & 0 deletions .kokoro/presubmit/graalvm-a.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_b:3.45.1"
}

env_vars: {
key: "JOB_TYPE"
value: "graalvmA"
}

# TODO: remove this after we've migrated all tests and scripts
env_vars: {
key: "GCLOUD_PROJECT"
value: "gcloud-devel"
}

env_vars: {
key: "GOOGLE_CLOUD_PROJECT"
value: "gcloud-devel"
}

env_vars: {
key: "GOOGLE_APPLICATION_CREDENTIALS"
value: "secret_manager/java-it-service-account"
}

env_vars: {
key: "SECRET_MANAGER_KEYS"
value: "java-it-service-account"
}

env_vars: {
key: "IT_SERVICE_ACCOUNT_EMAIL"
value: "it-service-account@gcloud-devel.iam.gserviceaccount.com"
}
38 changes: 38 additions & 0 deletions .kokoro/presubmit/graalvm-b.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_b:3.45.1"
}

env_vars: {
key: "JOB_TYPE"
value: "graalvmB"
}

# TODO: remove this after we've migrated all tests and scripts
env_vars: {
key: "GCLOUD_PROJECT"
value: "gcloud-devel"
}

env_vars: {
key: "GOOGLE_CLOUD_PROJECT"
value: "gcloud-devel"
}

env_vars: {
key: "GOOGLE_APPLICATION_CREDENTIALS"
value: "secret_manager/java-it-service-account"
}

env_vars: {
key: "SECRET_MANAGER_KEYS"
value: "java-it-service-account"
}

env_vars: {
key: "IT_SERVICE_ACCOUNT_EMAIL"
value: "it-service-account@gcloud-devel.iam.gserviceaccount.com"
}
38 changes: 38 additions & 0 deletions .kokoro/presubmit/graalvm-c.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_b:3.45.1"
}

env_vars: {
key: "JOB_TYPE"
value: "graalvmC"
}

# TODO: remove this after we've migrated all tests and scripts
env_vars: {
key: "GCLOUD_PROJECT"
value: "gcloud-devel"
}

env_vars: {
key: "GOOGLE_CLOUD_PROJECT"
value: "gcloud-devel"
}

env_vars: {
key: "GOOGLE_APPLICATION_CREDENTIALS"
value: "secret_manager/java-it-service-account"
}

env_vars: {
key: "SECRET_MANAGER_KEYS"
value: "java-it-service-account"
}

env_vars: {
key: "IT_SERVICE_ACCOUNT_EMAIL"
value: "it-service-account@gcloud-devel.iam.gserviceaccount.com"
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for pointing it out. Although this is just a draft, I was thinking of manually remove them once the generator image brings these templates (the generator doesn't remove templated files). I'll keep you posted with our decision.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Two steps is okay in my mind, but it will put extra strain on the native image build pool have 5 configs instead of the 2 today or 3 tomorrow.

We'll also need to update the https://github.com/googleapis/java-storage/blob/main/.github/sync-repo-settings.yaml#L5-L21 so the correct jobs are PR gates

Copy link
Contributor Author

Choose a reason for hiding this comment

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

extra strain

I meant to mention that the eventual template update PR would have a manual commit (by me) removing these configs. On the google3 side, there will only be a jump from 2 configs to 3.

sync-repo-settings

Thanks, I was missing that part of the migration.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, sync-repo-settings is a special case. The generation process can only create a new one, not update it. It will therefore be a manual commit in the eventual update PR.