github.com/mattermost/mattermost-server/v6@v6.7.2/.gitlab-ci.yml (about)

     1  stages:
     2    - test
     3    - build
     4    - publish
     5    - create-vars
     6    - trigger-build-ee
     7  
     8  include:
     9    - project: mattermost/ci/mattermost-server
    10      ref: release-6.7
    11      file: private.yml
    12  
    13  variables:
    14    BUILD: "yes"
    15    IMAGE_BUILD_SERVER: $CI_REGISTRY/mattermost/ci/images/mattermost-build-server:20220415_golang-1.18.1
    16    IMAGE_BUILD_DOCKER: $CI_REGISTRY/mattermost/ci/images/mattermost-build-docker:19.03.14-1
    17    IMAGE_DIND: $CI_REGISTRY/mattermost/ci/images/docker-dind:19.03.14-1
    18  
    19  empty:
    20    stage: create-vars
    21    script:
    22      - echo "empty"
    23  
    24  .lint: # Commenting this job, because it is run in CircleCI
    25    image: $CI_REGISTRY/mattermost/ci/images/golangci-lint:v1.39.0-1
    26    stage: test
    27    script:
    28      - make config-reset
    29      - make check-style #todo MM_VET_OPENSPEC_PATH='$CI_PROJECT_DIR/mattermost-api-reference/v4/html/static/mattermost-openapi-v4.yaml'
    30    timeout: 60 mins
    31    rules:
    32      - if: '$CI_COMMIT_REF_NAME == "master"'
    33  
    34  .layers: # Commenting this job, because it is run in CircleCI
    35    image: $IMAGE_BUILD_SERVER
    36    stage: test
    37    script:
    38      - make store-layers
    39      - if [[ -n $(git status --porcelain) ]]; then echo "Please update the store layers using make store-layers"; exit 1; fi
    40      - git reset --hard
    41      - make app-layers
    42      - if [[ -n $(git status --porcelain) ]]; then echo "Please update the app layers using make app-layers"; exit 1; fi
    43      - git reset --hard
    44    rules:
    45      - if: '$CI_COMMIT_REF_NAME == "master"'
    46  
    47  .test-mysql: # Commenting this job, because it is run in CircleCI
    48    stage: test
    49    image: $IMAGE_BUILD_DOCKER
    50    services:
    51      - name: $IMAGE_DIND
    52        alias: docker
    53    variables:
    54      DOCKER_TLS_CERTDIR: ""
    55      DOCKER_HOST: tcp://docker:2375
    56      DOCKER_DRIVER: overlay2
    57      DOCKER_CONTENT_TRUST: 0
    58      DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE: ""
    59    before_script:
    60      - docker login ${CI_REGISTRY} --username ${CI_REGISTRY_USER} --password ${CI_REGISTRY_PASSWORD}
    61    script:
    62      - export COMPOSE_PROJECT_NAME="${CI_PIPELINE_IID}mysql"
    63      - export RACE_MODE=""
    64      - time cat .gitlab-ci/scripts/test/mysql.sh | /bin/bash
    65    artifacts:
    66      when: always
    67      reports:
    68        junit: report.xml
    69      paths:
    70        - build/logs
    71    timeout: 2 hours
    72    tags:
    73      - k8s-memory
    74    rules:
    75      - if: '$CI_COMMIT_REF_NAME == "master"'
    76  
    77  .test-postgres: # Commenting this job, because it is run in CircleCI
    78    stage: test
    79    image: $IMAGE_BUILD_DOCKER
    80    services:
    81      - name: $IMAGE_DIND
    82        alias: docker
    83    variables:
    84      DOCKER_TLS_CERTDIR: ""
    85      DOCKER_HOST: tcp://docker:2375
    86      DOCKER_DRIVER: overlay2
    87      DOCKER_CONTENT_TRUST: 0
    88      DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE: ""
    89    before_script:
    90      - docker login ${CI_REGISTRY} --username ${CI_REGISTRY_USER} --password ${CI_REGISTRY_PASSWORD}
    91    script:
    92      - export COMPOSE_PROJECT_NAME="${CI_PIPELINE_IID}postgres"
    93      - export RACE_MODE=""
    94      - time cat .gitlab-ci/scripts/test/postgres.sh | /bin/bash
    95    artifacts:
    96      when: always
    97      reports:
    98        junit: report.xml
    99      paths:
   100        - build/logs
   101    timeout: 2 hours
   102    tags:
   103      - k8s-memory
   104    rules:
   105      - if: '$CI_COMMIT_REF_NAME == "master"'
   106  
   107  test-schema-mysql:
   108    stage: test
   109    image: $IMAGE_BUILD_DOCKER
   110    services:
   111      - name: $IMAGE_DIND
   112        alias: docker
   113    variables:
   114      DOCKER_TLS_CERTDIR: ""
   115      DOCKER_HOST: tcp://docker:2375
   116      DOCKER_DRIVER: overlay2
   117      DOCKER_CONTENT_TRUST: 0
   118      DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE: ""
   119    before_script:
   120      - docker login ${CI_REGISTRY} --username ${CI_REGISTRY_USER} --password ${CI_REGISTRY_PASSWORD}
   121    script:
   122      - export COMPOSE_PROJECT_NAME="${CI_PIPELINE_IID}schemamysql"
   123      - time cat .gitlab-ci/scripts/test-schema/mysql.sh | /bin/bash
   124    artifacts:
   125      paths:
   126        - build/logs
   127    tags:
   128      - k8s-memory
   129    rules:
   130      - if: '$CI_COMMIT_REF_NAME == "master"'
   131      - if: '$CI_COMMIT_REF_NAME == "cloud"'
   132      - if: '$CI_COMMIT_REF_NAME =~ /^release-/'
   133  
   134  test-schema-postgres:
   135    stage: test
   136    image: $IMAGE_BUILD_DOCKER
   137    services:
   138      - name: $IMAGE_DIND
   139        alias: docker
   140    variables:
   141      DOCKER_TLS_CERTDIR: ""
   142      DOCKER_HOST: tcp://docker:2375
   143      DOCKER_DRIVER: overlay2
   144      DOCKER_CONTENT_TRUST: 0
   145      DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE: ""
   146    before_script:
   147      - docker login ${CI_REGISTRY} --username ${CI_REGISTRY_USER} --password ${CI_REGISTRY_PASSWORD}
   148    script:
   149      - export COMPOSE_PROJECT_NAME="${CI_PIPELINE_IID}schemapostgres"
   150      - time cat .gitlab-ci/scripts/test-schema/postgres.sh | /bin/bash
   151    artifacts:
   152      paths:
   153        - build/logs
   154    tags:
   155      - k8s-memory
   156    rules:
   157      - if: '$CI_COMMIT_REF_NAME == "master"'
   158      - if: '$CI_COMMIT_REF_NAME == "cloud"'
   159      - if: '$CI_COMMIT_REF_NAME =~ /^release-/'