Skip to content

Commit 95c653c

Browse files
dlorencdlorenc
authored andcommitted
Second version of switching things to cloud build.
1 parent 2018bba commit 95c653c

5 files changed

Lines changed: 18 additions & 2 deletions

File tree

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
cloudbuild.yaml
2+
interpreters.tar.gz

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ ENV PYTHONUNBUFFERED 1
2121
RUN pip install --upgrade pip virtualenv
2222

2323
# Install the Google-built interpreters
24-
ADD python-interpreter-builder/output/interpreters.tar.gz /
24+
ADD interpreters.tar.gz /
2525

2626
# Setup the app working directory
2727
RUN ln -s /home/vmagent/app /app

Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,8 @@ tests:
2525
.PHONY: benchmarks
2626
benchmarks:
2727
make -C tests benchmarks
28+
29+
.PHONY: cloudbuild
30+
cloudbuild:
31+
envsubst <cloudbuild.yaml.in > cloudbuild.yaml
32+
gcloud alpha container builds create . --config=cloudbuild.yaml

cloudbuild.yaml.in

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
steps:
2+
- name: gcr.io/cloud-builders/docker
3+
args: ['build', '--tag=interpreter', 'python-interpreter-builder']
4+
- name: interpreter
5+
args: ['cp', '/interpreters.tar.gz', '/workspace/']
6+
- name: gcr.io/cloud-builders/docker
7+
args: ['build', '--tag=${IMAGE_NAME}', '.']
8+
images:
9+
['${IMAGE_NAME}']

python-interpreter-builder/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ build:
66
-docker rm python-interpreter-builder
77
docker run --name python-interpreter-builder google/python-interpreter-builder /bin/bash
88
mkdir -p output
9-
docker cp python-interpreter-builder:/interpreters.tar.gz output/interpreters.tar.gz
9+
docker cp python-interpreter-builder:/interpreters.tar.gz ../interpreters.tar.gz
1010
docker rm python-interpreter-builder

0 commit comments

Comments
 (0)