-
Notifications
You must be signed in to change notification settings - Fork 43
/
.travis.yml
80 lines (79 loc) · 3.32 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: node_js
node_js:
- 'stable'
sudo: required
dist: trusty
addons:
apt:
packages:
- google-chrome-stable
before_script:
- 'export DISPLAY=:99.0'
- 'sh -e /etc/init.d/xvfb start'
- 'node_modules/.bin/webdriver-manager update'
after_success:
# Install dependencies for releasing
- '[ -n "$TRAVIS_TAG" ] && sudo apt-get update -qq'
- '[ -n "$TRAVIS_TAG" ] && sudo apt-get install -y devscripts debhelper rpm gnupg s3cmd createrepo'
- '[ -n "$TRAVIS_TAG" ] && gem install deb-s3'
# RPM and DEB packaging
- '[ -n "$TRAVIS_TAG" ] && grunt debian_package'
- '[ -n "$TRAVIS_TAG" ] && grunt rpm:release'
# Package up tar.gz release
- '[ -n "$TRAVIS_TAG" ] && cp -r dist puppetexplorer-$TRAVIS_TAG'
- '[ -n "$TRAVIS_TAG" ] && tar czf puppetexplorer-$TRAVIS_TAG.tar.gz puppetexplorer-$TRAVIS_TAG'
# Add GPG key
- '[ -n "$TRAVIS_TAG" ] && openssl aes-256-cbc -K $encrypted_c566a7b9b8eb_key -iv $encrypted_c566a7b9b8eb_iv -in .gpg.key.enc -out .gpg.key -d'
- '[ -n "$TRAVIS_TAG" ] && gpg --allow-secret-key-import --import .gpg.key'
# Release Debian package
- '[ -n "$TRAVIS_TAG" ] && deb-s3 upload --preserve-versions --bucket puppetexplorerapt --secret-access-key=$S3_SECRET_KEY --access-key-id $S3_ACCESS_KEY --sign=3FF5E93D tmp/puppetexplorer*.deb'
# Release RPM package
- '[ -n "$TRAVIS_TAG" ] && mkdir yumrepo'
- '[ -n "$TRAVIS_TAG" ] && echo "[default]" > .s3cfg'
- '[ -n "$TRAVIS_TAG" ] && echo "access_key = ${S3_ACCESS_KEY}" >> .s3cfg'
- '[ -n "$TRAVIS_TAG" ] && echo "secret_key = ${S3_SECRET_KEY}" >> .s3cfg'
- '[ -n "$TRAVIS_TAG" ] && s3cmd get -r s3://puppetexploreryum yumrepo'
- '[ -n "$TRAVIS_TAG" ] && rpm --addsign rpm/RPMS/noarch/puppetexplorer*.rpm'
- '[ -n "$TRAVIS_TAG" ] && cp rpm/RPMS/noarch/puppetexplorer*.rpm yumrepo'
- '[ -n "$TRAVIS_TAG" ] && createrepo --update yumrepo'
- '[ -n "$TRAVIS_TAG" ] && rm yumrepo/repodata/repomd.xml.asc'
- '[ -n "$TRAVIS_TAG" ] && gpg --detach-sign --armor yumrepo/repodata/repomd.xml'
deploy:
- provider: s3
access_key_id: AKIAJEZEAAG2CU6PZHTQ
secret_access_key:
secure: Nd9tsVNDsUMEDveeKMCZHj4nEv2zM4Y0Y+gTF47JQ2bRWKS9fSWrSfISvm72VKhMrBrpDFyL/sVzLe7nrDyxqJSdKdGm1o6bPPcKDnREwUpVipbMVTpo4wLTJ1RnfuVsvQR9N1xeGVEWFM+wVSerbDVIcr3LGmWxQCfZCLus6rM=
bucket: puppetexplorer
skip_cleanup: true
local-dir: dist
acl: public_read
on:
tags: true
all_branches: true
repo: spotify/puppetexplorer
- provider: s3
access_key_id: AKIAJEZEAAG2CU6PZHTQ
secret_access_key:
secure: Nd9tsVNDsUMEDveeKMCZHj4nEv2zM4Y0Y+gTF47JQ2bRWKS9fSWrSfISvm72VKhMrBrpDFyL/sVzLe7nrDyxqJSdKdGm1o6bPPcKDnREwUpVipbMVTpo4wLTJ1RnfuVsvQR9N1xeGVEWFM+wVSerbDVIcr3LGmWxQCfZCLus6rM=
bucket: puppetexploreryum
skip_cleanup: true
local-dir: yumrepo
acl: public_read
on:
tags: true
all_branches: true
repo: spotify/puppetexplorer
- provider: releases
edge: true
api_key:
secure: fIuXoPBhqJem2JIjw4aLm/kU81zhwquRoHGw0QHI5j+VSPQtxxj9u+AO+csFu+M92gLZRT2fz8TIjYm+1K1UZrIaSkEpGiOVqVo1mEbAhq2wAIbmXo8OyOjDOkpAaQ+FOV1VjuyBI+7+85izQ3HnMvgqONiwS9Xd2pM+HYLfRG4=
file:
- tmp/puppetexplorer*.deb
- rpm/RPMS/noarch/puppetexplorer*.rpm
- puppetexplorer-*.tar.gz
file_glob: true
skip_cleanup: true
on:
tags: true
all_branches: true
repo: spotify/puppetexplorer