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
| Vagrant.configure("2") do |config| | |
| config.vm.synced_folder ".", "/home/vagrant/my-project", :nfs => true | |
| config.vm.provision "shell", inline: "gem install librarian-puppet" | |
| config.vm.provision "shell", inline: "cp /home/vagrant/my-project/Puppetfile /tmp" | |
| config.vm.provision "shell", inline: "cd /tmp && librarian-puppet install --verbose" | |
| config.vm.provision "puppet" do |puppet| | |
| puppet.temp_dir = "/tmp" | |
| puppet.options = ['--modulepath=/tmp/modules'] |
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
| #!/bin/bash | |
| docker run --name ${JOB_NAME} -v ${WORKSPACE}:/project zapier/project-tests | |
| # copy build artifacts out of the container | |
| docker cp ${JOB_NAME}:/project/nosetests.xml . | |
| docker cp ${JOB_NAME}:/project/coverage.xml . | |
| docker cp ${JOB_NAME}:/project/cover . | |
| # remove the container |
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
| FROM ubuntu:precise | |
| #install syslibs needed | |
| RUN apt-get update -y | |
| RUN DEBIAN_FRONTEND=noninteractive apt-get install libssl-dev swig python-dev curl git -y | |
| # install pip | |
| RUN curl --silent --show-error --retry 5 https://raw.github.com/pypa/pip/master/contrib/get-pip.py | python2.7 | |
| # mount the current project workspace under /project inside the container |
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
| root@aa14efe878b6:/zapier# ./manage.py test api | |
| nosetests api --with-xunit --verbosity=1 | |
| Creating test database for alias 'default'... | |
| E | |
| ====================================================================== | |
| ERROR: Failure: ImportError (No module named zapier) | |
| ---------------------------------------------------------------------- | |
| Traceback (most recent call last): | |
| File "/usr/local/lib/python2.7/dist-packages/nose/loader.py", line 411, in loadTestsFromName | |
| addr.filename, addr.module) |
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
| Downloading/unpacking pyodbc==3.0.6 (from -r requirements/base.txt (line 17)) | |
| Could not find any downloads that satisfy the requirement pyodbc==3.0.6 (from -r requirements/base.txt (line 17)) | |
| Some externally hosted files were ignored (use --allow-external pyodbc to allow). |
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
| def retrieve_ubuntu_amis(region=u'us-east-1', dist=u'raring', arch=u'amd64', store=u'ebs'): | |
| import requests | |
| import json | |
| from lxml import etree | |
| from time import time | |
| from StringIO import StringIO | |
| now = int(time()) | |
| url = 'http://cloud-images.ubuntu.com/locator/ec2/releasesTable?_={}'.format(now) | |
| response = requests.get(url) |
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
| Adding group `fuse' (GID 105) ... | |
| Done. | |
| Creating fuse device... | |
| makedev fuse c 10 229 root root 0660: failed | |
| dpkg: error processing fuse (--configure): | |
| subprocess installed post-installation script returned error exit status 1 | |
| Processing triggers for libc-bin ... | |
| ldconfig deferred processing now taking place |
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
| JsonParserFactory factory = JsonParserFactory.getInstance(); | |
| JSONParser parser = factory.newJsonParser(); | |
| Map jsonMap = parser.parseJson(jsonString); |
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
| JsonParserFactory factory = JsonParserFactory.getInstance(); | |
| JSONParser parser = factory.newJsonParser(); | |
| Map jsonMap = parser.parseJson(jsonString); |
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
| zmq = require 'zmq' | |
| address = 'inproc://foobar' | |
| class Cycle | |
| constructor: (@items) -> | |
| next: -> | |
| @items.push(item = @items.shift()) | |
| return item |