diff --git a/Dockerfile b/Dockerfile index a9f178e7..0994b741 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,9 +6,9 @@ ADD . /app WORKDIR /app RUN \ - apt-get install -y -qq libexpat1-dev gcc libssl-dev libffi-dev; \ - make clean; \ - pip install -r requirements.txt; \ + apt-get install -y -qq libexpat1-dev gcc libssl-dev libffi-dev && \ + make clean && \ + pip install -r pypy-requirements.txt && \ pypy setup.py develop CMD ["autopush"] diff --git a/circle.yml b/circle.yml new file mode 100644 index 00000000..2e76a40e --- /dev/null +++ b/circle.yml @@ -0,0 +1,53 @@ +# These environment variables must be set in CircleCI UI +# +# DOCKERHUB_REPO - docker hub repo, format: / +# DOCKER_EMAIL - login info for docker hub +# DOCKER_USER +# DOCKER_PASS +# +machine: + services: + - docker + +dependencies: + override: + - docker info + + # create a version.json + - > + printf '{"commit":"%s","version":"%s","source":"https://github.com/%s/%s","build":"%s"}\n' + "$CIRCLE_SHA1" + "$CIRCLE_TAG" + "$CIRCLE_PROJECT_USERNAME" + "$CIRCLE_PROJECT_REPONAME" + "$CIRCLE_BUILD_URL" + > version.json + - docker build -t app:build . + + # write the sha256 sum to an artifact to make image verification easier + - docker images --no-trunc | awk '/^app/ {print $3}' | tee $CIRCLE_ARTIFACTS/docker-image-shasum256.txt + +test: + override: + - 'true' + +# appropriately tag and push the container to dockerhub +deployment: + hub_latest: + branch: "master" + commands: + - "[ ! -z $DOCKERHUB_REPO ]" + - docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS + - "docker tag app:build ${DOCKERHUB_REPO}:latest" + - "docker push ${DOCKERHUB_REPO}:latest" + + hub_releases: + # push all tags + tag: /.*/ + commands: + - "[ ! -z $DOCKERHUB_REPO ]" + - docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS + - "echo ${DOCKERHUB_REPO}:${CIRCLE_TAG}" + - "docker tag app:build ${DOCKERHUB_REPO}:${CIRCLE_TAG}" + - "docker images" + - "docker push ${DOCKERHUB_REPO}:${CIRCLE_TAG}" diff --git a/pypy-requirements.txt b/pypy-requirements.txt new file mode 100644 index 00000000..377431c5 --- /dev/null +++ b/pypy-requirements.txt @@ -0,0 +1,59 @@ +ConfigArgParse==0.10.0 +Flask==0.10.1 +Jinja2==2.8 +MarkupSafe==0.23 +Pympler==0.4.3 +Twisted==16.1.1 +Werkzeug==0.11.9 +apns==2.0.1 +attrs==15.2.0 +autobahn[twisted]==0.14.0 +boto==2.40.0 +boto3==1.3.1 +botocore==1.4.19 +cffi==1.6.0 +characteristic==14.3.0 +contextlib2==0.5.3 +cryptography==1.3.2 +cyclone==1.1 +datadog==0.11.0 +decorator==4.0.9 +docutils==0.12 +ecdsa==0.13 +enum34==1.1.5 +funcsigs==1.0.2 +future==0.15.2 +futures==3.0.5 +gcm-client==0.1.4 +greenlet==0.4.9 +httpretty==0.8.14 +idna==2.1 +ipaddress==1.0.16 +itsdangerous==0.24 +jmespath==0.9.0 +mccabe==0.4.0 +pbr==1.9.1 +pluggy==0.3.1 +pyOpenSSL==16.0.0 +pyasn1==0.1.9 +pyasn1-modules==0.0.8 +pycparser==2.14 +pycrypto==2.6.1 +pyflakes==1.2.3 +python-dateutil==2.5.3 +python-jose==0.6.1 +raven==5.16.0 +readline==6.2.4.1 +repoze.lru==0.6 +requests==2.10.0 +service-identity==16.0.0 +simplejson==3.8.2 +six==1.10.0 +translationstring==1.3 +-e git+https://github.com/habnabit/txstatsd.git@157ef85fbdeafe23865c7c4e176237ffcb3c3f1f#egg=txStatsD-master +txaio==2.5.1 +virtualenv==15.0.1 +wsaccel==0.6.2 +xmltodict==0.10.1 +zope.deprecation==4.1.2 +zope.interface==4.1.3