mirror of
https://github.com/google/nomulus
synced 2026-09-19 14:34:18 +00:00
Build docker image of nomulus tool (#142)
* Build docker image of nomulus tool In the course of "gradle build", build a docker image of nomulus tool so that users can run this to allow us to bundle the java version with the image.
This commit is contained in:
committed by
Lai Jiang
parent
39ceda628c
commit
bd48041961
@@ -22,9 +22,27 @@ steps:
|
||||
# Run tests
|
||||
- name: 'gcr.io/${PROJECT_ID}/builder:latest'
|
||||
args: ['./gradlew', 'test', '-PskipDockerIncompatibleTests=true']
|
||||
# Build the tool binary.
|
||||
# Build the tool binary and image.
|
||||
- name: 'gcr.io/${PROJECT_ID}/builder:latest'
|
||||
args: ['release/build_nomulus_for_env.sh', 'tool', 'output']
|
||||
# Tag the tool image and push it to the registry.
|
||||
- name: 'gcr.io/${PROJECT_ID}/builder:latest'
|
||||
entrypoint: /bin/bash
|
||||
args:
|
||||
- -c
|
||||
- |
|
||||
docker tag nomulus-tool gcr.io/${PROJECT_ID}/nomulus-tool:${TAG_NAME}
|
||||
docker push gcr.io/${PROJECT_ID}/nomulus-tool:${TAG_NAME}
|
||||
# Get the tool image digest and substitute in the digest in the tagging yaml file.
|
||||
- name: 'gcr.io/${PROJECT_ID}/builder:latest'
|
||||
entrypoint: /bin/bash
|
||||
args:
|
||||
- -c
|
||||
- |
|
||||
digest=$(gcloud container images list-tags gcr.io/${PROJECT_ID}/nomulus-tool \
|
||||
--format="get(digest)" --filter="tags = ${TAG_NAME}")
|
||||
sed -i s/'$${_IMAGE}'/nomulus-tool/g release/cloudbuild-tag.yaml
|
||||
sed -i s/':$${TAG_NAME}'/@$digest/g release/cloudbuild-tag.yaml
|
||||
# Build and package the deployment files for alpha.
|
||||
- name: 'gcr.io/${PROJECT_ID}/builder:latest'
|
||||
args: ['release/build_nomulus_for_env.sh', 'alpha', 'output']
|
||||
@@ -44,6 +62,7 @@ artifacts:
|
||||
paths:
|
||||
- 'output/*.tar'
|
||||
- 'output/nomulus.jar'
|
||||
- 'release/cloudbuild-tag.yaml'
|
||||
- 'release/cloudbuild-sync.yaml'
|
||||
- 'release/cloudbuild-beam.yaml'
|
||||
timeout: 3600s
|
||||
|
||||
Reference in New Issue
Block a user