-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Add docker image from the YAML config integration #3339
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
442c68a
Add docker image from the YAML config integration
ericholscher 961c18e
Fix tests
ericholscher aa15e78
Bump build dep for tests
ericholscher a705f9d
Address review feedback and remove most of my deleted code :)
ericholscher eb7c4b2
A bit more clenaup
ericholscher 8d1a58d
Clean up setting names
ericholscher c27686e
Support backwards compat
ericholscher 67d5595
Fix tests
ericholscher 5708f10
Bump test commit
ericholscher edfca36
Support passing full setting through
ericholscher d0ee0f7
Merge remote-tracking branch 'origin/master' into add-docker-image-op…
ericholscher da7ec2b
Fix lint
ericholscher File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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 |
---|---|---|
|
@@ -4,11 +4,14 @@ | |
from __future__ import ( | ||
absolute_import, division, print_function, unicode_literals) | ||
|
||
import logging | ||
import os | ||
import re | ||
|
||
from django.conf import settings | ||
|
||
log = logging.getLogger(__name__) | ||
|
||
SPHINX_TEMPLATE_DIR = os.path.join( | ||
settings.SITE_ROOT, | ||
'readthedocs', | ||
|
@@ -33,24 +36,17 @@ | |
) | ||
DOCKER_VERSION = getattr(settings, 'DOCKER_VERSION', 'auto') | ||
DOCKER_IMAGE = getattr(settings, 'DOCKER_IMAGE', 'readthedocs/build:2.0') | ||
DOCKER_IMAGE_SETTINGS = getattr(settings, 'DOCKER_IMAGE_SETTINGS', {}) | ||
|
||
old_config = getattr(settings, 'DOCKER_BUILD_IMAGES', None) | ||
if old_config: | ||
log.warning('Old config detected, DOCKER_BUILD_IMAGES->DOCKER_IMAGE_SETTINGS') | ||
DOCKER_IMAGE_SETTINGS.update(old_config) | ||
|
||
DOCKER_LIMITS = {'memory': '200m', 'time': 600} | ||
DOCKER_LIMITS.update(getattr(settings, 'DOCKER_LIMITS', {})) | ||
|
||
DOCKER_TIMEOUT_EXIT_CODE = 42 | ||
DOCKER_OOM_EXIT_CODE = 137 | ||
|
||
DOCKER_HOSTNAME_MAX_LEN = 64 | ||
|
||
# Build images | ||
DOCKER_BUILD_IMAGES = { | ||
'readthedocs/build:1.0': { | ||
'python': {'supported_versions': [2, 2.7, 3, 3.4]}, | ||
}, | ||
'readthedocs/build:2.0': { | ||
'python': {'supported_versions': [2, 2.7, 3, 3.5]}, | ||
}, | ||
'readthedocs/build:latest': { | ||
'python': {'supported_versions': [2, 2.7, 3, 3.3, 3.4, 3.5, 3.6]}, | ||
}, | ||
} | ||
DOCKER_BUILD_IMAGES.update(getattr(settings, 'DOCKER_BUILD_IMAGES', {})) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think keeping full build image names here on |
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This warning could be a good use of a django system check warning as well.