76 строки
2.1 KiB
YAML
76 строки
2.1 KiB
YAML
|
version: 2.0
|
||
|
jobs:
|
||
|
build-deploy: # build for the master branch
|
||
|
machine: true
|
||
|
working_directory: ~/redash-ui-tests
|
||
|
steps:
|
||
|
- checkout
|
||
|
- run:
|
||
|
name: Build docker image and push to repo
|
||
|
command: |
|
||
|
docker version
|
||
|
make build
|
||
|
docker tag redash-ui-tests mozilla/redash-ui-tests:latest
|
||
|
docker login -u "${DOCKERHUB_USER}" -p "${DOCKERHUB_PASS}"
|
||
|
docker push mozilla/redash-ui-tests:latest
|
||
|
build-release: # build for tags
|
||
|
machine: true
|
||
|
working_directory: ~/redash-ui-tests
|
||
|
steps:
|
||
|
- checkout
|
||
|
- run:
|
||
|
name: Build docker image and push to repo
|
||
|
command: |
|
||
|
docker version
|
||
|
make build
|
||
|
docker tag redash-ui-tests "mozilla/redash-ui-tests:${CIRCLE_TAG}"
|
||
|
docker login -u "${DOCKERHUB_USER}" -p "${DOCKERHUB_PASS}"
|
||
|
docker push "mozilla/redash-ui-tests:${CIRCLE_TAG}"
|
||
|
integration_test:
|
||
|
working_directory: ~/redash-ui-tests
|
||
|
machine: true
|
||
|
steps:
|
||
|
- checkout
|
||
|
- run:
|
||
|
name: Install Docker Compose
|
||
|
command: |
|
||
|
set -x
|
||
|
pip install docker-compose>=1.18
|
||
|
docker-compose --version
|
||
|
- run:
|
||
|
name: Pull images and build ui-tests image
|
||
|
command: |
|
||
|
set -x
|
||
|
docker-compose up -d
|
||
|
sleep 20
|
||
|
- run:
|
||
|
name: Start container and setup redash instance
|
||
|
command: |
|
||
|
docker-compose ps
|
||
|
make setup-redash
|
||
|
- run:
|
||
|
name: Run tests
|
||
|
command: |
|
||
|
make docker-ui-tests
|
||
|
- store_artifacts:
|
||
|
path: report.html
|
||
|
workflows:
|
||
|
version: 2
|
||
|
build_test_deploy_release:
|
||
|
jobs:
|
||
|
# - build-deploy:
|
||
|
# requires:
|
||
|
# - integration_test
|
||
|
# filters:
|
||
|
# branches:
|
||
|
# only: master
|
||
|
# - build-release:
|
||
|
# requires:
|
||
|
# - integration_test
|
||
|
# filters:
|
||
|
# tags:
|
||
|
# only: /.*/
|
||
|
# branches:
|
||
|
# ignore: /.*/
|
||
|
- integration_test
|