From 3250c784be0d897a499974d5d22fc77df66ef1b3 Mon Sep 17 00:00:00 2001 From: Sijis Aviles Date: Thu, 19 Oct 2017 00:43:45 -0500 Subject: [PATCH 1/4] test: Use docker container as system --- tests/resources/simple-test.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/resources/simple-test.json b/tests/resources/simple-test.json index 58e8623..c764515 100644 --- a/tests/resources/simple-test.json +++ b/tests/resources/simple-test.json @@ -1,10 +1,10 @@ { "builders": [ { - "type": "null", - "ssh_host": "127.0.0.1", - "ssh_username": "root", - "ssh_password": "password" + "type": "docker", + "image": "alpine", + "discard": true, + "run_command": ["-d", "-i", "-t", "{{.Image}}", "/bin/sh"] } ] } From 7cfd9dcfeeb1639dc699bb9f25cdf20bc4135b2d Mon Sep 17 00:00:00 2001 From: Sijis Aviles Date: Thu, 19 Oct 2017 00:44:33 -0500 Subject: [PATCH 2/4] test: Validate against python 3.6 --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 307795b..6552cea 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ # content of: tox.ini , put in same dir as setup.py [tox] -envlist=flake8,py27,py26,py35 +envlist=flake8,py27,py26,py35,py36 [testenv] deps = From 31ca0b466a342810ec6059de2acc0c1996d9bc75 Mon Sep 17 00:00:00 2001 From: Sijis Aviles Date: Thu, 19 Oct 2017 00:52:48 -0500 Subject: [PATCH 3/4] test: Remove complex packer config --- tests/resources/packerfile.json | 83 --------------------------------- 1 file changed, 83 deletions(-) delete mode 100644 tests/resources/packerfile.json diff --git a/tests/resources/packerfile.json b/tests/resources/packerfile.json deleted file mode 100644 index 36e6493..0000000 --- a/tests/resources/packerfile.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "variables": { - "variable2": "", - "variable1": "", - "aws_access_key": "{{env `AWS_ACCESS_KEY_ID`}}", - "aws_secret_key": "{{env `AWS_ACCESS_KEY`}}", - "aws_source_ami": "", - "instance_type": "m3.large", - "virtualbox_source_image": "", - "insecure_private_key": "./keys/insecure_private_key" - }, - "builders": [ - { - "name": "virtualbox", - "type": "virtualbox-ovf", - "source_path": "{{user `virtualbox_source_image`}}", - "vm_name": "cloudify", - "ssh_username": "vagrant", - "ssh_key_path": "{{user `insecure_private_key`}}", - "ssh_wait_timeout": "2m", - "shutdown_command": "sudo -S shutdown -P now", - "vboxmanage": [ - ["modifyvm", "{{.Name}}", "--memory", "2048"], - ["modifyvm", "{{.Name}}", "--cpus", "2"], - ["modifyvm", "{{.Name}}", "--natdnshostresolver1", "on"] - ], - "headless": true - }, - { - "name": "nightly_virtualbox_build", - "type": "amazon-ebs", - "access_key": "{{user `aws_access_key`}}", - "secret_key": "{{user `aws_secret_key`}}", - "ssh_private_key_file": "{{user `insecure_private_key`}}", - "region": "eu-west-1", - "source_ami": "{{user `aws_source_ami`}}", - "instance_type": "{{user `instance_type`}}", - "ssh_username": "vagrant", - "user_data_file": "userdata/add_vagrant_user.sh", - "ami_name": "cloudify nightly {{timestamp}}" - }, - { - "name": "amazon", - "type": "amazon-ebs", - "access_key": "{{user `aws_access_key`}}", - "secret_key": "{{user `aws_secret_key`}}", - "region": "eu-west-1", - "source_ami": "{{user `aws_source_ami`}}", - "instance_type": "{{user `instance_type`}}", - "ssh_username": "ubuntu", - "ami_name": "cloudify {{timestamp}}" - } - ], - "provisioners": [ - { - "type": "shell", - "script": "provision/common.sh" - }, - { - "type": "shell", - "script": "provision/prepare_nightly.sh", - "only": ["nightly_virtualbox_build"] - }, - { - "type": "shell", - "script": "provision/cleanup.sh", - "only": ["nightly_virtualbox_build"] - } - ], - "post-processors": [ - { - "type": "vagrant", - "only": ["virtualbox"], - "output": "cloudify_{{.Provider}}.box" - } - ], - "post-processors": [ - { - "type": "compress", - "format": "tar.gz" - } - ] -} \ No newline at end of file From a5194c9318c576859c884e71318523780b31c647 Mon Sep 17 00:00:00 2001 From: Sijis Aviles Date: Thu, 19 Oct 2017 11:18:29 -0500 Subject: [PATCH 4/4] chore: Update travis to support docker --- .travis.yml | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9b16a78..087b55f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,13 +1,21 @@ -sudo: false +sudo: required +services: + - docker language: python -python: - - "2.7" -env: - - TOX_ENV=flake8 - - TOX_ENV=py27 - - TOX_ENV=py26 +matrix: + include: + - python: 2.6 + env: TOXENV=py26 + - python: 2.7 + env: TOXENV=py27 + - python: 3.5 + env: TOXENV=py35 + - python: 3.6 + env: TOXENV=py36 + - python: 3.6 + env: TOXENV=flake8 + install: - pip install tox script: - - tox -e $TOX_ENV - + - tox -e $TOXENV