Merge branch 'develop' into custom-fields

This commit is contained in:
Jeremy Stretch 2016-08-17 12:05:13 -04:00
commit c49177e59c
3 changed files with 33 additions and 3 deletions

View File

@ -1,3 +1,11 @@
sudo: required
services:
- docker
env:
- DOCKER_TAG=$TRAVIS_TAG
language: python
python:
- "2.7"
@ -6,3 +14,7 @@ install:
- pip install pep8
script:
- ./scripts/cibuild.sh
after_success:
- if [ ! -z "$TRAVIS_TAG" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
./scripts/docker-build.sh;
fi

View File

@ -8,9 +8,6 @@
{% if request.POST.redirect_url %}
<input type="hidden" name="redirect_url" value="{{ request.POST.redirect_url }}" />
{% endif %}
{% for hidden in form.hidden_fields %}
{{ hidden }}
{% endfor %}
<div class="row">
<div class="col-md-7">
<div class="panel panel-default">

21
scripts/docker-build.sh Normal file
View File

@ -0,0 +1,21 @@
#!/bin/bash
docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
if [ $? -ne 0 ]; then
echo "docker login failed."
exit 1
fi
docker build -t "$DOCKER_REPOSITORY/$DOCKER_IMAGE_NAME:$DOCKER_TAG" .
if [ $? -ne 0 ]; then
echo "docker build failed."
exit 1
fi
docker push "$DOCKER_REPOSITORY/$DOCKER_IMAGE_NAME:$DOCKER_TAG"
if [ $? -ne 0 ]; then
echo "docker push failed."
exit 1
fi
exit 0