Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
32 lines (26 sloc) 1.17 KB
sudo: false
services:
- docker
before_script:
- export APP_IMAGE=keboola-component
- docker -v
- docker build -t $APP_IMAGE .
- docker run $APP_IMAGE flake8
- docker run $APP_IMAGE python -m unittest discover
# push test image to ECR
- 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
script:
- docker run --rm -e KBC_STORAGE_TOKEN quay.io/keboola/syrup-cli:latest run-job $KBC_DEVELOPERPORTAL_APP $KBC_APP_TEST_CONFIG test
after_success:
- docker images
deploy:
provider: script
skip_cleanup: true
script: "./deploy.sh"
on:
tags: true