Skip to content

Commit

Permalink
Update some build trigger configs; add a repo version bump step (#327)
Browse files Browse the repository at this point in the history
* Remove unused push yaml

With the planned name change of cloudbuild.java.yaml, it will be confusing to have this file around.
I can't find any scripts or triggers that use it, so should be safe to remove.

* Add push yaml with java checks and repo version bump
  • Loading branch information
hqpho authored Jun 27, 2024
1 parent 4eae5da commit 9c1287e
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions build/cloudbuild.push.yaml → build/ci/cloudbuild.push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,23 @@
# data change.

steps:
# Push server image to container registry
- id: push-image
name: gcr.io/cloud-builders/docker
entrypoint: "bash"

# Trigger downstream builds that listen for changes to multiple repos.
- id: update-repo-version
name: "gcr.io/cloud-builders/git"
entrypoint: /bin/bash
args:
- -c
- |
set -e
docker build -f build/Dockerfile \
-t gcr.io/datcom-ci/datacommons-mini-api:$SHORT_SHA \
-t gcr.io/datcom-ci/datacommons-mini-api:latest \
.
docker push gcr.io/datcom-ci/datacommons-mini-api:$SHORT_SHA
docker push gcr.io/datcom-ci/datacommons-mini-api:latest
gcloud source repos clone deployment /tmp/deployment --project=datcom-ci
cd /tmp/deployment
./scripts/update_external_repo_version.sh $REPO_NAME $SHORT_SHA
waitFor: ["-"]

# Generate protoc, build, check-format and run test
- id: "format & test"
name: "maven:3-jdk-11"
entrypoint: "mvn"
args: ["com.spotify.fmt:fmt-maven-plugin:check", "test"]
waitFor: ["-"]

0 comments on commit 9c1287e

Please sign in to comment.