From 7cc39a7c54d06bd62ff999464dcab53af329430f Mon Sep 17 00:00:00 2001 From: Antoine Legrand <2t.antoine@gmail.com> Date: Fri, 28 Jul 2017 13:04:28 +0200 Subject: [PATCH] Add Appr e2e --- .gitlab-ci.jsonnet | 22 +++++++++++++++++----- .gitlab-ci.yml | 38 +++++++++++++++++++++++++++++++++----- 2 files changed, 50 insertions(+), 10 deletions(-) diff --git a/.gitlab-ci.jsonnet b/.gitlab-ci.jsonnet index 1e019a38f..5decfc225 100644 --- a/.gitlab-ci.jsonnet +++ b/.gitlab-ci.jsonnet @@ -7,9 +7,10 @@ local baseJob = (import '.gitlab-ci/base_jobs.libsonnet')(vars); local stages_list = [ // gitlab-ci stages 'docker_base', - 'docker_build', 'integration', + 'docker_build', + 'deploy_preview', 'unit_tests', 'docker_release', @@ -109,17 +110,28 @@ local jobs = { services+: ["selenium/standalone-chrome:3.4.0"], before_script+: [ "curl -sL https://deb.nodesource.com/setup_8.x | bash -", - "apt-get update && apt-get install -y nodejs", + "apt-get install -y nodejs", + "./node_modules/.bin/webdriver-manager update", + "python initdb.py", ], script: [ "sleep 60", - "python initdb.py", - "sleep 30", - "./node_modules/.bin/webdriver-manager update", "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" + ] + }, + // Unit-tests with real databases local db_stage = { stage: stages.unit_tests }, local dbname = 'quay', diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f95638538..3a96dabdf 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,6 +1,35 @@ # Generated from .gitlab-ci.jsonnet # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN --- +appr_e2e: + before_script: + - cd $QUAYDIR + - source $QUAYDIR/venv/bin/activate + - sleep 30 + - alembic upgrade head + - 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 + image: quay.io/quay/quay-ci:${CI_COMMIT_REF_SLUG} + script: + - sleep 60 + - appr version localhost:80 + services: + - postgres:9.6 + - quay.io/quay/quay-ci:${CI_COMMIT_REF_SLUG} + stage: integration + tags: + - kubernetes + variables: + 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 container-base-build: before_script: - docker login -u $DOCKER_USER -p $DOCKER_PASS quay.io @@ -190,8 +219,8 @@ registry-tests: TEST: 'true' stages: - docker_base -- docker_build - integration +- docker_build - deploy_preview - unit_tests - docker_release @@ -249,13 +278,12 @@ yarn_e2e: - sleep 30 - alembic upgrade head - curl -sL https://deb.nodesource.com/setup_8.x | bash - - - apt-get update && apt-get install -y nodejs + - apt-get install -y nodejs + - ./node_modules/.bin/webdriver-manager update + - python initdb.py image: quay.io/quay/quay-ci:${CI_COMMIT_REF_SLUG} script: - sleep 60 - - python initdb.py - - sleep 30 - - ./node_modules/.bin/webdriver-manager update - yarn e2e services: - postgres:9.6