Skip to content
Snippets Groups Projects
Commit eb16d4cd authored by Andrew Kapuscinski's avatar Andrew Kapuscinski
Browse files

testing out the postgres service

parent 8bd349fe
No related branches found
No related tags found
1 merge request!98testing out the postgres service
Pipeline #672 passed
stages:
- build-base
- push-base
- run-schema
- build-dev
- unit-test-dev
- test-coverage
......@@ -13,6 +14,15 @@ stages:
variables:
PROJECT_NAME: "workspaces"
DEFAULT_DEPLOY_ENV: "dev"
# Postgres Service Variables
POSTGRES_DB: archive
POSTGRES_USER: "archive"
POSTGRES_PASSWORD: "docker"
# CI Postgres Service
services:
- name: marconi.aoc.nrao.edu/ops/ci/db:workspaces
alias: db
image: docker:19.03.12
......@@ -52,6 +62,19 @@ push base image:
changes:
- Dockerfile.base
# Run Schema
run schema:
stage: run-schema
image: ${REGISTRY_URL}/ops/base:${PROJECT_NAME}
script:
- export PGPASSWORD=$POSTGRES_PASSWORD
- cd schema && ./bin/run-migrations.sh "docker"
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
when: always
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
when: always
# Build Stages
build dev workflow:
stage: build-dev
......@@ -71,6 +94,7 @@ build dev notification:
SERVICE_NAME: "notification"
extends: .build
## Test Stages ##
.unit-test:
script:
......@@ -82,6 +106,7 @@ build dev notification:
when: always
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
when: always
# Unit Tests
unit test dev workflow:
stage: unit-test-dev
......@@ -117,6 +142,7 @@ unit test dev notification:
- build dev notification
# Generate Coverage reports
unit test coverage:
stage: test-coverage
image: python:3.8-slim
......@@ -135,6 +161,11 @@ unit test coverage:
- unit test dev workflow
- unit test dev capability
- unit test dev notification
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
when: always
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
when: always
# Push Stages
push dev workflow:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment