-
Notifications
You must be signed in to change notification settings - Fork 573
/
Copy pathconstants.py
82 lines (66 loc) · 3 KB
/
constants.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Constants shared across butler commands."""
import collections
import os
import sys
# Chromedriver related constants.
CHROMEDRIVER_VERSION_URL = (
'https://commondatastorage.googleapis.com/chromedriver/LATEST_RELEASE_101')
CHROMEDRIVER_DOWNLOAD_PATTERN = (
'https://commondatastorage.googleapis.com/chromedriver/{version}/'
'{archive_name}')
# Local directory of deployment files.
PACKAGE_TARGET_ZIP_DIRECTORY = 'deployment'
# Deprecated source archive name.
LEGACY_ZIP_NAME = 'clusterfuzz-source.zip'
# File containing the source revision information.
PACKAGE_TARGET_MANIFEST_PATH = os.path.join('src', 'appengine', 'resources',
'clusterfuzz-source.manifest')
# Supported Platforms and ABIS (newer to older order).
PLATFORMS = collections.OrderedDict([
('windows', 'win_amd64'),
('macos', ('macosx_10_14_x86_64', 'macosx_10_12_x86_64')),
('linux', ('manylinux2014_x86_64')),
])
# Additional required packages when deploying to prod.
ADDITIONAL_RELEASES = ['chrome-tests-syncer']
if sys.version_info.major == 3 and sys.version_info.minor == 7:
ABIS = {'linux': 'cp37m', 'windows': 'cp37m', 'macos': 'cp37m'}
elif sys.version_info.major == 3 and sys.version_info.minor == 8:
ABIS = {'linux': 'cp38', 'windows': 'cp38', 'macos': 'cp38'}
elif sys.version_info.major == 3 and sys.version_info.minor == 9:
ABIS = {'linux': 'cp39', 'windows': 'cp39', 'macos': 'cp39'}
elif sys.version_info.major == 3 and sys.version_info.minor == 10:
ABIS = {'linux': 'cp310', 'windows': 'cp310', 'macos': 'cp310'}
elif sys.version_info.major == 3 and sys.version_info.minor == 11:
ABIS = {'linux': 'cp311', 'windows': 'cp311', 'macos': 'cp311'}
else:
raise ValueError('Only python versions 3.7-3.11 are supported.')
# Config directory to use for tests.
TEST_CONFIG_DIR = os.path.join('configs', 'test')
# Application id for local testing.
TEST_APP_ID = 'test-clusterfuzz'
TEST_APP_ID_WITH_DEV_PREFIX = 'dev~' + TEST_APP_ID
DEV_APPSERVER_PORT = 9000
DEV_APPSERVER_HOST = 'localhost:' + str(DEV_APPSERVER_PORT)
CRON_SERVICE_PORT = 9009
CRON_SERVICE_HOST = 'localhost:' + str(CRON_SERVICE_PORT)
DEV_APPSERVER_ADMIN_PORT = 9002
DATASTORE_EMULATOR_PORT = 9004
DATASTORE_EMULATOR_HOST = 'localhost:' + str(DATASTORE_EMULATOR_PORT)
PUBSUB_EMULATOR_PORT = 9006
PUBSUB_EMULATOR_HOST = 'localhost:' + str(PUBSUB_EMULATOR_PORT)
LOCAL_GCS_SERVER_PORT = 9008
LOCAL_GCS_SERVER_HOST = 'http://localhost:' + str(LOCAL_GCS_SERVER_PORT)