CI service command
This commit is contained in:
parent
7cc39a7c54
commit
f3ac04f799
3 changed files with 94 additions and 77 deletions
|
@ -7,12 +7,10 @@ local baseJob = (import '.gitlab-ci/base_jobs.libsonnet')(vars);
|
|||
local stages_list = [
|
||||
// gitlab-ci stages
|
||||
'docker_base',
|
||||
'integration',
|
||||
|
||||
'docker_build',
|
||||
|
||||
'deploy_preview',
|
||||
'unit_tests',
|
||||
'integration',
|
||||
'tests',
|
||||
'docker_release',
|
||||
'deploy_staging',
|
||||
'teardown',
|
||||
|
@ -26,6 +24,7 @@ local jobs = {
|
|||
local onlyMaster = {
|
||||
only: ['master', 'tags'],
|
||||
},
|
||||
|
||||
local onlyBranch = {
|
||||
only: ['branches'],
|
||||
except: ['master']
|
||||
|
@ -70,7 +69,7 @@ local jobs = {
|
|||
|
||||
// Unit-tests
|
||||
local unittest_stage = baseJob.QuayTest {
|
||||
stage: stages.unit_tests },
|
||||
stage: stages.tests },
|
||||
local pytest_cmd = 'py.test --cov="." --cov-report=html --cov-report=term-missing' +
|
||||
' --timeout=3600 --verbose -x --color=no --show-count ',
|
||||
'unit-tests': unittest_stage {
|
||||
|
@ -105,35 +104,34 @@ local jobs = {
|
|||
stage: stages.integration
|
||||
},
|
||||
|
||||
'yarn_e2e': integration_test {
|
||||
'protractor_e2e': integration_test {
|
||||
initDb:: true,
|
||||
variables+: {"APP_HOST": "http://localhost:80"},
|
||||
services+: ["selenium/standalone-chrome:3.4.0"],
|
||||
before_script+: [
|
||||
"curl -sL https://deb.nodesource.com/setup_8.x | bash -",
|
||||
"apt-get install -y nodejs",
|
||||
"./node_modules/.bin/webdriver-manager update",
|
||||
"python initdb.py",
|
||||
],
|
||||
script: [
|
||||
"sleep 60",
|
||||
allow_failure: true,
|
||||
script+: [
|
||||
"yarn e2e",
|
||||
]
|
||||
},
|
||||
|
||||
'appr_e2e': integration_test {
|
||||
before_script+: [
|
||||
"python initdb.py",
|
||||
"curl -L https://github.com/app-registry/appr/releases/download/v0.6.1/appr-linux-x64 -o /bin/appr",
|
||||
"chmod +x /bin/appr",
|
||||
],
|
||||
script: [
|
||||
"sleep 60",
|
||||
"appr version localhost:80"
|
||||
]
|
||||
initDb:: true,
|
||||
image: {name: "quay.io/appr/appr:kubectl"},
|
||||
before_script: [],
|
||||
script+: [
|
||||
"appr version localhost:80",
|
||||
"appr list localhost:80",
|
||||
],
|
||||
allow_failure: true,
|
||||
},
|
||||
|
||||
// Unit-tests with real databases
|
||||
local db_stage = { stage: stages.unit_tests },
|
||||
local db_stage = { stage: stages.tests },
|
||||
local dbname = 'quay',
|
||||
|
||||
postgres: db_stage + baseJob.dbTest('postgresql',
|
||||
|
|
Reference in a new issue