-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
53 lines (45 loc) · 2.53 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
sudo: required
dist: focal
language: node_js
node_js:
- "16"
services:
- docker
cache:
directories:
- proxy/node_modules
- $HOME/.cache/pip3
env:
global:
- AWS_DEFAULT_REGION=eu-west-1
# Travis_IAM_User_API_key
# AWS_ACCESS_KEY_ID=...
- secure: "IE+efTLC4cL3do/jlgu+YqctduUMF95O9JrKUk1c7GU9ZRO7AT5ZsLk50Khk9UhUDHTjt4zXUTkLMCwb/IdyEuv4ieymbpKa+HH373agLVe59NMDOrEKYhF98EMxw0cuDVJMHz9LJzoCNjfZ8RKet+wDd6qregt6rEKpfO3XvM9+/YCJIrr5utmU4lmXaqsSjqljfqOfAtiVkh0CBbejjBs6t3SFEY0Noj8XOf+LYUnJBKucdC4NIFR9kkI0FAQX68YbXerVH5WH4Af1daeoFXqhJfXTNXysGJk0bxbboj2076xO37QQWQPoQfx8KlAvcA8mS20gZIg9asLDgLlaBBpJTuT4ukagAe3p/GiL0BWDm8L+njuphGAtfJkNCihhCeJesmPDNtXX7RFEBqBA5a1tajKDTUdSN8DZtL64NSll1m/p8KPoevcVCKgNnutlcbRXBXhubSLGgE40ZlvBvLHx4e4VclcAsukVKqEV39s9R4wHLEr4UzWQJjo2zSYK4/lKnWesTtSjYWnk/26KyzzshqTKEvu0idSmuU9IRfGYwR9p6BxVIephWpMce+LSGhhLpvd6RMfAyfnh9rdtChGkceabaLGQ9R3YwyfRTP9sES1lYQVO0f1EZi1l7SYHE8VDvdpUsDdgE/5x2REyr2eu8G5JQ6KydIu65vsXA/Q="
# AWS_SECRET_ACCESS_KEY=...
- secure: "jrwFK0yeipUeWorQApMFHrc6xsPQAeucO4CRIdJAZnswBH3no7XjXBvueY1om/wREuIuSoUezRtz2nQ4kfE/r8qTOJi/OQb8XQk+LBjhoVjX3ATtFyt7UgdLBsH/8fsVtJih6P1AImMo92mn1Q36xE2BxJrSV5x+NUJHh6rSKP+JpEaeSpMv+M7BH3sxbLjGSlvRw2QDJl0dK9XKVsG4OdRNWO57Bjsd+8j75LXbjCnMnn8i3DjAK8CYr2JyWdgUfpMzyy6XPsv8U3hjVmuSyA7Yw5ACyxa95sKQunj1xiXASznVD0Ig9uB/ekEjr7vJzR8MNMzWHftVXSjLINSv1EkR+qPSA21uSD+y4NmMjq3xdwBPqoAoIddJ0co6GDkQPfPGf9Wsk2GXtFLk8WcytEp9967eZZhD2GJf0p7vOrBZi8NSI5Dbrpvu3WAS6CURYerjWizQ9D+1efBZmR01P7wXCG9tN8A5AZg/pJ7JviP7AUBFcdl8wNZ1SUFNR/e9oaNSNsmT1lE4qUb5L5jZ1a2iejyxJvlB8HJAIjBgazFq2F2b8q2rSyMYBo83PPhANe0DWS4IIJOfZNTLn47hKyrcKc4Jpd/8Q3nogrAFx9JcLaV8/NNwItCtVXT1MKX8MnPQOWv3lgJbiQPQHPiMcM++8hr+weGjxMCXwK04tfM="
before_install:
- pyenv global 3.8
- pip3 install --user awscli
- export PATH=$PATH:$HOME/.local/bin
install:
- cd $TRAVIS_BUILD_DIR/proxy
- npm install
script:
- cd $TRAVIS_BUILD_DIR/proxy
- npm run build
- cd $TRAVIS_BUILD_DIR/certbot
- ./scripts/build.sh
- cd $TRAVIS_BUILD_DIR/proxy
- npm run testca
- node scripts/create-local-config.js > target/koski-luovutuspalvelu-proxy-config-ci.json
- docker run --name koski-luovutuspalvelu-proxy -p 7022:443 -v `pwd`/target/koski-luovutuspalvelu-proxy-config-ci.json:/etc/nginx/koski-luovutuspalvelu-proxy-config.json:ro -d -m 256m koski-luovutuspalvelu-proxy:latest
- sleep 5
- npm run test
after_script:
- docker logs koski-luovutuspalvelu-proxy
- docker stop -t 5 koski-luovutuspalvelu-proxy
deploy:
provider: script
script: cd $TRAVIS_BUILD_DIR && scripts/push_images_to_ecr.sh
on:
branch: master