File tree Expand file tree Collapse file tree 3 files changed +13
-10
lines changed Expand file tree Collapse file tree 3 files changed +13
-10
lines changed Original file line number Diff line number Diff line change 8
8
from readthedocs_build .config import load as load_config
9
9
from readthedocs_build .config import BuildConfig , ConfigError , InvalidConfig
10
10
11
- from .constants import DOCKER_BUILD_IMAGES , DOCKER_IMAGE
11
+ from .constants import DOCKER_IMAGE_SETTINGS , DOCKER_IMAGE
12
12
13
13
14
14
class ConfigWrapper (object ):
@@ -138,14 +138,16 @@ def load_yaml_config(version):
138
138
# Get build image to set up the python version validation. Pass in the
139
139
# build image python limitations to the loaded config so that the versions
140
140
# can be rejected at validation
141
- build_image = DOCKER_BUILD_IMAGES .get (
142
- version .project .container_image ,
143
- DOCKER_BUILD_IMAGES .get (DOCKER_IMAGE , None ),
144
- )
145
- if build_image :
146
- env_config = {
147
- 'python' : build_image ['python' ],
141
+
142
+ img_name = version .project .container_image or DOCKER_IMAGE
143
+ env_config = {
144
+ 'build' : {
145
+ 'image' : img_name ,
148
146
}
147
+ }
148
+ img_settings = DOCKER_IMAGE_SETTINGS .get (img_name , None )
149
+ if img_settings :
150
+ env_config .update (img_settings )
149
151
150
152
try :
151
153
sphinx_env_config = env_config .copy ()
Original file line number Diff line number Diff line change 33
33
)
34
34
DOCKER_VERSION = getattr (settings , 'DOCKER_VERSION' , 'auto' )
35
35
DOCKER_IMAGE = getattr (settings , 'DOCKER_IMAGE' , 'readthedocs/build:2.0' )
36
- DOCKER_BUILD_IMAGES = getattr (settings , 'DOCKER_BUILD_IMAGES' , {})
36
+ DOCKER_IMAGE_SETTINGS = getattr (settings , 'DOCKER_IMAGE_SETTINGS' , {})
37
+
37
38
DOCKER_LIMITS = {'memory' : '200m' , 'time' : 600 }
38
39
DOCKER_LIMITS .update (getattr (settings , 'DOCKER_LIMITS' , {}))
39
40
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ six==1.10.0
12
12
future==0.16.0
13
13
#readthedocs-build==2.0.8
14
14
# For testing
15
- git+https://github.com/rtfd/readthedocs-build.git@d93c81c #egg=readthedocs_build
15
+ git+https://github.com/rtfd/readthedocs-build.git@73a184a #egg=readthedocs_build
16
16
17
17
django-tastypie==0.13.0
18
18
django-haystack==2.6.0
You can’t perform that action at this time.
0 commit comments