Skip to content

Commit

Permalink
Add support for 3.6 pipelines
Browse files Browse the repository at this point in the history
This allows pipelines to be made for projects using python 3.6. This
can be done because CodeBuild recently added a 3.6.5 container.
  • Loading branch information
JordonPhillips committed Jun 1, 2018
1 parent 7d32229 commit b06a4f8
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
CHANGELOG
=========

Next Release (TBD)
==================

* Add support for generating python 3.6 pipelines
(`#858 <https://github.com/aws/chalice/pull/858>`)


1.3.0
=====

Expand Down
1 change: 1 addition & 0 deletions chalice/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ class CreatePipelineTemplate(object):

_CODEBUILD_IMAGE = {
'python2.7': 'python:2.7.12',
'python3.6': 'python:3.6.5',
}

_BASE_TEMPLATE = {
Expand Down
9 changes: 7 additions & 2 deletions tests/unit/test_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,16 @@ def test_python_version_in_param_default(self):
assert template['Parameters']['CodeBuildImage']['Default'] == \
'aws/codebuild/python:2.7.12'

def test_py3_throws_error(self):
def test_python_36_in_param_default(self):
template = self.generate_template(lambda_python_version='python3.6')
assert template['Parameters']['CodeBuildImage']['Default'] == \
'aws/codebuild/python:3.6.5'

def test_invalid_python_throws_error(self):
# This test can be removed when there is a 3.6 codebuild image
# available.
with pytest.raises(InvalidCodeBuildPythonVersion):
self.generate_template('app', 'python3.6')
self.generate_template('app', 'python2.6')

def test_nonsense_py_version_throws_error(self):
with pytest.raises(InvalidCodeBuildPythonVersion):
Expand Down

0 comments on commit b06a4f8

Please sign in to comment.