forked from plus3it/tardigrade-ci
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
58 lines (52 loc) · 2.21 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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
dist: bionic
language: node_js
node_js:
- "12"
env:
global:
- IMAGE_NAME=plus3it/tardigrade-ci
stages:
- lint
- test
- deploy
services:
- docker
jobs:
include:
- stage: lint
name: EditorConfig Syntax Verification
install:
- npm install -g eclint
- eclint --version
script: make eclint/lint
- stage: lint
name: Shell Script Syntax Verification
script: make sh/lint
- stage: test
name: Run Makefile unit tests
script:
- docker build -t "$IMAGE_NAME" -f Dockerfile . && docker run "$IMAGE_NAME" bats/test
- stage: deploy
if: branch = master AND type = push AND repo = plus3it/tardigrade-ci
before_script:
- |
PRIOR_VERSION=$(git describe --abbrev=0 --tags)
RELEASE_VERSION=$(grep current_version $TRAVIS_BUILD_DIR/.bumpversion.cfg | sed 's/^.*= //' )
RELEASE_BODY="* [tardigrade-ci v$RELEASE_VERSION CHANGELOG](https://github.com/plus3it/tardigrade-ci/blob/$RELEASE_VERSION/CHANGELOG.md)"
export PRIOR_VERSION RELEASE_VERSION RELEASE_BODY
script: skip
before_deploy:
- (set -x; git tag -a $RELEASE_VERSION -m $RELEASE_VERSION)
deploy:
provider: releases
api_key:
secure: bTyWza60D4ss26ZMLgCwq4XgyVPy2pnsyoR3rKJDvyPkyVze+Xyx+c6B2Qx6WknYdEnAd4ESrruI3FwISpldv3knIBm2HdfuZlzJkqtDxKCLqieNjuP/Z1tmWiznNq0MvtfWe/nN4JPg+Bcj8d1+RVN/XiuNrRnnIFP5aKRzrB38xzFP/lKXMkd8YokZI3vfQ/hVjZASxcTPx1n823bDKIjEHAL7lpGRN0JmG3KU2Fq6rjvwQyRJGCQ0xDsNO+9/frDmwKbVT0oYCUpxm13z0f4MQNembots/IyvT53g+0G8o9IQ2S69cOHmaQAZSylLuH/4sHuGBkXxhM8/YHbS4bdSTny3jHq6BmWAtYeo2YS/0sdLY6gBGJ5+D1/7e69QqnuIOsFviWjvURWVpcUAWzdsE4ZBTEtfF6IcLbULng4CVcexZsmuUDpuDWAFhvZZBkPKUXm79/YL3gpKPaziW7TGIku2ZMfq/dXPTBWOdnrQwl3LZOE6X15nbbKH/gvPh33fCVENp1n2hCYIpW78rZo0C2QjDyqutggDV+kC4k0GYcXQWP9U7K4bOTkHLh4j4R2vBpfDvMvqGClciTfsgLReAaC3bWBs8Zy5hefrIKQcZw1DLcHtKv3QjTzcnhHgllDeH+yubSP2eXgNA8/WW0zOf518KXHAAO2KW9WYdX4=
name: $RELEASE_VERSION
body: $RELEASE_BODY
tag_name: $RELEASE_VERSION
target_commitish: $TRAVIS_COMMIT
draft: false
on:
branch: master
repo: plus3it/tardigrade-ci
condition: '"$PRIOR_VERSION" != "$RELEASE_VERSION"'