forked from xmidt-org/themis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
80 lines (70 loc) · 2.58 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
language: go
go:
- 1.14.x
- tip
os:
- linux
services:
- docker
branches:
only:
- main
- /^v[0-9]+\.[0-9]+\.[0-9]+$/
addons:
sonarcloud:
organization: "xmidt-org"
token:
secure: "ntDM9wWDwMDnPpm14b0MxqCrI88QHB+b4NhCzK5AXaO/mKRixD0ukQ/TUyqTn5dYA9U5knD4k3/YrlBHg31ywb8x+Wfg1nMMhj8tvHS3c7gvO7C148cVkudOnmWMGMQDmbXoWIhmWo4k2vKe+dQbTg+sDmDmufyM1Z+jko4Qpjbifws2mqTkmeqmteTHnht7aZorVVanSr3JC7mE9dhFChYTeV++hXvHhgIge1euodDpmOKfbpfnOQtM4z2g6PT2IPAQY1kskFqUc/CJ6CIG0YDfEbBMeL8Tf8dPL4IvVMtm9+G2REpi0sOwk1H0zRkUC3ONDUmFEJ2uRykQwNZzD2aCvay2yRht9OS+GQXHg98f9caCTi1jHieBadnHw99Ylj5bnP68wbEKME6k4NRfBvUJrbKsYMx8lS50YEs6zwgspRv8jRPohlKtKDu2k98r+1EwDtP+U6HG0tRiGev+hYPUR0mlYM93igygHT3xfnMqgW8dIpxT3NzPmffolDuZtw82SEr4HCJGsW4bOZW1A53mybdF9HPI64XlK8qN7xVdDF1SMuz+RrOPOvsmApQeBHkV5mMzLRkxC0EhfeOl5QDYi3fD0nfNCqclhOYk9R05k2trIL2htyhsqqi17OZmzN28o2WGlDXzPT7aHwg21I6egypIoSgOi8jEEf6XpcI="
script:
- make style codecov
after_success:
- sonar-scanner -Dproject.settings=./.sonar-project.properties
jobs:
fast_finish: true
allow_failures:
- go: tip
include:
# - stage: integration
# name: "Integration Tests"
# if: branch = main
# script:
# - make it
- stage: tag
name: "Tag For Release"
if: branch = main && type = push
before_script:
- echo -e "machine github.com\n login $GH_TOKEN" > ~/.netrc
script:
- export OLD_VERSION=$(make version)
- git config --global user.name "xmidt-bot"
- git config --global user.email "$BOT_EMAIL"
- export TAG=$(cat CHANGELOG.md | perl -0777 -ne 'print "$1" if /.*## \[Unreleased\]\s+## \[(v\d+.\d+.\d+)\].*/s')
- export TODAY=`date +'%m/%d/%Y'`
- export NOTES=$(cat CHANGELOG.md | perl -0777 -ne 'print "$ENV{TODAY}\n\n$1\n" if /.*## \[$ENV{TAG}\]\s(.*?)\s+## \[(v\d+.\d+.\d+)\].*/s')
- if [[ "$TAG" != "" && "$TAG" != "$OLD_VERSION" ]]; then git tag -a "$TAG" -m "$NOTES"; git push origin --tags; echo $?; fi
after_success: skip
- stage: release
name: "Make a Release"
if: branch != main
script: skip
before_deploy:
- make release-artifacts
deploy:
on:
all_branches: true
tags: true
provider: releases
api_key: "$GH_TOKEN"
file_glob: true
file: ./.ignore/*
skip_cleanup: true
- stage: docker-release
name: "Make Docker Release"
if: branch != main
script: skip
deploy:
- provider: script
script: bash deploy/docker_push
on:
all_branches: true
tags: true