-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
39 lines (34 loc) · 1.42 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
sudo: false
services:
- docker
jobs:
include:
- stage: tests
script:
- docker run $APP_IMAGE flake8 /code/ --config=/code/flake8.cfg
- docker run $APP_IMAGE python -m unittest discover
# push test image to ECR - uncomment for testing before deployment
# - docker pull quay.io/keboola/developer-portal-cli-v2:latest
# - export REPOSITORY=`docker run --rm -e KBC_DEVELOPERPORTAL_USERNAME -e KBC_DEVELOPERPORTAL_PASSWORD -e KBC_DEVELOPERPORTAL_URL quay.io/keboola/developer-portal-cli-v2:latest ecr:get-repository $KBC_DEVELOPERPORTAL_VENDOR $KBC_DEVELOPERPORTAL_APP`
# - docker tag $APP_IMAGE:latest $REPOSITORY:test
# - eval $(docker run --rm -e KBC_DEVELOPERPORTAL_USERNAME -e KBC_DEVELOPERPORTAL_PASSWORD -e KBC_DEVELOPERPORTAL_URL quay.io/keboola/developer-portal-cli-v2:latest ecr:get-login $KBC_DEVELOPERPORTAL_VENDOR $KBC_DEVELOPERPORTAL_APP)
# - docker push $REPOSITORY:test
# - docker pull quay.io/keboola/syrup-cli:latest
- stage: deploy_dev_portal
if: branch = master
script: "./scripts/update_dev_portal_properties.sh"
before_script:
- export APP_IMAGE=keboola-component
- docker -v
- docker build -t $APP_IMAGE .
- chmod +x ./scripts/update_dev_portal_properties.sh
- chmod +x ./deploy.sh
after_success:
- docker images
deploy:
provider: script
skip_cleanup: true
script: ./deploy.sh
on:
tags: true
branch: master