forked from kabanero-io/kabanero-command-line
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
87 lines (79 loc) · 2.13 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
language: go
go:
- 1.12.x
go_import_path: github.com/kabanero-io/kabanero-command-line
services:
- docker
# skip the default language's install and script steps, we implement job stages instead
install: skip
script: skip
stages:
- name: lint
- name: test
- name: deploy
if: tag IS present
install-controller: &install-controller
install:
- if [ "$TRAVIS_OS_NAME" = "windows" ]; then choco install make; fi
# - make install-controller
# manually set the list of stacks to test
# the stacks repo will generate their own list of stacks that have changed and should be tested
- export STACKSLIST=incubator/nodejs
test-template: &test-template
stage: test
<<: *install-controller
script: make test
jobs:
include:
- name: Lint
stage: lint
os: linux
script: make lint
- <<: *test-template
name: Full Test on Linux
os: linux
- <<: *test-template
name: Unit Test on MacOS
os: osx
env:
- CGO_ENABLED=1
# script: make unittest
- <<: *test-template
name: Unit Test on Windows
os: windows
# script: make unittest
- name: Deploy Release osx
stage: deploy
os: osx
env:
- CGO_ENABLED=1
script:
- make VERSION=${TRAVIS_TAG} package-osx
- make deploy
before_deploy:
- mv package/kabanero-${TRAVIS_TAG}-darwin-amd64.tar "package/kabanero-${TRAVIS_TAG}-macos-amd64.tar"
- mv package/kabanero-${TRAVIS_TAG}-darwin-amd64.tar.gz "package/kabanero-${TRAVIS_TAG}-homebrew-amd64.tar.gz"
deploy:
provider: releases
skip_cleanup: true
api_key: "$GITHUB_OAUTH_TOKEN"
file: package/*
file_glob: true
on:
branch: master
tags: true
- name: Deploy Release win/linux
stage: deploy
os: linux
script:
- make VERSION=${TRAVIS_TAG} package
- make deploy
deploy:
provider: releases
skip_cleanup: true
api_key: "$GITHUB_OAUTH_TOKEN"
file: package/*
file_glob: true
on:
branch: master
tags: true