forked from cubiq/KiiConf
-
Notifications
You must be signed in to change notification settings - Fork 30
/
.travis.yml
27 lines (24 loc) · 1.06 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# travis-ci integration for kiibohd/KiiConf
sudo:
- false
jobs:
include:
- stage: Build Docker Image
# Generate Docker Image and deploy to Docker Hub
# Make sure to tag the image with a git hash or we may get conflicting builds
script:
- docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD"
- docker build -t kiiconf-travis-ci .
- docker images
- docker tag kiiconf-travis-ci $DOCKER_USERNAME/kiiconf-travis-ci:travis-$TRAVIS_BUILD_NUMBER
- docker tag kiiconf-travis-ci $DOCKER_USERNAME/kiiconf-travis-ci:${TRAVIS_COMMIT::8}
- docker push $DOCKER_USERNAME/kiiconf-travis-ci
- stage: Tests
script:
# Build all KiiConf targets using generic kll configs
- docker run -t -u 33:33 --rm $DOCKER_USERNAME/kiiconf-travis-ci:${TRAVIS_COMMIT::8} tests/build_test.bash
- script:
# Setup basic webserver and do basic query
- docker run -d -p 127.0.0.1:80:80 --rm --name kiiconf-travis-ci-webtest $DOCKER_USERNAME/kiiconf-travis-ci:${TRAVIS_COMMIT::8}
- wget -O /dev/null 127.0.0.1
- docker stop kiiconf-travis-ci-webtest