Skip to content
Snippets Groups Projects
Select Git revision
  • 649b7e8774cf4d2227645bfea6fe4178fea61e9d
  • master default protected
  • kirovets_doc
  • ypodlesov/unite-projection
  • max/parse-anonymous-blocks
  • sd/constant
  • docs/server_setup
  • ekhamitov/union-types
  • docs/privileges
  • sd/2244-issue
  • raiondesu/1984-used-tier-memory
  • lomakin/adr-client-bucket-awareness
  • lomakin/insert-query-sharding-metadata
  • 25.4 protected
  • ekhamitov/1977-remove-additional-child
  • gmoshkin/box-error-improvements
  • astrochuk/explain-fix
  • dkoltsov/support-https
  • docs/config_storage
  • ekhamitov/2365-fix-flaky
  • kostja-check-quorum
  • 25.4.4 protected
  • 25.3.8 protected
  • 25.3.7 protected
  • 25.4.3 protected
  • 25.3.6 protected
  • 25.4.2 protected
  • 25.3.5 protected
  • 25.4.1 protected
  • 25.5.0 protected
  • 25.3.4 protected
  • 25.3.3 protected
  • 25.3.2 protected
  • 25.4.0 protected
  • 25.3.1 protected
  • 25.2.4 protected
  • 25.2.3 protected
  • 25.2.2 protected
  • 25.2.1 protected
  • 25.3.0 protected
  • 25.1.2 protected
41 results

.gitlab-ci.yml

Blame
  • .gitlab-ci.yml 29.93 KiB
    stages:
      - build-base-image
      - test
      - pack
      - sign
      - deploy
      - check-deployment
    
    workflow:
      # See https://docs.gitlab.com/ee/ci/jobs/job_control.html#avoid-duplicate-pipelines
      rules:
        # To avoid duplicate pipelines we disable merge request events,
        # leaving only pushes and manual triggering.
        - if: $CI_PIPELINE_SOURCE == "merge_request_event"
          when: never
        - if: $CI_PIPELINE_SOURCE == "push"
        - if: $CI_PIPELINE_SOURCE == "web"
    
    variables:
      REGISTRY: docker-public.binary.picodata.io
      BASE_IMAGE: ${REGISTRY}/picodata-build-base
      BASE_IMAGE_LATEST: latest
      MAIN_BRANCH: &main-branch master
      CARGO_HOME: /shared-storage/picodata/.cargo
      CACHE_PATHS: target .venv picodata-webui/node_modules
      CACHE_ARCHIVE: /shared-storage/picodata/cache-v2.tar
      # Helps to tolerate spurious network failures
      GET_SOURCES_ATTEMPTS: 3
      NO_CACHE:
        description: "Do not use cache during build phase"
    
    # job:rules explained:
    #
    # - if build-base changes on master branch (compared to HEAD~1)
    #     * build-base-image (with tag latest) and push
    #     * test (on base-image:latest)
    # - if build-base changes on development branch (compared to master)
    #     * build-base-image (with tag sha)
    #     * test (on base-image:sha)
    # - else (if build-base doesn't change)
    #     * skip build-base-image
    #     * just test (on base-image:latest)
    #
    # Anchor syntax explained here:
    # https://docs.gitlab.com/ee/ci/yaml/yaml_optimization.html
    #
    .rules:
      - &if-build-base-changes-on-master-branch
        if: $CI_COMMIT_BRANCH == $MAIN_BRANCH
        changes:
          # implies compare_to HEAD~1
          paths: &build-base-changes-paths
            - docker-build-base/**
            - .gitlab-ci.yml
    
      - &if-build-base-changes-on-dev-branch
        if: $CI_COMMIT_BRANCH != $MAIN_BRANCH
        changes:
          compare_to: *main-branch
          paths: *build-base-changes-paths
    
      - &else {}
    
    build-base-image:
      stage: build-base-image
      tags:
        - picodata-shell
      rules:
        - <<: *if-build-base-changes-on-master-branch
          variables: