Add docker-cli e2e tests
This commit is contained in:
parent
f3ac04f799
commit
86f418a288
3 changed files with 68 additions and 4 deletions
|
@ -9,8 +9,8 @@ local stages_list = [
|
|||
'docker_base',
|
||||
'docker_build',
|
||||
'deploy_preview',
|
||||
'integration',
|
||||
'tests',
|
||||
'integration',
|
||||
'docker_release',
|
||||
'deploy_staging',
|
||||
'teardown',
|
||||
|
@ -107,7 +107,7 @@ local jobs = {
|
|||
'protractor_e2e': integration_test {
|
||||
initDb:: true,
|
||||
variables+: {"APP_HOST": "http://localhost:80"},
|
||||
services+: ["selenium/standalone-chrome:3.4.0"],
|
||||
services+: [{name: "selenium/standalone-chrome:3.4.0"}],
|
||||
before_script+: [
|
||||
"curl -sL https://deb.nodesource.com/setup_8.x | bash -",
|
||||
"apt-get install -y nodejs",
|
||||
|
@ -130,6 +130,26 @@ local jobs = {
|
|||
allow_failure: true,
|
||||
},
|
||||
|
||||
'docker_e2e': integration_test {
|
||||
initDb:: true,
|
||||
image: {name: "docker"},
|
||||
services+: [{name: "docker:dind"}],
|
||||
variables+: {
|
||||
DOCKER_DRIVER: "overlay2",
|
||||
DOCKER_HOST: "tcp://localhost:2375"
|
||||
},
|
||||
before_script: [],
|
||||
script+: [
|
||||
"docker login localhost:80 -u devtable -p password",
|
||||
"docker pull nginx",
|
||||
"docker tag nginx localhost:80/devtable/nginx",
|
||||
"docker push localhost:80/devtable/nginx",
|
||||
"sleep 1",
|
||||
"docker pull localhost:80/devtable/nginx",
|
||||
],
|
||||
allow_failure: true,
|
||||
},
|
||||
|
||||
// Unit-tests with real databases
|
||||
local db_stage = { stage: stages.tests },
|
||||
local dbname = 'quay',
|
||||
|
|
|
@ -31,6 +31,7 @@ appr_e2e:
|
|||
POSTGRES_USER: quay
|
||||
PYTHONPATH: .
|
||||
QUAYDIR: /quay-registry
|
||||
QUAY_OVERRIDE_CONFIG: '{"SERVER_HOSTNAME": "localhost:80"}'
|
||||
SKIP_DB_SCHEMA: 'true'
|
||||
TEST: 'true'
|
||||
TEST_DATABASE_URI: postgresql://quay:quay@localhost/quay
|
||||
|
@ -136,6 +137,47 @@ deploy-staging:
|
|||
variables:
|
||||
K8S_NAMESPACE: ci-staging
|
||||
QUAY_DOMAIN: quay-staging.k8s.devtable.com
|
||||
docker_e2e:
|
||||
allow_failure: true
|
||||
before_script: []
|
||||
image:
|
||||
name: docker
|
||||
script:
|
||||
- sleep 150
|
||||
- docker login localhost:80 -u devtable -p password
|
||||
- docker pull nginx
|
||||
- docker tag nginx localhost:80/devtable/nginx
|
||||
- docker push localhost:80/devtable/nginx
|
||||
- sleep 1
|
||||
- docker pull localhost:80/devtable/nginx
|
||||
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}
|
||||
- name: docker:dind
|
||||
stage: integration
|
||||
tags:
|
||||
- kubernetes
|
||||
variables:
|
||||
APP_HOST: localhost:80
|
||||
DB_URI: postgresql://quay:quay@localhost/quay
|
||||
DOCKER_DRIVER: overlay2
|
||||
DOCKER_HOST: tcp://localhost:2375
|
||||
GIT_STRATEGY: none
|
||||
POSTGRES_PASSWORD: quay
|
||||
POSTGRES_USER: quay
|
||||
PYTHONPATH: .
|
||||
QUAYDIR: /quay-registry
|
||||
QUAY_OVERRIDE_CONFIG: '{"SERVER_HOSTNAME": "localhost:80"}'
|
||||
SKIP_DB_SCHEMA: 'true'
|
||||
TEST: 'true'
|
||||
TEST_DATABASE_URI: postgresql://quay:quay@localhost/quay
|
||||
karma-tests:
|
||||
before_script:
|
||||
- cd $QUAYDIR
|
||||
|
@ -227,7 +269,7 @@ protractor_e2e:
|
|||
- -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
|
||||
- name: selenium/standalone-chrome:3.4.0
|
||||
stage: integration
|
||||
tags:
|
||||
- kubernetes
|
||||
|
@ -239,6 +281,7 @@ protractor_e2e:
|
|||
POSTGRES_USER: quay
|
||||
PYTHONPATH: .
|
||||
QUAYDIR: /quay-registry
|
||||
QUAY_OVERRIDE_CONFIG: '{"SERVER_HOSTNAME": "localhost:80"}'
|
||||
SKIP_DB_SCHEMA: 'true'
|
||||
TEST: 'true'
|
||||
TEST_DATABASE_URI: postgresql://quay:quay@localhost/quay
|
||||
|
@ -262,8 +305,8 @@ stages:
|
|||
- docker_base
|
||||
- docker_build
|
||||
- deploy_preview
|
||||
- integration
|
||||
- tests
|
||||
- integration
|
||||
- docker_release
|
||||
- deploy_staging
|
||||
- teardown
|
||||
|
|
|
@ -124,6 +124,7 @@ function(vars={})
|
|||
POSTGRES_USER: "quay",
|
||||
SKIP_DB_SCHEMA: 'true',
|
||||
TEST_DATABASE_URI: self['DB_URI'],
|
||||
QUAY_OVERRIDE_CONFIG: '' + {"SERVER_HOSTNAME": "localhost:80"},
|
||||
DB_URI: 'postgresql://quay:quay@localhost/quay'
|
||||
},
|
||||
},
|
||||
|
|
Reference in a new issue