Skip to content
Snippets Groups Projects
.gitlab-ci.yml 1.25 KiB
Newer Older
default:
  image: registry.ubicast.net/mediaserver/envsetup

stages:
  - lint
  - docker
  - test-pf-std
  - test-pf-ha
  - test-pgsql
# * * * * * * * * * * * * *
lint:verify:
  stage: lint
    - make lint

# * * * * * * * * * * * * *
# Docker envsetup image build job
docker:image:
  image: docker:stable
  stage: docker
  rules:
Baptiste DE RENZO's avatar
Baptiste DE RENZO committed
    # Build docker image for schedule pipelines only
    - if: '$DOCKER_BUILD == "True"'
  before_script:
    - apk add bash make
    - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN registry.ubicast.net
  script:
    - make docker-build
    - make docker-push

# * * * * * * * * * * * * *
.test-template:
  retry: 2
  timeout: 4h
Baptiste DE RENZO's avatar
Baptiste DE RENZO committed
    # Run deployment for schedule pipelines
    - if: '$CI_PIPELINE_SOURCE == "schedule" && $PF_DEPLOY_TEST == "True"'
      when: always
Baptiste DE RENZO's avatar
Baptiste DE RENZO committed
    # Run deployment for manual pipelines
    - if: '$CI_PIPELINE_SOURCE == "web"'
      when: always
    - when: never
test:pf-std:
  extends: .test-template
  stage: test-pf-std
    - echo $CI_PIPELINE_SOURCE
    - make test pf-std=1
test:pf-ha:
  extends: .test-template
  stage: test-pf-ha
    - make test pf-ha=1
test:pgsql-ha:
  extends: .test-template
  stage: test-pgsql
    - make test pgsql-ha=1 debug=1