forked from jippi/hashi-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
executable file
·50 lines (42 loc) · 3.5 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
sudo: required
language: go
go:
- 1.7
services:
- docker
cache:
yarn: true
directories:
- backend/vendor/github.com
- backend/vendor/go4.org
- backend/vendor/golang.org
- backend/vendor/gopkg.in
env:
global:
- GOBUILD="linux-amd64 windows-amd64 darwin-amd64"
# DOCKER_USER
- secure: "XB/5pW++k4w4tx7rIYuuNW89Q784QYczG++lpQk1X/OGKCtJBfV2Ul7yU04KgRmxJDmAF/LCcpigxqrHcpUKo2o7p9jYNxQVMNpCbKA4ZMvuNumJa/2Li6c4kf4LJD4Yhg5LLYw9HmsOgLjCQ/dDOVhGgprkmzDWBBfJVDBte+SfqnDS5TM87d7gN40LRHBIIhiiJZlhrnjnKEgAnvNwxaZ1Oa1ncItt8WzCn8FjKzzUhTKFvEQhIX4he0USGypWUOy2Wgaqupkzwns14Z8fZ5C8o4qmgx6ZuEl6E6WmkF/rDT2FruMcE3K7eVLFYgl+aqi48L7o8bOXTFAkv+UjlcJGu8DvsBDTnr6bZ4e+dbzY3KxCZT3VyjteRfTMyv9Op7oVgt+oxR6vWgliofZk7T1rDCO1NUJpn1kooKQlZsE5SfQuHFiNxRlLuaRV5ZdANH9vonqdEyZC3OUWO3LqQYRhXakqe2uP+bjt85t/SIQZMGX1MLnU0T1HzPF3TaMMtr4SKt9gJPdyIxlXk8nagTdk6fRxRr6SHPKI9XiHS00hMFhQTiwpbRohJ7XnOwCGxs5aYsNYAml303vceuBvSUFAUn0F+Pm0REWwVNK+9MoGA3tlWgyW3DUkd3ZymhXjhmbR04wYQnIzcWdSTvpNmx3laDknyfOu4HVmzBBjQow="
# DOCKER_EMAIL
- secure: "Gy8e7tCRReU2J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rbXoFUCTczGJNTUO++4LFVJ0LWz6EO8z7wP6+wDGoDa0xpvCn7OXR6ss4jyc7mLJ7H87SSYxZhN5ZjbukVbhizM3ts81/0qODwVY/D1DxhWjm8MzC3JRxgfkBZfZzDGHHIrLg2qjD2rTrkNijcUAVlg77KEaGeYugXEd34VKlLrMDyjXGoBqXkGoL86h7BJB5pay2MHrpfJk3QSLSouThtnn9zXYE1Mk7rUpZMNL5j2niGZqPoGGxWoPXjzXWGQ4UOrhblErOuAzf51AsLt3eu0qIRFfWyLdUoHvT7IeEAs="
script:
- GOBUILD=${GOBUILD} make -j build
- ls -la backend/build
after_success:
- export PR=https://api.github.com/repos/$TRAVIS_REPO_SLUG/pulls/$TRAVIS_PULL_REQUEST
- export BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo `curl -s $PR | jq -r .head.ref`; fi)
- if [[ "$TRAVIS_PULL_REQUEST" != "false" ]]; then make -j docker DOCKER_USER=$DOCKER_USER DOCKER_PASS=$DOCKER_PASS DOCKER_EMAIL=$DOCKER_EMAIL TAG=pr-$TRAVIS_PULL_REQUEST COMMIT=$TRAVIS_COMMIT; fi
- if [[ "$TRAVIS_TAG" =~ ^v.*$ ]]; then make -j docker DOCKER_USER=$DOCKER_USER DOCKER_PASS=$DOCKER_PASS DOCKER_EMAIL=$DOCKER_EMAIL TAG=$TRAVIS_TAG COMMIT=$TRAVIS_COMMIT; fi
- if [[ "$BRANCH" == "master" ]]; then make -j docker DOCKER_USER=$DOCKER_USER DOCKER_PASS=$DOCKER_PASS DOCKER_EMAIL=$DOCKER_EMAIL TAG=latest COMMIT=$TRAVIS_COMMIT; fi
deploy:
- provider: releases
api_key: ${GITHUB_API_KEY}
file:
- backend/build/hashi-ui-linux-amd64
- backend/build/hashi-ui-windows-amd64
- backend/build/hashi-ui-darwin-amd64
skip_cleanup: true
overwrite: true
on:
tags: true