-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy path.travis.yml
114 lines (114 loc) · 3.67 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
sudo: required
dist: trusty
jobs:
include:
- stage: deploy-middleware-aws
name: Deploys the Vorto-Middleware to AWS Beanstalk
language: java
jdk: oraclejdk8
services:
- docker
before_script:
- true
script:
- mvn --fail-fast -q clean install
- docker build --build-arg JAR_FILE=./middleware-service/target/vorto-middleware-1.0.0.jar -f ./middleware-service/Dockerfile -t eclipsevorto/vorto-normalizer:nightly ./middleware-service;
- if [ -n "$TRAVIS_TAG" ]; then
docker build --build-arg JAR_FILE=./middleware-service/target/vorto-middleware-1.0.0.jar -f ./middleware-service/Dockerfile -t eclipsevorto/vorto-normalizer:latest ./middleware-service;
docker build --build-arg JAR_FILE=./middleware-service/target/vorto-middleware-1.0.0.jar -f ./middleware-service/Dockerfile -t eclipsevorto/vorto-normalizer:$TRAVIS_TAG ./middleware-service;
fi
before_install:
- cd vorto-middleware
before_deploy:
- export ELASTIC_BEANSTALK_DESCRIPTION="Build-Job ${TRAVIS_JOB_NUMBER} - Git Revision
${TRAVIS_COMMIT_SHORT} vorto-middleware "
- export ELASTIC_BEANSTALK_ENV=vorto-middleware-service-${TRAVIS_BRANCH}
- export ELASTIC_BEANSTALK_LABEL=git-backend-$(git rev-parse --verify HEAD --short)
- export ARTIFACT_BACKEND=$(ls middleware-service/target/middleware-service-*.jar)
deploy:
- provider: elasticbeanstalk
access_key_id: "$VORTO_AWS_ACCESS_KEY"
secret_access_key: "$VORTO_AWS_SECRET_KEY"
zip_file: "${ARTIFACT_BACKEND}"
skip_cleanup: true
region: "$VORTO_S3_REGION"
app: Vorto-Payload-Normalizer-Service
env: Vorto-Middleware
bucket_name: "$VORTO_S3_BUCKET"
on:
branch: master
- provider: script
script: bash docker/normalizer_docker_push
on:
branch: master
- stage: deploy-dashboard-aws
name: Deploys the Vorto-Dashboard to AWS Beanstalk
language: node_js
node_js:
- '10'
before_script:
- true
script:
- true
before_install:
- cd vorto-dashboard
install:
- echo "Installing dependencies"
- yarn install
after_success:
- echo "Creating build"
- npm run build
- npm run-script dist
before_deploy:
- rm -rf .tmp
- rm -rf .DS_Store
- rm -rf node_modules
- export ELASTIC_BEANSTALK_ENV=vorto-dashboard-${TRAVIS_BRANCH}
- export ELASTIC_BEANSTALK_LABEL=git-$(git rev-parse --verify HEAD --short)
- export ELASTIC_BEANSTALK_DESCRIPTION="Build-Job ${TRAVIS_JOB_NUMBER} - Git Revision
${TRAVIS_COMMIT_SHORT} vorto-dashboard "
deploy:
provider: elasticbeanstalk
access_key_id: "$VORTO_AWS_ACCESS_KEY"
secret_access_key: "$VORTO_AWS_SECRET_KEY"
zip-file: dist/vorto-dashboard.zip
skip_cleanup: true
region: "$VORTO_S3_REGION"
app: Vorto Dashboard
env: VortoDashboard-dev
only_create_app_version: false
bucket_name: "$VORTO_S3_BUCKET"
on:
branch: master
- stage: deploy-npm
name: Publish Vorto-Dashboard to NPM
language: node_js
node_js:
- '10'
cache:
yarn: true
directories:
- "~/.cache"
before_install:
- cd vorto-dashboard
install:
- echo "Installing dependencies"
- yarn install
- echo "Finished yarn install"
after_success:
- echo "Creating build"
- npm run build
- npm run dist
before_deploy:
- echo "Preparing for deploy to NPM"
- cd dist
deploy:
provider: npm
skip_cleanup: true
email: Alexander.Edelmann@bosch-si.com
api_key: $NPM_API_KEY
on:
tags: true
branches:
only:
- master