Skip to content

Commit fd9b986

Browse files
committed
install additional deps
1 parent 2a918b0 commit fd9b986

File tree

2 files changed

+16
-12
lines changed

2 files changed

+16
-12
lines changed

.cloudbuild/library_generation/cloudbuild-library-generation-integration-test.yaml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
timeout: 7200s # 2 hours
1616
substitutions:
17+
_TEMP_TEST_IMAGE_ID: "temp-test-image:latest"
1718
_TEST_IMAGE_ID: "test-image:latest"
1819
steps:
1920
- name: gcr.io/cloud-builders/docker
@@ -30,14 +31,28 @@ steps:
3031
id: library-generation-build
3132
waitFor: ["-"]
3233

34+
- name: gcr.io/cloud-builders/docker
35+
entrypoint: bash
36+
args:
37+
- "c"
38+
- |
39+
docker build -t ${_TEST_IMAGE_ID} - << EOF
40+
FROM ${_TEMP_TEST_IMAGE_ID}
41+
RUN apk update && apk maven
42+
EOF
43+
env:
44+
- "DOCKER_BUILDKIT=1"
45+
id: additional-deps
46+
waitFor: ["library-generation-build"]
47+
3348
- name: ${_TEST_IMAGE_ID}
3449
entrypoint: python
3550
args: [
3651
"-m",
3752
"unittest",
3853
"hermetic_build/library_generation/tests/integration_tests.py"
3954
]
40-
waitFor: [ "library-generation-build" ]
55+
waitFor: ["additional-deps"]
4156
id: integration-test
4257

4358
options:

hermetic_build/library_generation/tests/integration_tests.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ class IntegrationTest(unittest.TestCase):
6060
@classmethod
6161
def setUpClass(cls) -> None:
6262
cls.__download_generator_jar(coordinates_file=generator_jar_coordinates_file)
63-
cls.__build_image(docker_file=build_file, cwd=repo_root_dir)
6463

6564
@classmethod
6665
def setUp(cls) -> None:
@@ -195,16 +194,6 @@ def __copy_api_definition(cls, committish: str) -> str:
195194
shutil.rmtree(repo_dest)
196195
return api_temp_dir
197196

198-
@classmethod
199-
def __build_image(cls, docker_file: str, cwd: str):
200-
# we build the docker image without removing intermediate containers, so
201-
# we can re-test more quickly
202-
subprocess.check_call(
203-
["docker", "build", "-f", docker_file, "-t", image_tag, "."],
204-
cwd=cwd,
205-
env=dict(os.environ, DOCKER_BUILDKIT="1"),
206-
)
207-
208197
@classmethod
209198
def __download_generator_jar(cls, coordinates_file: str) -> None:
210199
"""

0 commit comments

Comments
 (0)