From 8cf142ae5a97f56e192ed7530ac559e677bc0f19 Mon Sep 17 00:00:00 2001 From: Markus Scheidgen <markus.scheidgen@gmail.com> Date: Thu, 6 Dec 2018 10:48:47 +0100 Subject: [PATCH] Added rawapi bits to CI/CD. --- .gitlab-ci.yml | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a74043e757..98bc0dd0b4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -21,6 +21,8 @@ variables: RELEASE_IMAGE: gitlab-registry.mpcdf.mpg.de/nomad-lab/nomad-fair:latest FRONTEND_TEST_IMAGE: gitlab-registry.mpcdf.mpg.de/nomad-lab/nomad-fair/frontend:test FRONTEND_RELEASE_IMAGE: gitlab-registry.mpcdf.mpg.de/nomad-lab/nomad-fair/frontend:latest + RAWAPI_TEST_IMAGE: gitlab-registry.mpcdf.mpg.de/nomad-lab/nomad-fair/rawapi:test + RAWAPI_RELEASE_IMAGE: gitlab-registry.mpcdf.mpg.de/nomad-lab/nomad-fair/rawapi:latest build: stage: build @@ -45,6 +47,16 @@ buildgui: - /^dev-.*$/ +buildrawapi: + stage: build + script: + - docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN gitlab-registry.mpcdf.mpg.de + - docker build -t $RAWAPI_TEST_IMAGE . + - docker push $RAWAPI_TEST_IMAGE + except: + - /^dev-.*$/ + + linting: stage: test image: $TEST_IMAGE @@ -88,6 +100,15 @@ tests: except: - /^dev-.*$/ +rawapitests: + stage: test + image: $RAWAPI_TEST_IMAGE + script: + - cd /app + - python -m pytest -sv tests/test_api.py::TestRaw + except: + - /^dev-.*$/ + # does currently not work, current GitLab CI runner does not network services with each other # integration-tests: # stage: integration @@ -137,8 +158,9 @@ release: - docker pull $FRONTEND_TEST_IMAGE - docker tag $FRONTEND_TEST_IMAGE $FRONTEND_RELEASE_IMAGE - docker push $FRONTEND_RELEASE_IMAGE - only: - - master + except: + - /^dev-.*$/ + when: manual deploy: stage: deploy @@ -150,6 +172,6 @@ deploy: - cp /nomad/config/.env . - docker-compose -f docker-compose.yml -f docker-compose.prod.yml build - docker-compose -f docker-compose.yml -f docker-compose.prod.yml up --no-deps -d api worker gui - only: - - master + except: + - /^dev-.*$/ when: manual -- GitLab