diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index cda3df63..c7db3648 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -36,6 +36,7 @@ branchProtectionRules: - "Kokoro - Test: Integration" - "Kokoro - Test: Java GraalVM Native Image" - "Kokoro - Test: Java 17 GraalVM Native Image" + - "Kokoro - Test: Docker Image Validation" - "dependencies (11, java-bigquery)" - "dependencies (11, java-spanner)" - "dependencies (11, java-storage)" diff --git a/.kokoro/verify-docker-images.sh b/.kokoro/verify-docker-images.sh index 3f15d3a2..794f7a8d 100755 --- a/.kokoro/verify-docker-images.sh +++ b/.kokoro/verify-docker-images.sh @@ -8,6 +8,8 @@ function fetch_image_names() { echo "$imageNames" } +git config --global --add safe.directory /tmpfs/src/github/java-shared-config + # Get the directory of the build script scriptDir=$(realpath "$(dirname "${BASH_SOURCE[0]}")") # cd to the parent directory, i.e. the root of the git repo @@ -16,8 +18,8 @@ cd ${scriptDir}/.. || exit # Fetch the java-shared-config version in source of the current commit. javaSharedConfigVersion="$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" -branchName=$(git name-rev "$KOKORO_GIT_COMMIT" | sed 's/.* //') -gitCommitMessage=$(git log -1 "$(git rev-parse --short "$KOKORO_GIT_COMMIT")" | grep "chore(main): release *") +branchName=$(git name-rev "${KOKORO_GIT_COMMIT}" | sed 's/.* //') +gitCommitMessage=$(git log -1 "$(git rev-parse --short "${KOKORO_GIT_COMMIT}")" | grep "chore(main): release *") # GraalVM docker images are not tagged with SNAPSHOT versions. if [[ "${branchName}" == *"release-please--branches--main"* ]] && [[ ! $gitCommitMessage =~ "SNAPSHOT" ]]; then