Skip to content

Commit 391ac97

Browse files
committed
[ops] use build stages in travis (#3810)
1 parent 88de01f commit 391ac97

File tree

3 files changed

+64
-148
lines changed

3 files changed

+64
-148
lines changed

.travis.yml

Lines changed: 63 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,6 @@ addons:
1111
postgresql: '9.5'
1212
apt_packages:
1313
- postgresql-9.5-postgis-2.3
14-
before_script:
15-
- node -e 'require("./lib/index.js")'
16-
- psql -c 'create database parse_server_postgres_adapter_test_database;' -U postgres
17-
- psql -c 'CREATE EXTENSION postgis;' -U postgres -d parse_server_postgres_adapter_test_database
18-
- psql -c 'CREATE EXTENSION postgis_topology;' -U postgres -d parse_server_postgres_adapter_test_database
19-
env:
20-
global:
21-
- COVERAGE_OPTION='./node_modules/.bin/nyc'
22-
matrix:
23-
- MONGODB_VERSION=3.0.8
24-
- MONGODB_VERSION=3.2.6
25-
- PARSE_SERVER_TEST_DB=postgres
26-
- PARSE_SERVER_TEST_CACHE=redis
27-
matrix:
28-
fast_finish: true
2914
branches:
3015
only:
3116
- master
@@ -35,36 +20,69 @@ cache:
3520
directories:
3621
- node_modules
3722
- "$HOME/.mongodb/versions"
23+
24+
# Test stage
25+
stage: test
26+
env:
27+
global:
28+
- COVERAGE_OPTION='./node_modules/.bin/nyc'
29+
matrix:
30+
- MONGODB_VERSION=3.0.8
31+
- MONGODB_VERSION=3.2.6
32+
- PARSE_SERVER_TEST_DB=postgres
33+
- PARSE_SERVER_TEST_CACHE=redis
34+
before_script:
35+
- node -e 'require("./lib/index.js")'
36+
- psql -c 'create database parse_server_postgres_adapter_test_database;' -U postgres
37+
- psql -c 'CREATE EXTENSION postgis;' -U postgres -d parse_server_postgres_adapter_test_database
38+
- psql -c 'CREATE EXTENSION postgis_topology;' -U postgres -d parse_server_postgres_adapter_test_database
3839
after_script:
3940
- bash <(curl -s https://codecov.io/bash)
40-
after_failure:
41-
- (cd resources; python travis_after_all.py)
42-
after_success:
43-
- (cd resources; python travis_after_all.py)
44-
- export $(cat resources/.to_export_back)
4541

46-
deploy:
47-
- provider: npm
48-
skip_cleanup: true
49-
email:
50-
secure: "YweTGc22uqFWpzbfiUa5ptBLRAy6tt6d9TZLwEkPtmnsWzN9dguGyKWmXiw0qL+848FWQ5PWzUgBn5XdigV9tF3rJY6RGs8i38WulNjwSoGuRZa3AChsQHAb1KenANcJybzhnwgEj9gRsrGZPEsyI2whfake/xLDtG91kHjpJANsd4gseOh6fdS4FIYCbyXvSbC7S0yZzIJkgSkMqJO7RJ8r0HYQ7srYIw31dM3ZXSmUYu+GaMDUUu3RLAGYoKaROxhDRnzkjdeLLiwZH8hQ/6CaqwqX54iJ6OS+MOQU3fi5ZXalA7RZvtC4RmrcCkaTf3i0f+5xejYIFgzXdYGMVm8DUc82tDw1s4b6Pb19bgi1xXOQ0IKzRmZuGxnvkRN61dnYdnpnnNuG97HXgVjiOigZXVLZkWazUdnf9zXqmkC+KxPfa4Ldqg0TMjQ9J14n6TXxRti8Tt0xMa1Uzho7VdsxdJy35Bghy398O6X8VdX6parfzEkX7c/JzcA3TIMJ9+S1dy3J4Tb2URB5367W6h7cDeXtGmwLTFu75Q1CNqRJkUGbSrX2NyMqG5tc8oaTM+OWvLxcbKPRy9T6qN7x2JmCHHaapf8/8VR9wCy2PwE5j+KWhmctEHqqOgrtG5gsjC0eCPJsposxZWyM7M6aUpXe3w+olBfKq9apUGStUSU="
51-
api_key:
52-
secure: "QprkaqQ+WCvZQR4qIEs5iS6peMCbRd8Hgt0s6HfdmhavNXwDFY8Bkdf6zJwWHLiqs4pyClXDZ2f6QiOs7y9IvJZ+wOIbsf4N5V6s06zOxJ0NAOwhe0mgWS3Us0zgXIfmW4BpmGnU4ql/qGL+9vNfyQJ7wxEJxVK7hiYh9Epu49E2jmefDqTX+SNSrDCg4HkRcxerxYGnAJDCP50QaNlyLSciODD6wHaddrSYkdvmISLMnLHug61OkE4OBIOWXfYV+e31kDj+zgczAfVQgekDKtaimCQclHFrmaEPl0KIm6wsDQAw5HWkepA/WZfv4SbCrDaKJDZw+LBI7dR0ezmiOH/zmWWrRW7D4wjkDGiumWjA8etuf8I4GRyC/d1RS+hnlvPr0Bu+WljuVxLoK3nhZOdiK5t4QlVDoGankkRjLylwFQgo8tzu5N0dc26z3ClowTwcKsjStmFr53gjCD7l3qoFjyPot1JlW3LPhG9Nch7rK33/7ONqVai3zxb1xB9ynd8TSzKi4/66LeYEDcGVM5A9Vmkp+egCnOhkOAXdI8O4jid98NANir+U4xmUYZ2PAMNmSeHlpSpwH2pC1/BHpDKA9RZEuEdr3sgmtuXXwwOCp+xvuVwxZZ6+gVEjG4nGTqSNxUIq1fzjGih8ElJtbM1Uhh2dVE9uxW7EC/oCuuk="
53-
on:
54-
tags: true
55-
all_branches: true
56-
condition: "$BUILD_LEADER$BUILD_AGGREGATE_STATUS = YESothers_succeeded"
57-
repo: parse-community/parse-server
58-
- provider: script
59-
skip_cleanup: true
60-
script: ./resources/npm-git.sh
61-
on:
62-
branch: master
63-
condition: "$BUILD_LEADER$BUILD_AGGREGATE_STATUS = YESothers_succeeded"
64-
- provider: script
65-
skip_cleanup: true
66-
script: ./resources/docker-hub.sh
67-
on:
68-
tags: true
69-
all_branches: true
70-
condition: "$BUILD_LEADER$BUILD_AGGREGATE_STATUS = YESothers_succeeded"
42+
jobs:
43+
include:
44+
# release on github latest branch
45+
- stage: release
46+
node_js: '6.1'
47+
env: RELEASE=github-latest
48+
before_script: skip
49+
after_script: skip
50+
script: skip
51+
deploy:
52+
- provider: script
53+
skip_cleanup: true
54+
script: ./resources/npm-git.sh
55+
on:
56+
branch: master
57+
# release on npm
58+
- stage: release
59+
before_script: skip
60+
after_script: skip
61+
script: skip
62+
node_js: '6.1'
63+
env: RELEASE=npm
64+
deploy:
65+
- provider: npm
66+
skip_cleanup: true
67+
email:
68+
secure: "YweTGc22uqFWpzbfiUa5ptBLRAy6tt6d9TZLwEkPtmnsWzN9dguGyKWmXiw0qL+848FWQ5PWzUgBn5XdigV9tF3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gjCD7l3qoFjyPot1JlW3LPhG9Nch7rK33/7ONqVai3zxb1xB9ynd8TSzKi4/66LeYEDcGVM5A9Vmkp+egCnOhkOAXdI8O4jid98NANir+U4xmUYZ2PAMNmSeHlpSpwH2pC1/BHpDKA9RZEuEdr3sgmtuXXwwOCp+xvuVwxZZ6+gVEjG4nGTqSNxUIq1fzjGih8ElJtbM1Uhh2dVE9uxW7EC/oCuuk="
71+
on:
72+
tags: true
73+
all_branches: true
74+
repo: parse-community/parse-server
75+
# publish on docker
76+
- stage: release
77+
before_script: skip
78+
after_script: skip
79+
script: skip
80+
node_js: '6.1'
81+
env: RELEASE=docker
82+
deploy:
83+
- provider: script
84+
skip_cleanup: true
85+
script: ./resources/docker-hub.sh
86+
on:
87+
tags: true
88+
all_branches: true

resources/npm-git.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ git config user.name "Travis CI"
3030
git config user.email "[email protected]"
3131
git add .
3232
git commit -m "Deploy master to LATEST branch"
33-
git push --force --quiet "https://${GH_TOKEN}@github.com/parseplatform/parse-server.git" master:latest
33+
git push --force --quiet "https://${GH_TOKEN}@github.com/parse-community/parse-server.git" master:latest

resources/travis_after_all.py

Lines changed: 0 additions & 102 deletions
This file was deleted.

0 commit comments

Comments
 (0)