1
0
mirror of https://github.com/bplein/factorio-docker.git synced 2024-11-24 08:42:31 +02:00
factorio-docker-bplein/.travis.yml
Sandro Jäckel b2a4195e13
Advance CI features (#245)
* Build feature branches with branch tag

* Build short and long image tag

* Add latest and stable tag, made moving repos easier

* Only push tags to registry

* Only build tags that where changed

* Fix if and quoting, push $VERSION_SHORT

* Update MicroBadger with Webhook, closes #251

* Quote vars

* Set tag on PR, too

* Switch to hadolint docker image

due to PR not having enviroment variables and I don't want to commit my token in the script

* Only push image on master
2019-05-16 19:23:07 +02:00

28 lines
681 B
YAML

dist: xenial
sudo: required
language: bash
services:
- docker
addons:
apt:
packages:
- jq
jobs:
include:
- stage: test
script:
- git ls-files --exclude='*Dockerfile' --ignored | xargs --max-lines=1 -I{} sh -c 'docker run --rm -i -v ${PWD}/.hadolint.yaml:/.hadolint.yaml hadolint/hadolint < "$1"' -- {}
- bash -c 'shopt -s globstar; shellcheck **/*.sh'
- &build
stage: build
env: VERSION_SHORT=0.17 EXTRA_TAG=latest
script:
- ./build.sh $VERSION_SHORT
- <<: *build
env: VERSION_SHORT=0.16 EXTRA_TAG=stable
- <<: *build
env: VERSION_SHORT=0.15
- <<: *build
env: VERSION_SHORT=0.14