2017-06-13 03:55:12 +00:00
|
|
|
# Generated from .gitlab-ci.jsonnet
|
|
|
|
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
|
2017-05-02 14:08:24 +00:00
|
|
|
---
|
2017-07-28 11:04:28 +00:00
|
|
|
appr_e2e:
|
2017-07-28 11:23:31 +00:00
|
|
|
allow_failure: true
|
|
|
|
before_script: []
|
|
|
|
image:
|
|
|
|
name: quay.io/appr/appr:kubectl
|
2017-07-28 11:04:28 +00:00
|
|
|
script:
|
2017-07-28 11:23:31 +00:00
|
|
|
- sleep 150
|
2017-07-28 11:04:28 +00:00
|
|
|
- appr version localhost:80
|
2017-07-28 11:23:31 +00:00
|
|
|
- appr list localhost:80
|
2017-07-28 11:04:28 +00:00
|
|
|
services:
|
2017-07-28 11:23:31 +00:00
|
|
|
- name: postgres:9.6
|
|
|
|
- alias: quay
|
|
|
|
name: quay.io/quay/quay-ci:${CI_COMMIT_REF_SLUG}
|
|
|
|
- alias: db-init
|
|
|
|
command:
|
|
|
|
- /bin/sh
|
|
|
|
- -c
|
|
|
|
- sleep 30&& /quay-registry/venv/bin/python initdb.py&& sleep 3600
|
|
|
|
name: quay.io/quay/quay-ci:${CI_COMMIT_REF_SLUG}
|
2017-07-28 11:04:28 +00:00
|
|
|
stage: integration
|
|
|
|
tags:
|
|
|
|
- kubernetes
|
|
|
|
variables:
|
2017-07-28 11:23:31 +00:00
|
|
|
APP_HOST: localhost:80
|
2017-07-28 11:04:28 +00:00
|
|
|
DB_URI: postgresql://quay:quay@localhost/quay
|
|
|
|
GIT_STRATEGY: none
|
|
|
|
POSTGRES_PASSWORD: quay
|
|
|
|
POSTGRES_USER: quay
|
|
|
|
PYTHONPATH: .
|
|
|
|
QUAYDIR: /quay-registry
|
|
|
|
SKIP_DB_SCHEMA: 'true'
|
|
|
|
TEST: 'true'
|
|
|
|
TEST_DATABASE_URI: postgresql://quay:quay@localhost/quay
|
2017-06-13 03:55:12 +00:00
|
|
|
container-base-build:
|
2017-05-02 14:08:24 +00:00
|
|
|
before_script:
|
2017-06-13 03:55:12 +00:00
|
|
|
- docker login -u $DOCKER_USER -p $DOCKER_PASS quay.io
|
|
|
|
image: docker:git
|
|
|
|
only:
|
2017-07-28 11:07:42 +00:00
|
|
|
- schedules
|
2017-06-13 03:55:12 +00:00
|
|
|
script:
|
2017-07-27 09:53:23 +00:00
|
|
|
- docker build --no-cache -t quay.io/quay/quay-base:latest -f quay-base.dockerfile .
|
2017-06-13 03:55:12 +00:00
|
|
|
- docker push quay.io/quay/quay-base:latest
|
|
|
|
stage: docker_base
|
2017-05-30 21:06:09 +00:00
|
|
|
tags:
|
2017-06-26 13:21:59 +00:00
|
|
|
- kubernetes
|
2017-06-13 03:55:12 +00:00
|
|
|
variables:
|
2017-07-18 07:08:33 +00:00
|
|
|
DOCKER_DRIVER: overlay2
|
2017-06-26 13:21:59 +00:00
|
|
|
DOCKER_HOST: tcp://docker-host.gitlab-runner.svc.cluster.local:2375
|
2017-05-30 21:06:09 +00:00
|
|
|
container-build:
|
2017-06-13 03:55:12 +00:00
|
|
|
before_script:
|
|
|
|
- docker login -u $DOCKER_USER -p $DOCKER_PASS quay.io
|
|
|
|
image: docker:git
|
2017-05-30 21:06:09 +00:00
|
|
|
script:
|
2017-07-27 15:42:23 +00:00
|
|
|
- docker build --no-cache -t quay.io/quay/quay-ci:${CI_COMMIT_REF_SLUG} -f Dockerfile .
|
2017-07-27 09:53:23 +00:00
|
|
|
- docker run --rm quay.io/quay/quay-ci:${CI_COMMIT_REF_SLUG} cat ALEMBIC_HEAD > /tmp/ALEMBIC_HEAD
|
|
|
|
- export MIGRATION_HEAD=`cat /tmp/ALEMBIC_HEAD | cut -d" " -f1`
|
|
|
|
- echo $MIGRATION_HEAD
|
|
|
|
- docker build --label db-schema-head=$MIGRATION_HEAD -t quay.io/quay/quay-ci:${CI_COMMIT_REF_SLUG} -f Dockerfile .
|
2017-06-13 03:55:12 +00:00
|
|
|
- docker push quay.io/quay/quay-ci:${CI_COMMIT_REF_SLUG}
|
|
|
|
stage: docker_build
|
|
|
|
tags:
|
2017-06-26 13:21:59 +00:00
|
|
|
- kubernetes
|
2017-05-30 21:06:09 +00:00
|
|
|
variables:
|
2017-07-18 07:08:33 +00:00
|
|
|
DOCKER_DRIVER: overlay2
|
2017-06-26 13:21:59 +00:00
|
|
|
DOCKER_HOST: tcp://docker-host.gitlab-runner.svc.cluster.local:2375
|
2017-06-13 03:55:12 +00:00
|
|
|
container-release:
|
2017-05-30 21:06:09 +00:00
|
|
|
before_script:
|
2017-06-13 03:55:12 +00:00
|
|
|
- docker login -u $DOCKER_USER -p $DOCKER_PASS quay.io
|
|
|
|
image: docker:git
|
|
|
|
only:
|
|
|
|
- master
|
|
|
|
- tags
|
2017-05-02 14:08:24 +00:00
|
|
|
script:
|
2017-06-13 03:55:12 +00:00
|
|
|
- docker pull quay.io/quay/quay-ci:${CI_COMMIT_REF_SLUG}
|
2017-06-20 09:30:27 +00:00
|
|
|
- docker tag quay.io/quay/quay-ci:${CI_COMMIT_REF_SLUG} quay.io/quay/quay:${CI_COMMIT_REF_SLUG}-${SHA8}
|
|
|
|
- docker push quay.io/quay/quay:${CI_COMMIT_REF_SLUG}-${SHA8}
|
2017-06-13 03:55:12 +00:00
|
|
|
stage: docker_release
|
|
|
|
tags:
|
2017-06-26 13:21:59 +00:00
|
|
|
- kubernetes
|
2017-06-13 03:55:12 +00:00
|
|
|
variables:
|
2017-07-18 07:08:33 +00:00
|
|
|
DOCKER_DRIVER: overlay2
|
2017-06-26 13:21:59 +00:00
|
|
|
DOCKER_HOST: tcp://docker-host.gitlab-runner.svc.cluster.local:2375
|
2017-07-16 23:24:31 +00:00
|
|
|
deploy-preview:
|
|
|
|
before_script:
|
|
|
|
- appr login -u $DOCKER_USER -p $DOCKER_PASS quay.io
|
2017-07-19 22:34:08 +00:00
|
|
|
- cd deploy/quay-ci-app
|
|
|
|
- echo -n 1.0.0-${CI_COMMIT_REF_SLUG} > VERSION
|
|
|
|
- 'echo "{\"domain\": \"$QUAY_DOMAIN\", \"image\": \"quay.io/quay/quay-ci:${CI_COMMIT_REF_SLUG}\", \"tag\": \"${CI_COMMIT_REF_SLUG}\"}" > params.json'
|
|
|
|
- cat params.json
|
2017-07-16 23:24:31 +00:00
|
|
|
environment:
|
|
|
|
name: review/${CI_COMMIT_REF_SLUG}
|
|
|
|
on_stop: stop-preview
|
|
|
|
url: https://quay-${CI_COMMIT_REF_SLUG}.k8s.devtable.com
|
2017-07-20 13:15:20 +00:00
|
|
|
except:
|
|
|
|
- master
|
2017-07-16 23:24:31 +00:00
|
|
|
image: quay.io/appr/appr:kubectl
|
|
|
|
only:
|
|
|
|
- branches
|
|
|
|
script:
|
2017-07-19 22:34:08 +00:00
|
|
|
- appr push quay.io/quay/quay-ci-app -f
|
|
|
|
- appr deploy quay.io/quay/quay-ci-app@1.0.0-${CI_COMMIT_REF_SLUG} --namespace ci-quay-${CI_COMMIT_REF_SLUG} -x docker_user=$DOCKER_USER -x docker_pass=$DOCKER_PASS
|
2017-07-16 23:24:31 +00:00
|
|
|
- kubectl get ingresses -n ci-quay-${CI_COMMIT_REF_SLUG} -o wide
|
2017-07-19 22:34:08 +00:00
|
|
|
stage: deploy_preview
|
2017-07-16 23:24:31 +00:00
|
|
|
tags:
|
|
|
|
- kubernetes
|
2017-07-19 22:34:08 +00:00
|
|
|
variables:
|
|
|
|
K8S_NAMESPACE: ci-quay-${CI_COMMIT_REF_SLUG}
|
|
|
|
QUAY_DOMAIN: quay-${CI_COMMIT_REF_SLUG}.k8s.devtable.com
|
2017-07-16 23:24:31 +00:00
|
|
|
when: manual
|
2017-07-19 22:34:08 +00:00
|
|
|
deploy-staging:
|
|
|
|
before_script:
|
|
|
|
- appr login -u $DOCKER_USER -p $DOCKER_PASS quay.io
|
|
|
|
- cd deploy/quay-ci-app
|
2017-06-20 09:30:27 +00:00
|
|
|
- echo -n 1.0.0-${CI_COMMIT_REF_SLUG}-${SHA8} > VERSION
|
|
|
|
- 'echo "{\"domain\": \"$QUAY_DOMAIN\", \"image\": \"quay.io/quay/quay:${CI_COMMIT_REF_SLUG}-${SHA8}\", \"tag\": \"${CI_COMMIT_REF_SLUG}-${SHA8}\"}" > params.json'
|
2017-07-19 22:34:08 +00:00
|
|
|
- cat params.json
|
|
|
|
environment:
|
|
|
|
name: staging
|
|
|
|
url: https://quay-staging.k8s.devtable.com
|
|
|
|
image: quay.io/appr/appr:kubectl
|
|
|
|
only:
|
|
|
|
- master
|
|
|
|
script:
|
|
|
|
- appr push quay.io/quay/quay-ci-app -f
|
|
|
|
- appr push quay.io/quay/quay-ci-app -c master
|
|
|
|
- appr push quay.io/quay/quay-ci-app -c beta
|
|
|
|
- appr push quay.io/quay/quay-ci-app -c latest
|
2017-06-20 09:30:27 +00:00
|
|
|
- appr deploy quay.io/quay/quay-ci-app@1.0.0-${CI_COMMIT_REF_SLUG}-${SHA8} --namespace ci-staging -x docker_user=$DOCKER_USER -x docker_pass=$DOCKER_PASS
|
2017-07-19 22:34:08 +00:00
|
|
|
- kubectl get ingresses -n ci-staging -o wide
|
|
|
|
stage: deploy_staging
|
|
|
|
tags:
|
|
|
|
- kubernetes
|
|
|
|
variables:
|
|
|
|
K8S_NAMESPACE: ci-staging
|
|
|
|
QUAY_DOMAIN: quay-staging.k8s.devtable.com
|
2017-05-02 14:08:24 +00:00
|
|
|
karma-tests:
|
2017-06-13 03:55:12 +00:00
|
|
|
before_script:
|
2017-07-06 21:50:38 +00:00
|
|
|
- cd $QUAYDIR
|
|
|
|
- source $QUAYDIR/venv/bin/activate
|
2017-06-13 03:55:12 +00:00
|
|
|
image: quay.io/quay/quay-ci:${CI_COMMIT_REF_SLUG}
|
2017-05-02 14:08:24 +00:00
|
|
|
script:
|
2017-06-13 03:55:12 +00:00
|
|
|
- curl -Ss https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
|
|
|
|
- echo "deb http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google.list
|
|
|
|
- apt-get update -yqqq
|
|
|
|
- apt-get install -y google-chrome-stable
|
|
|
|
- yarn test
|
2017-07-28 11:23:31 +00:00
|
|
|
stage: tests
|
2017-06-13 03:55:12 +00:00
|
|
|
tags:
|
|
|
|
- kubernetes
|
|
|
|
variables:
|
|
|
|
GIT_STRATEGY: none
|
|
|
|
PYTHONPATH: .
|
2017-02-01 23:17:25 +00:00
|
|
|
QUAYDIR: /quay-registry
|
2017-06-13 03:55:12 +00:00
|
|
|
TEST: 'true'
|
|
|
|
mysql:
|
|
|
|
before_script:
|
2017-07-06 21:50:38 +00:00
|
|
|
- cd $QUAYDIR
|
|
|
|
- source $QUAYDIR/venv/bin/activate
|
2017-06-20 09:30:27 +00:00
|
|
|
coverage: /^TOTAL.*\s+(\d+\%)\s*$/
|
2017-06-13 03:55:12 +00:00
|
|
|
image: quay.io/quay/quay-ci:${CI_COMMIT_REF_SLUG}
|
2017-05-02 14:08:24 +00:00
|
|
|
script:
|
2017-06-13 03:55:12 +00:00
|
|
|
- sleep 30
|
|
|
|
- alembic upgrade head
|
|
|
|
- PYTHONPATH="." TEST="true" py.test --timeout=7200 --verbose --show-count ./ --color=no --ignore=endpoints/appr/test/ -x
|
|
|
|
services:
|
|
|
|
- mysql:latest
|
2017-07-28 11:23:31 +00:00
|
|
|
stage: tests
|
2017-06-13 03:55:12 +00:00
|
|
|
tags:
|
|
|
|
- kubernetes
|
2017-05-02 14:08:24 +00:00
|
|
|
variables:
|
2017-06-13 03:55:12 +00:00
|
|
|
GIT_STRATEGY: none
|
|
|
|
MYSQL_DATABASE: quay
|
|
|
|
MYSQL_PASSWORD: quay
|
|
|
|
MYSQL_ROOT_PASSWORD: quay
|
|
|
|
MYSQL_USER: quay
|
|
|
|
PYTHONPATH: .
|
2017-02-01 23:17:25 +00:00
|
|
|
QUAYDIR: /quay-registry
|
2017-05-02 14:08:24 +00:00
|
|
|
SKIP_DB_SCHEMA: 'true'
|
2017-06-13 03:55:12 +00:00
|
|
|
TEST: 'true'
|
|
|
|
TEST_DATABASE_URI: mysql+pymysql://quay:quay@localhost/quay
|
|
|
|
postgres:
|
|
|
|
before_script:
|
2017-07-06 21:50:38 +00:00
|
|
|
- cd $QUAYDIR
|
|
|
|
- source $QUAYDIR/venv/bin/activate
|
2017-06-20 09:30:27 +00:00
|
|
|
coverage: /^TOTAL.*\s+(\d+\%)\s*$/
|
2017-06-13 03:55:12 +00:00
|
|
|
image: quay.io/quay/quay-ci:${CI_COMMIT_REF_SLUG}
|
|
|
|
script:
|
|
|
|
- sleep 30
|
|
|
|
- alembic upgrade head
|
|
|
|
- PYTHONPATH="." TEST="true" py.test --timeout=7200 --verbose --show-count ./ --color=no --ignore=endpoints/appr/test/ -x
|
|
|
|
services:
|
|
|
|
- postgres:9.6
|
2017-07-28 11:23:31 +00:00
|
|
|
stage: tests
|
2017-06-13 03:55:12 +00:00
|
|
|
tags:
|
|
|
|
- kubernetes
|
|
|
|
variables:
|
|
|
|
GIT_STRATEGY: none
|
2017-05-02 14:08:24 +00:00
|
|
|
POSTGRES_PASSWORD: quay
|
|
|
|
POSTGRES_USER: quay
|
2017-06-13 03:55:12 +00:00
|
|
|
PYTHONPATH: .
|
2017-02-01 23:17:25 +00:00
|
|
|
QUAYDIR: /quay-registry
|
2017-06-13 03:55:12 +00:00
|
|
|
SKIP_DB_SCHEMA: 'true'
|
|
|
|
TEST: 'true'
|
|
|
|
TEST_DATABASE_URI: postgresql://quay:quay@localhost/quay
|
2017-07-28 11:23:31 +00:00
|
|
|
protractor_e2e:
|
|
|
|
allow_failure: true
|
|
|
|
before_script:
|
|
|
|
- cd $QUAYDIR
|
|
|
|
- source $QUAYDIR/venv/bin/activate
|
|
|
|
- curl -sL https://deb.nodesource.com/setup_8.x | bash -
|
|
|
|
- apt-get install -y nodejs
|
|
|
|
- ./node_modules/.bin/webdriver-manager update
|
|
|
|
image: quay.io/quay/quay-ci:${CI_COMMIT_REF_SLUG}
|
|
|
|
script:
|
|
|
|
- sleep 150
|
|
|
|
- yarn e2e
|
|
|
|
services:
|
|
|
|
- name: postgres:9.6
|
|
|
|
- alias: quay
|
|
|
|
name: quay.io/quay/quay-ci:${CI_COMMIT_REF_SLUG}
|
|
|
|
- alias: db-init
|
|
|
|
command:
|
|
|
|
- /bin/sh
|
|
|
|
- -c
|
|
|
|
- sleep 30&& /quay-registry/venv/bin/python initdb.py&& sleep 3600
|
|
|
|
name: quay.io/quay/quay-ci:${CI_COMMIT_REF_SLUG}
|
|
|
|
- selenium/standalone-chrome:3.4.0
|
|
|
|
stage: integration
|
|
|
|
tags:
|
|
|
|
- kubernetes
|
|
|
|
variables:
|
|
|
|
APP_HOST: http://localhost:80
|
|
|
|
DB_URI: postgresql://quay:quay@localhost/quay
|
|
|
|
GIT_STRATEGY: none
|
|
|
|
POSTGRES_PASSWORD: quay
|
|
|
|
POSTGRES_USER: quay
|
|
|
|
PYTHONPATH: .
|
|
|
|
QUAYDIR: /quay-registry
|
|
|
|
SKIP_DB_SCHEMA: 'true'
|
|
|
|
TEST: 'true'
|
|
|
|
TEST_DATABASE_URI: postgresql://quay:quay@localhost/quay
|
2017-06-13 03:55:12 +00:00
|
|
|
registry-tests:
|
|
|
|
before_script:
|
2017-07-06 21:50:38 +00:00
|
|
|
- cd $QUAYDIR
|
|
|
|
- source $QUAYDIR/venv/bin/activate
|
2017-06-20 09:30:27 +00:00
|
|
|
coverage: /^TOTAL.*\s+(\d+\%)\s*$/
|
2017-06-13 03:55:12 +00:00
|
|
|
image: quay.io/quay/quay-ci:${CI_COMMIT_REF_SLUG}
|
2017-05-02 14:08:24 +00:00
|
|
|
script:
|
2017-06-20 09:30:27 +00:00
|
|
|
- py.test --cov="." --cov-report=html --cov-report=term-missing --timeout=3600 --verbose -x --color=no --show-count ./test/registry_tests.py
|
2017-07-28 11:23:31 +00:00
|
|
|
stage: tests
|
2017-06-13 03:55:12 +00:00
|
|
|
tags:
|
|
|
|
- kubernetes
|
2017-05-02 14:08:24 +00:00
|
|
|
variables:
|
2017-05-30 21:06:09 +00:00
|
|
|
GIT_STRATEGY: none
|
2017-06-13 03:55:12 +00:00
|
|
|
PYTHONPATH: .
|
2017-02-01 23:17:25 +00:00
|
|
|
QUAYDIR: /quay-registry
|
2017-06-13 03:55:12 +00:00
|
|
|
TEST: 'true'
|
|
|
|
stages:
|
2017-07-16 23:24:31 +00:00
|
|
|
- docker_base
|
2017-07-28 11:04:28 +00:00
|
|
|
- docker_build
|
2017-07-19 22:34:08 +00:00
|
|
|
- deploy_preview
|
2017-07-28 11:23:31 +00:00
|
|
|
- integration
|
|
|
|
- tests
|
2017-06-13 03:55:12 +00:00
|
|
|
- docker_release
|
2017-07-19 22:34:08 +00:00
|
|
|
- deploy_staging
|
2017-06-13 03:55:12 +00:00
|
|
|
- teardown
|
2017-07-16 23:24:31 +00:00
|
|
|
stop-preview:
|
2017-07-19 22:34:08 +00:00
|
|
|
before_script: []
|
2017-07-16 23:24:31 +00:00
|
|
|
environment:
|
|
|
|
action: stop
|
|
|
|
name: review/${CI_COMMIT_REF_SLUG}
|
|
|
|
url: https://quay-${CI_COMMIT_REF_SLUG}.k8s.devtable.com
|
2017-07-20 13:15:20 +00:00
|
|
|
except:
|
|
|
|
- master
|
2017-07-16 23:24:31 +00:00
|
|
|
image: quay.io/appr/appr:kubectl
|
|
|
|
only:
|
|
|
|
- branches
|
|
|
|
script:
|
2017-07-19 22:34:08 +00:00
|
|
|
- kubectl delete ns $K8S_NAMESPACE
|
|
|
|
- kubectl get pods -o wide -n $K8S_NAMESPACE
|
|
|
|
stage: deploy_preview
|
2017-07-16 23:24:31 +00:00
|
|
|
tags:
|
|
|
|
- kubernetes
|
|
|
|
variables:
|
|
|
|
GIT_STRATEGY: none
|
2017-07-19 22:34:08 +00:00
|
|
|
K8S_NAMESPACE: ci-quay-${CI_COMMIT_REF_SLUG}
|
|
|
|
QUAY_DOMAIN: quay-${CI_COMMIT_REF_SLUG}.k8s.devtable.com
|
2017-07-16 23:24:31 +00:00
|
|
|
when: manual
|
2017-06-13 03:55:12 +00:00
|
|
|
unit-tests:
|
2017-06-20 09:30:27 +00:00
|
|
|
after_script:
|
|
|
|
- cp -r $QUAYDIR/htmlcov/ $CI_PROJECT_DIR/coverage
|
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- coverage
|
2017-06-13 03:55:12 +00:00
|
|
|
before_script:
|
2017-07-06 21:50:38 +00:00
|
|
|
- cd $QUAYDIR
|
|
|
|
- source $QUAYDIR/venv/bin/activate
|
2017-06-20 09:30:27 +00:00
|
|
|
coverage: /^TOTAL.*\s+(\d+\%)\s*$/
|
2017-06-13 03:55:12 +00:00
|
|
|
image: quay.io/quay/quay-ci:${CI_COMMIT_REF_SLUG}
|
2017-05-02 14:08:24 +00:00
|
|
|
script:
|
2017-06-20 09:30:27 +00:00
|
|
|
- py.test --cov="." --cov-report=html --cov-report=term-missing --timeout=3600 --verbose -x --color=no --show-count ./
|
2017-07-28 11:23:31 +00:00
|
|
|
stage: tests
|
2017-06-13 03:55:12 +00:00
|
|
|
tags:
|
|
|
|
- kubernetes
|
|
|
|
variables:
|
|
|
|
GIT_STRATEGY: none
|
|
|
|
PYTHONPATH: .
|
2017-02-01 23:17:25 +00:00
|
|
|
QUAYDIR: /quay-registry
|
2017-06-13 03:55:12 +00:00
|
|
|
TEST: 'true'
|
|
|
|
variables:
|
|
|
|
FAILFASTCI_NAMESPACE: quay
|