mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Merge branch 'develop' of github.com:digitalocean/netbox into develop
This commit is contained in:
12
.travis.yml
12
.travis.yml
@ -1,3 +1,11 @@
|
|||||||
|
sudo: required
|
||||||
|
|
||||||
|
services:
|
||||||
|
- docker
|
||||||
|
|
||||||
|
env:
|
||||||
|
- DOCKER_TAG=$TRAVIS_TAG
|
||||||
|
|
||||||
language: python
|
language: python
|
||||||
python:
|
python:
|
||||||
- "2.7"
|
- "2.7"
|
||||||
@ -6,3 +14,7 @@ install:
|
|||||||
- pip install pep8
|
- pip install pep8
|
||||||
script:
|
script:
|
||||||
- ./scripts/cibuild.sh
|
- ./scripts/cibuild.sh
|
||||||
|
after_success:
|
||||||
|
- if [ ! -z "$TRAVIS_TAG" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
|
||||||
|
./scripts/docker-build.sh;
|
||||||
|
fi
|
||||||
|
21
scripts/docker-build.sh
Normal file
21
scripts/docker-build.sh
Normal 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
|
Reference in New Issue
Block a user