Skip to content
Snippets Groups Projects
.gitlab-ci.yml 15.04 KiB
stages:
    - pull-db
    - build-packages
    - build
    - unit-test
    - test-coverage
    - push
    - push-packages
    - deploy-coverage-page
    - generate-go-yaml
    - go-trigger
    - deploy
    - .post

variables:
    # Gitlab optimization https://docs.gitlab.com/ee/ci/large_repositories/
    GIT_DEPTH: 10
    # Workspaces default variables
    PROJECT_NAME: "workspaces"
    DEPLOY_ENV: "dev"
    DL_HOST: https://dl-nrao.aoc.nrao.edu
    ENV_HOST: ws-dev.nrao.edu
    # Postgres Service Variables
    POSTGRES_DB: archive
    POSTGRES_USER: "archive"
    POSTGRES_PASSWORD: "docker"
    RELEASE_VERSION: 2.8.2.3rc1

image: docker:19.03.12

workflow:
  rules:
    - if: $CI_MERGE_REQUEST_TITLE =~ /^WIP:|^Draft:/
      when: never
    - if: $CI_MERGE_REQUEST_IID
    - if: $CI_COMMIT_TAG
    - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH || $CI_COMMIT_BRANCH =~ /(^[0-9](\.[0-9])*)-DEVELOPMENT/'

# Import Templates
include:
    - '/ci/build.template.yml'
    - '/ci/push.template.yml'
    - '/ci/cleanup.template.yml'
    - '/ci/unit-test.template.yml'
    - '/ci/package-build.template.yml'
    - '/ci/push-package.template.yml'


# Unit testing steps require a specific database image to be available; this step downloads it
pull db image:
    interruptible: true
    stage: pull-db
    script:
        - echo "$HARBOR_PASSWORD" | docker login --username "$HARBOR_USER" --password-stdin "$REGISTRY_URL"
        - docker pull ${REGISTRY_URL}/workspaces/db:workspaces

###############################################
# Build Python Packages
###############################################
build carta envoy:
  interruptible: true
  stage: build-packages
  variables:
    PACKAGE_PATH: "apps/cli/executables/pexable/carta_envoy"
  extends: .build-package

build casa envoy:
  interruptible: true
  stage: build-packages
  variables: