-
Notifications
You must be signed in to change notification settings - Fork 4
/
.travis.yml
33 lines (33 loc) · 1.36 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
language: node_js
node_js:
- node
services:
- xvfb
script:
- npm run lint
- npm run test
- npm run build:single-spa-travis
- echo "Folder name in Digital Ocean Spaces - $TRAVIS_COMMIT"
- mkdir -p dist/@ampath/esm-angular-form-entry/$TRAVIS_COMMIT
- mv dist/ampath-esm-angular-form-entry/*.* dist/@ampath/esm-angular-form-entry/$TRAVIS_COMMIT/
deploy:
- provider: s3
access_key_id: "$DIGITAL_OCEAN_SPACES_KEY_ID"
secret_access_key: "$DIGITAL_OCEAN_SPACES_ACCESS_KEY"
bucket: "$DIGITAL_OCEAN_SPACES_BUCKET_TEST"
endpoint: "$DIGITAL_OCEAN_SPACES_ENDPOINT"
cache-control: "max-age=31536000"
local_dir: dist
skip_cleanup: true
acl: public_read
on:
branch: master
after_deploy:
- echo "Updating import map to point to new version of @ampath/esm-angular-form-entry"
- statuscode=$(curl --output /dev/null --write-out %{http_code} -u $DEPLOYER_USERNAME:$DEPLOYER_PASSWORD -d '{ "service":"@ampath/esm-angular-form-entry","url":"https://'$HOSTED_FILE_PREFIX_TEST'/@ampath/esm-angular-form-entry/'$TRAVIS_COMMIT'/ampath-esm-form-entry.js" }' -X PATCH $DEPLOYER_HOST/services\?env=test -H "Accept:application/json" -H "Content-Type:application/json")
- echo "Deployment Status Code --> ${statuscode}"
- if [ "$statuscode" -ne 200 ]; then travis_terminate "$statuscode"; fi
addons:
apt:
packages:
- google-chrome-stable