forked from apache/openwhisk-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
73 lines (62 loc) · 3.4 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
# A Travis CI configuration file.
language: go
matrix:
include:
- os: linux
sudo: required
group: deprecated-2017Q3
go: 1.8
services: docker
env:
global:
- secure: "Br0fD9CAKm8gqyEuwmltNJd4dGJCxPpj6feugHlO+CFFwfE/+kJKkpTlsDuRfrUzUDlWiETNPf0XGSjvPFqZExnLCE9XQh2+XF6u+S3YBWfM+rbbyRVAK6BlTwmt0u3jRJ2JP7spedTGZA+qfIWI+UkwoOexo7NcqtMPLahiZzheaaad8y3J+crHQCrB/kPrhLqKVMEOkIbveFdfV2QLfCOWgqP8e1LGZhPZ2N4QcNo0iB5uI4ZyYszTZDniXFKxz7kBs4tl4ZQDqRHqL02qKPsjbvjrZp83ql+PbC2dpgXi9YpaDuBEqKKX1rTQP5ppcwbobot5U3ItHWzpXbLCdsWxvbde/0enjMmOF1wwl71hPYIf7PkQmNAWXRtL2Z1TguO/dKCeXBLDER4YDQ79GYpikAMqnrRLou4rsyZrNUzg8aHbELzAHppDSpqEJN8ymGgWgmWBT8yPaWVwN5CjPFOxLPrVEObcwcNSGOcOvtmUGCnXKSZminNZUjz5QfWqpA+LYCUIbeOI2X2D+iQWklWONaU2A+PcNLaaegwwj4K+9ZlU08Ed8Ud5ZGhjN9s72OtoFPdSHAyBgf/qxIdnTzmmE+SQ90mDtG3VqjHy28Ix7cIGqaIEC8shFb0kKHqQ7AVkLPm0bsh2fbbYu/5YVpXHfxlKWfOLBV14bHUq3v0="
- build_file_name=wsk
# WARNING: if zip_file_name includes spaces or leading hyphen(s), it will create cosmetic breakage in 'before_deploy'
- zip_file_name=OpenWhisk_CLI
git:
depth: 3
before_install:
- export DEPLOY_BUILD_READY=false
install:
- cd $TRAVIS_BUILD_DIR/..
- pip install --upgrade pip setuptools
before_script:
- cd $TRAVIS_BUILD_DIR
- GO_FILES=$(find . -iname '*.go' -type f | grep -v /vendor/)
- test -z "$(gofmt -s -l $(echo $GO_FILES))"
- cd $TRAVIS_BUILD_DIR/..
- git clone https://github.com/apache/incubator-openwhisk-utilities.git
- git clone https://github.com/apache/incubator-openwhisk.git
- ./incubator-openwhisk/tools/travis/setup.sh
script:
- cd $TRAVIS_BUILD_DIR
- ./gradlew --console=plain release
- ./tools/travis/test_openwhisk.sh
after_success:
- export DEPLOY_BUILD_READY=true
# This tag is automatically generated for the latest merged commit in master branch.
- if [ "$TRAVIS_BRANCH" == "master" ] && [ "$TRAVIS_EVENT_TYPE" == "push" ] && [ "$TRAVIS_OS_NAME" == "linux" ] ; then
git config --global user.email "[email protected]";
git config --global user.name "Travis CI";
export GIT_TAG="latest";
git tag -d $GIT_TAG;
git tag $GIT_TAG -a -m "Generated tag from Travis CI build $TRAVIS_BUILD_NUMBER";
git push -f -q https://[email protected]/apache/incubator-openwhisk-cli $GIT_TAG;
fi
before_deploy:
- export RELEASE_PKG_FILE="$(cd "$TRAVIS_BUILD_DIR/release" && ls ${zip_file_name}-*.tgz ${zip_file_name}-*.zip)"
- echo "Deploying $RELEASE_PKG_FILE to GitHub releases."
deploy:
provider: releases
api_key:
secure: Yh1aYiM/qIWkPMSVjGUq1g9TjpACjavQ00QAqp4oqghNZc6xBcmdzsfD2VjzVPHleNI1FIZyjJ1x6laRfWBzRkAcJcjUHXA2bO/V0jqePVmgVm75WwTZ/9EaWIJeAg5CQMm5DGS28Yhc60C0ut3ZzKMWGTiKb73UADXPTGd/tjndxjfksX/THXPuInKB9QZesmluBAC2am/x/6J311WA2wqe0p1+9JFwMr8XwIcwzCwgi/d9CFpS1RnVpLE/ORSgmN/dFbZ7A/qVbx377QoxKiEB0jmUwi13f7REFAw18JdgzbQCH3X4HNu9pCJwHEAq3lP2CfmHbAXcViBeji/Xh9PPJVV9TYqO+uT8oPxCPJND1A/3O2xJ8LyZ/FP2bWqG/Ds/8SZCvxfOR/X77opUeZ4qAp7HJMVCsFi3TsnmzxCe0BOxCppVJLhoSZ2rOAPJi9mKgS/Z/VA5VhNNmnPtkReEWK4vT9h3/iCwv9anvC0RKeLckSHpCm5C5otNXtV4L990fL5L5krMatxynHnCmmhYeLg/Ns+5ncax58Y8hmhnhzTqbPGHpe79bJRfvwRI9lboq7kEj4x5O/M16TKRfQ8ZU5UHvrCPdlTfT7NUXRGZkvWX20X6Ta/DRROTF+xZGiq7da3Oi+xyNDx/LmymfR49thjzgIPXVZolknGYQ9Q=
file_glob: true
file:
- release/${zip_file_name}-*.tgz
- release/${zip_file_name}-*.zip
overwrite: true
skip_cleanup: true
on:
repo: apache/incubator-openwhisk-cli
tags: true
condition: "$DEPLOY_BUILD_READY = true"