add Travis CI

This commit is contained in:
zimbatm 2019-02-06 11:57:48 +01:00
parent 6b517528ee
commit 36fa566355
No known key found for this signature in database
GPG key ID: 71BAF6D40C1D63D7
2 changed files with 27 additions and 0 deletions

14
.travis.sh Executable file
View file

@ -0,0 +1,14 @@
#!/usr/bin/env bash
#
# Travis CI specific build script
#
set -euo pipefail
./build
if [[ "$TRAVIS_BRANCH" = master && -z "$TRAVIS_PULL_REQUEST_BRANCH" ]]; then
./docker-login "$CI_REGISTRY" "$CI_REGISTRY_USER" "$CI_REGISTRY_PASSWORD"
./push-all "$CI_REGISTRY_PREFIX" "$IMAGE_TAG"
else
echo "=== not pushing on non-master ==="
fi

13
.travis.yml Normal file
View file

@ -0,0 +1,13 @@
language: nix
nix: 2.2.1
matrix:
include:
- name: nixos-unstable
env: NIX_PATH=nixpkgs=channel:nixos-unstable IMAGE_TAG=latest
- name: nixos-18.09
env: NIX_PATH=nixpkgs=channel:nixos-18.09 IMAGE_TAG=nixos-18.09
script:
- nix-shell --run ./.travis.sh