-
Notifications
You must be signed in to change notification settings - Fork 9
/
.travis.yml
32 lines (28 loc) · 1.1 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
language: node_js
dist: focal
node_js:
- 18
before_install:
- export WS_APIKEY=${WS_APIKEY}
- export WS_USERKEY=${WS_USERKEY}
- export WS_PRODUCTNAME=${WS_PRODUCTNAME}
- export WS_PROJECTNAME=razeedeploy-core
- export WS_WSS_URL=https://ibmets.whitesourcesoftware.com/agent
script:
- if [ "${TRAVIS_PULL_REQUEST}" != "false" ]; then npx audit-ci --config audit-ci.json --only=prod; else npx audit-ci --config audit-ci.json || true; fi
- npm run lint
- npm test
- if [ -n "${TRAVIS_TAG}" ]; then npm version --no-git-tag-version "${TRAVIS_TAG}"; fi
# Perform UA scan on non-PR builds
- if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then curl -LJO https://unified-agent.s3.amazonaws.com/wss-unified-agent.jar; java -jar wss-unified-agent.jar -d . || echo "UA Scan Error occurred"; fi
before_deploy:
# Use npm v9 for deployments (v10 has problems with authentication with api_key)
- npm install -g npm@9
deploy:
- provider: npm
email: "${NPMJS_EMAIL}"
api_key: "${NPMJS_API_KEY}"
skip_cleanup: true
on:
tags: true
condition: ${TRAVIS_TAG} =~ ^[0-9]+\.[0-9]+\.[0-9]+$