This repository has been archived by the owner on Jul 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 153
/
.gitlab-ci.yml
73 lines (67 loc) · 1.81 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
stages:
- test
- publish
include:
project: mattermost/ci/mmctl
ref: master
file: private.yml
variables:
IMAGE_BUILD_MMCTL: $CI_REGISTRY/mattermost/ci/images/mattermost-build-server:20220415_golang-1.18.1
IMAGE_BUILD_SERVER: $CI_REGISTRY/mattermost/ci/images/mattermost-build-server:20220415_golang-1.18.1
docs:
stage: test
image: $IMAGE_BUILD_MMCTL
script:
- echo $CI_COMMIT_REF_NAME
- echo "Making sure docs are updated"
- make docs
- if [[ -n $(git status --porcelain) ]]; then echo "Please update the docs using make docs"; exit 1; fi
except:
- tags
# ToDo: govet is failing, needs fixing
# lint:
# stage: test
# image: docker.io/golangci/golangci-lint:v1.46.2
# script:
# - echo "Installing mattermost-govet"
# - GO111MODULE=off go get -u github.com/mattermost/mattermost-govet
# - make check
# except:
# - tags
.test-mysql:
stage: test
image: $CI_REGISTRY/mattermost/ci/images/mattermost-build-docker:19.03.14-1
services:
- name: $CI_REGISTRY/mattermost/ci/images/docker-dind:19.03.14-1
alias: docker
variables:
DOCKER_TLS_CERTDIR: ""
DOCKER_HOST: tcp://docker:2375
DOCKER_DRIVER: overlay2
DOCKER_CONTENT_TRUST: 0
DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE: ""
before_script:
- docker login ${CI_REGISTRY} --username ${CI_REGISTRY_USER} --password ${CI_REGISTRY_PASSWORD}
script:
- export COMPOSE_PROJECT_NAME="${CI_PIPELINE_IID}mysql"
- time cat .gitlab-ci/scripts/test/mysql.sh | /bin/bash
artifacts:
when: always
reports:
junit: report.xml
paths:
- scripts/logs
timeout: 2 hours
tags:
- k8s-memory
rules:
- if: '$CI_COMMIT_REF_NAME == "master"'
build:
stage: test
image: $IMAGE_BUILD_MMCTL
script:
- make package
artifacts:
paths:
- build
expire_in: 3 hours