Welcome to mirror list, hosted at ThFree Co, Russian Federation.

.gitlab-ci.yml - gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 36bb7fd80229e6a934a58b001ba04f1fa125f4bb (plain)
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
image: registry.gitlab.com/gitlab-org/gitaly/build-ruby-2.3-golang-1.8-git-2.13:latest

stages:
  - build_images
  - build
  - test
  - publish

verify:
  stage: test
  script:
    - make verify

.build_template: &build_definition
  before_script:
    # Override gemfile config (for some reasong `config --delete` doesn't do it)
    - bundle config --local gemfile Gemfile
  stage: build
  cache:
    key: gems
    paths:
      - ruby/vendor/bundle
  script:
    - make
    - _support/test-boot-time .

.test_template: &test_definition
  before_script:
    - bundle config --local gemfile Gemfile
  stage: test
  cache:
    key: gems
    paths:
      - ruby/vendor/bundle
    policy: pull
  script:
    - go version
    - git version
    - make test

build:default:
  <<: *build_definition

test:default:
  <<: *test_definition

test:go1.8-git2.8:
  <<: *test_definition
  image: registry.gitlab.com/gitlab-org/gitaly/build-ruby-2.3-golang-1.8-git-2.8:latest

test:go1.8-git2.14:
  <<: *test_definition
  image: registry.gitlab.com/gitlab-org/gitaly/build-ruby-2.3-golang-1.8-git-2.14:latest

cover:
  stage: test
  script:
    - make cover
  after_script:
    - bash <(curl -s https://codecov.io/bash) -t "${CODECOV_TOKEN}" -f _build/cover/all.merged -F unittests
  artifacts:
    paths:
      - _build/cover/all.html
    expire_in: 1 week

# Create a code quality report
codequality:
  image: docker:latest
  stage: test
  variables:
    DOCKER_DRIVER: overlay
  services:
    - docker:dind
  script:
    - docker run --env CODECLIMATE_CODE="$PWD" --volume "$PWD":/code --volume /var/run/docker.sock:/var/run/docker.sock --volume /tmp/cc:/tmp/cc dev.gitlab.org:5005/gitlab/gitlab-build-images:gitlab-codeclimate analyze -f json > codeclimate.json
  artifacts:
    paths: [codeclimate.json]
    expire_in: 1 week
  allow_failure: true


.build_image: &build_image
  variables:
    DOCKER_DRIVER: overlay
  stage: build_images
  only:
   - schedules
  image: docker:latest
  services:
  - docker:dind
  script:
    - cp ruby/Gemfile ruby/Gemfile.lock _support/build-images/$CI_JOB_NAME/
    - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN registry.gitlab.com
    - docker build -t registry.gitlab.com/gitlab-org/gitaly/build-$CI_JOB_NAME:latest _support/build-images/$CI_JOB_NAME/
    - docker push registry.gitlab.com/gitlab-org/gitaly/build-$CI_JOB_NAME:latest

ruby-2.3-golang-1.8-git-2.8: *build_image
ruby-2.3-golang-1.8-git-2.13: *build_image
ruby-2.3-golang-1.8-git-2.14: *build_image

# Create a MR in GitLab-CE when releasing a Gitaly version
update-downstream-server-version:
  stage: publish
  only:
    - tags
  script:
    - ruby _support/update-downstream-server-version
  allow_failure: true

# Ensure that gitlab-git vendoring from gitlab-ce is functioning
test-vendor-gitaly-ruby:
  stage: test
  only:
   - schedules
  before_script:
    - DEBIAN_FRONTEND=noninteractive apt-get -q -y install rsync
  script:
    - _support/vendor-gitlab-git master
    - make test