forked from pantsbuild/pants
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set up pants.remote.ini for remoting Python unit tests (pantsbuild#7990)
Per pantsbuild#7649, we are working to remote unit tests in CI. This implements step pantsbuild#2, which allows us to run unit tests locally (several, but not all tests). Here, we set up `pants.remote.ini` so that users only must point to it and provide the authentication token.
- Loading branch information
1 parent
145fbf9
commit b2602ea
Showing
1 changed file
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# For goals that you'd like to remote, first install the Google cloud CLI and then log in to an | ||
# an account authorized to run the Pants project (you may need to ask a Pants committer for | ||
# to authorize your account). Then, point to this config file and provide the oauth token like this: | ||
# | ||
# $ ./pants --pants-config-files=pants.remote.ini | ||
# --remote-oauth-bearer-token-path=<(gcloud auth application-default print-access-token | perl -p -e 'chomp if eof') | ||
# --no-v1 --v2 test tests/python/pants_test/util:strutil | ||
# | ||
# Remoting does not work for every goal, so you should not permanently point to this ini file, e.g. | ||
# via an env var; only point to it when you want to remote a specific invocation. | ||
|
||
[DEFAULT] | ||
remote_execution: True | ||
remote_execution_server: remotebuildexecution.googleapis.com | ||
remote_store_server: remotebuildexecution.googleapis.com | ||
# This file might not exist on your machine. If this default fails, run `find /usr -name '*.pem'` | ||
# and override this value via the env var PANTS_REMOTE_CA_CERTS_PATH. | ||
remote_ca_certs_path: /usr/local/etc/openssl/cert.pem | ||
remote_instance_name: projects/pants-remoting-beta/instances/default_instance | ||
remote_execution_extra_platform_properties: [ | ||
# This allows network requests, e.g. to resolve dependencies with Pex. | ||
"dockerNetwork=standard", | ||
"container-image=docker://marketplace.gcr.io/google/rbe-ubuntu16-04@sha256:da0f21c71abce3bbb92c3a0c44c3737f007a82b60f8bd2930abc55fe64fc2729", | ||
] | ||
|
||
|
||
[python-setup] | ||
interpreter_search_paths: [ | ||
'<PEXRC>', | ||
'<PATH>' | ||
# TODO(#7735): We need to add this entry for remoting to be able to discover a valid | ||
# interpreter, because <PATH> will refer to the host PATH and not the remote value. This value | ||
# was found by inspecting the docker image for remoting. | ||
"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/python3.6/bin:/usr/local/go/bin", | ||
] | ||
|
||
|
||
[python-native-code] | ||
ld_flags: [] | ||
cpp_flags: [] |