forked from acceptbitcoincash/acceptbitcoincash
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
85 lines (82 loc) · 3.09 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
dist: trusty
rvm: 2.4.1
cache:
bundler: true
directories:
- vendor/bundle
- $TRAVIS_BUILD_DIR/tmp/.htmlproofer
addons:
apt:
packages:
- libcurl4-openssl-dev
- ca-certificates
stages:
- name: Test
if: sender != svenfuchs AND sender != imgbot[bot]
- name: imgbot
if: sender IN (svenfuchs, imgbot[bot])
- name: Run build
if: type IN (push, cron) AND (branch = master OR tag IS present)
jobs:
include:
- &test-baseline
stage: Test
script:
bundle exec rake
- <<: *test-baseline
script:
bundle exec rake proof_external
if: type IN (pull_request, cron) OR (type = push AND branch = master)
- stage: imgbot
script:
bundle exec rake verify
- stage: Run build
sudo: true
env:
NEXT_BUILD_TAG=latest
script:
- if [ "$TRAVIS_TAG" != "" ]; then
NEXT_BUILD_TAG=`date +"%m-%d-%Y"`;
fi
- if [ "$TRAVIS_EVENT_TYPE" == "cron" ]; then
NEXT_BUILD_TAG=`date +"%m-%d-%Y"`;
fi
- echo ".git" > .dockerignore
- echo $NEXT_BUILD_TAG
- bundle exec rake docker:build
- docker tag acceptbitcoincash/acceptbitcoincash acceptbitcoincash/acceptbitcoincash:"$NEXT_BUILD_TAG"
- cp ./_site/js/main.js ./js/main.js
deploy:
- provider: script
skip-cleanup: true
script:
# - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin; docker push acceptbitcoincash/acceptbitcoincash
docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD"; docker push acceptbitcoincash/acceptbitcoincash
on:
all_branches: true # <== new!
condition: $NEXT_BUILD_TAG != "latest"
- provider: pages
skip-cleanup: true
github-token: $GITHUB_TOKEN # Set in travis-ci.org dashboard, marked secure
fqdn: beta.acceptbitco.in
keep-history: true
repo: acceptbitcoincash/acceptbitcoincash
target_branch: gh-pages
on:
all_branches: true # <== new!
allow_failures:
- stage: Test
script:
bundle exec rake proof_external
if: type IN (pull_request, cron) OR (type = push AND branch = master)
notifications:
webhooks:
urls: https://www.travisbuddy.com/
on_failure: always
on_success: never
slack:
rooms:
- secure: "vIMiDIutWLX4xPWK4+HRh39MdAaNLl+UcK7UjNlehHIuopZPbnH+TmqFg5726ZDhkQ6QN/lHYVuHTvW9Kp+f7uiuRX2QLJH4vZZrcvsXeRccWbVx7MlMW9hbOnvB73nUmezaHploSpMINKWRD51PhLlONbztLCzYmOoBfLRDvrmEY7kzoiMFCCZwPIzIiyB1LrEhSQD3YELgZ+ZDipFUeVA2yrBKZSZZoM7ubcpqNZHhx+3uAJrpQ66k36eprrXM7IC8Qy8u2AcV1hNnczNM+jUts/PKyCjH4vIjh4JEVNN/gBLY30oDOR6d95szme/4BWEPCcP2Sz3MQTtkN5tXaAmRRKqwYUv+lB0lTB5EB28SD9Sa3Q6HJhIQ5BVuO0Lmdwe8CVBTy7lmwcyuUqW5y0MHQF6HAZj2lSN8pktInFD40o+FQgC03YEiXWJbCYzny7LmE0T6ZgycvFzr/S28cDXiPemPMg4333aDjHj02631gRZtMG9dh7u35UnjuWU1Qs2ke2Irx2GJadp5LHp7++ssHWdmZKVJlKSvh679QCNvlG5CvWD/VinBvibTR61Py+b0Zk+k3++fz3YcJZ89ZCAyQ4yWCsGB7nNjpaMYcBHgHwgNBF6Gk3x71A2N3NfQrm2pcoB3+KM3QMVFmZrUD74Ni8TLXOdK2GHmYaqMI9A="
on_success: change
on_failure: always
on_pull_requests: change