Skip to content

Commit aa2b585

Browse files
authored
Merge pull request apache#6056: [BEAM-4836] separate virtualenvs for Beam and PerfKit
2 parents dd5de56 + acd966e commit aa2b585

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

.test-infra/jenkins/CommonJobProperties.groovy

+10-6
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,7 @@ class CommonJobProperties {
260260
bigquery_table: 'beam_performance.pkb_results',
261261
k8s_get_retry_count: 36, // wait up to 6 minutes for K8s LoadBalancer
262262
k8s_get_wait_interval: 10,
263+
python_binary: '$WORKSPACE/.beam_env/bin/python',
263264
temp_dir: '$WORKSPACE',
264265
// Use source cloned by Jenkins and not clone it second time (redundantly).
265266
beam_location: '$WORKSPACE/src',
@@ -304,25 +305,28 @@ class CommonJobProperties {
304305
context.steps {
305306
// Clean up environment.
306307
shell('rm -rf PerfKitBenchmarker')
307-
shell('rm -rf .env')
308+
shell('rm -rf .beam_env')
309+
shell('rm -rf .perfkit_env')
308310

309311
// create new VirtualEnv, inherit already existing packages
310-
shell('virtualenv .env --system-site-packages')
312+
shell('virtualenv .beam_env --system-site-packages')
313+
shell('virtualenv .perfkit_env --system-site-packages')
311314

312315
// update setuptools and pip
313-
shell('.env/bin/pip install --upgrade setuptools pip')
316+
shell('.beam_env/bin/pip install --upgrade setuptools pip')
317+
shell('.perfkit_env/bin/pip install --upgrade setuptools pip')
314318

315319
// Clone appropriate perfkit branch
316320
shell('git clone https://github.com/GoogleCloudPlatform/PerfKitBenchmarker.git')
317321

318322
// Install job requirements for Python SDK.
319-
shell('.env/bin/pip install -e ' + CommonJobProperties.checkoutDir + '/sdks/python/[gcp,test]')
323+
shell('.beam_env/bin/pip install -e ' + CommonJobProperties.checkoutDir + '/sdks/python/[gcp,test]')
320324

321325
// Install Perfkit benchmark requirements.
322-
shell('.env/bin/pip install -r PerfKitBenchmarker/requirements.txt')
326+
shell('.perfkit_env/bin/pip install -r PerfKitBenchmarker/requirements.txt')
323327

324328
// Launch performance test.
325-
shell(".env/bin/python PerfKitBenchmarker/pkb.py $pkbArgs")
329+
shell(".perfkit_env/bin/python PerfKitBenchmarker/pkb.py $pkbArgs")
326330
}
327331
}
328332

0 commit comments

Comments
 (0)