.gitlab-ci.yml 15.7 KB
Newer Older
Kamil Trzciński's avatar
Kamil Trzciński committed
1
stages:
2
- prepare
3 4
- prebuild
- test
Tomasz Maczukin's avatar
Tomasz Maczukin committed
5
- coverage
Kamil Trzciński's avatar
Kamil Trzciński committed
6
- build
7
- package
8
- release
Alessio Caiazza's avatar
Alessio Caiazza committed
9
- cleanup
Kamil Trzciński's avatar
Kamil Trzciński committed
10

11
variables:
12
  CI_IMAGE: registry.gitlab.com/gitlab-org/gitlab-runner/ci:1.8.7-2
13
  GOROOT: /usr/local/go
14 15 16 17 18 19
  # Following variables are used in some jobs to install specified software
  DOCKER_MACHINE_VERSION: "0.14.0"
  DUMB_INIT_VERSION: "1.0.2"
  GIT_VERSION: "2.21.0"
  GIT_VERSION_BUILD: "1"
  GIT_LFS_VERSION: "2.7.1"
20

Alessio Caiazza's avatar
Alessio Caiazza committed
21 22 23
before_script:
  - unset GPG_KEY

24 25
image: $CI_IMAGE

26
# Skip all jobs except the ones that begin and end with 'docs'.
Alessio Caiazza's avatar
Alessio Caiazza committed
27 28 29 30
# Used for commits including ONLY documentation changes.
# https://docs.gitlab.com/ce/development/writing_documentation.html#testing
.except_docs: &except_docs
  except:
31
  - /(^docs[\/-].*|.*-docs$)/
Alessio Caiazza's avatar
Alessio Caiazza committed
32

33 34 35 36 37 38 39 40
.windows_base:
  variables: &windows_base_variables
    PKG_NAMESPACE: gitlab.com\gitlab-org
    PKG_NAME: gitlab-runner
    GOPATH: "$CI_PROJECT_DIR\\.gopath"
    PKG_BASE_DIR: "$CI_PROJECT_DIR\\.gopath\\src\\$PKG_NAMESPACE"
    PKG_BUILD_DIR: "$CI_PROJECT_DIR\\.gopath\\src\\$PKG_NAMESPACE\\$PKG_NAME"

41
.docker: &docker
Alessio Caiazza's avatar
Alessio Caiazza committed
42
  <<: *except_docs
43 44
  services:
  - docker:dind
45
  variables: &docker_variables
46
    CI_IMAGE: registry.gitlab.com/gitlab-org/gitlab-runner/ci:1.8.7-2
Tomasz Maczukin's avatar
Tomasz Maczukin committed
47
    DOCKER_DRIVER: overlay2
48
    DOCKER_HOST: tcp://docker:2375
49 50
  tags:
  - docker
51

52
.windows1803: &windows1803
53
  variables: &windows1803_variables
54
    <<: *windows_base_variables
55
    WINDOWS_VERSION: servercore1803
56 57 58 59 60
  tags:
  - windows-1803
  - shell

.windows1809: &windows1809
61
  variables: &windows1809_variables
62
    <<: *windows_base_variables
63
    WINDOWS_VERSION: servercore1809
64 65 66 67
  tags:
  - windows-1809
  - shell

68 69 70 71
#
# Prepare stage
#

72
.image_builder: &image_builder
73 74 75 76 77
  <<: *docker
  stage: prepare
  image: docker:git
  script:
  - source ./ci/build_ci_image
78 79 80 81

prepare ci image:
  <<: *image_builder
  variables:
Tomasz Maczukin's avatar
Tomasz Maczukin committed
82
    BUILD_IMAGE: $CI_IMAGE
83
    BUILD_DOCKERFILE: ./dockerfiles/ci/Dockerfile
84
  only:
85
  - /\Adocker-ci-image\/.*/
86

87 88 89 90 91 92 93 94
prepare alpine-no-root image:
  <<: *image_builder
  variables:
    BUILD_IMAGE: registry.gitlab.com/gitlab-org/gitlab-runner/alpine-no-root:latest
    BUILD_DOCKERFILE: ./tests/dockerfiles/alpine-no-root/Dockerfile
  only:
  - /\Adocker-alpine-no-root-image\/.*/

95 96 97 98
#
# Prebuild stage
#

Alessio Caiazza's avatar
Alessio Caiazza committed
99
helper images:
100 101 102
  <<: *docker
  stage: prebuild
  script:
103
  - make helper-build helper-docker
104 105
  artifacts:
    paths:
Alessio Caiazza's avatar
Alessio Caiazza committed
106
    - out/helper-images/
107
    - dockerfiles/build/binaries/*-windows.exe
Alessio Caiazza's avatar
Alessio Caiazza committed
108 109
    - .gopath/bin
    - .gopath/.ok
110 111
    expire_in: 7d

112
clone test repo:
Alessio Caiazza's avatar
Alessio Caiazza committed
113
  <<: *except_docs
114 115 116 117
  stage: prebuild
  script:
  - mkdir tmp
  - succeed=0
118
  - for i in {1..3}; do git clone https://gitlab.com/gitlab-org/ci-cd/tests/gitlab-test.git tmp/gitlab-test && succeed=1 && break; echo "retrying"; done
119 120 121 122 123 124
  - '[[ "$succeed" -eq 1 ]]'
  artifacts:
    paths:
    - tmp/gitlab-test
    expire_in: 7d

125 126 127 128
# Review docs base
.review-docs: &review-docs
  image: ruby:2.4-alpine
  before_script:
Alessio Caiazza's avatar
Alessio Caiazza committed
129
    - unset GPG_KEY
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151
    - gem install gitlab --no-doc
    # We need to download the script rather than clone the repo since the
    # review-docs-cleanup job will not be able to run when the branch gets
    # deleted (when merging the MR).
    - apk add --update openssl
    - wget https://gitlab.com/gitlab-org/gitlab-ce/raw/master/scripts/trigger-build-docs
    - chmod 755 trigger-build-docs
  cache: {}
  dependencies: []
  variables:
    GIT_STRATEGY: none
  when: manual
  only:
    - branches

# Trigger a docs build in gitlab-docs
# Useful to preview the docs changes live
# https://docs.gitlab.com/ee/development/writing_documentation.html#previewing-the-changes-live
review-docs-deploy:
  <<: *review-docs
  stage: prebuild
  environment:
Achilleas Pipinellis's avatar
Achilleas Pipinellis committed
152
    name: review-docs/$CI_COMMIT_REF_SLUG
153 154
    # DOCS_REVIEW_APPS_DOMAIN and DOCS_GITLAB_REPO_SUFFIX are secret variables
    # Discussion: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/14236/diffs#note_40140693
Achilleas Pipinellis's avatar
Achilleas Pipinellis committed
155
    url: http://$CI_ENVIRONMENT_SLUG.$DOCS_REVIEW_APPS_DOMAIN/$DOCS_GITLAB_REPO_SUFFIX
156 157 158 159 160 161 162 163 164
    on_stop: review-docs-cleanup
  script:
    - ./trigger-build-docs deploy

# Cleanup remote environment of gitlab-docs
review-docs-cleanup:
  <<: *review-docs
  stage: cleanup
  environment:
Achilleas Pipinellis's avatar
Achilleas Pipinellis committed
165
    name: review-docs/$CI_COMMIT_REF_SLUG
166 167 168 169
    action: stop
  script:
    - ./trigger-build-docs cleanup

Tomasz Maczukin's avatar
Tomasz Maczukin committed
170
tests definitions:
171
  <<: *except_docs
Tomasz Maczukin's avatar
Tomasz Maczukin committed
172 173 174 175 176 177 178 179 180 181 182 183 184 185
  stage: prebuild
  # Using Go 1.10, because the `go test -list` is unavailable in <1.9
  # and it's much faster in 1.10. And since there is no real test execution
  # in this step, the version difference doesn't matter
  image: golang:1.10
  script:
  - apt update
  - apt install make
  - source ci/touch_make_dependencies
  - make parallel_test_prepare
  artifacts:
    paths:
    - testsdefinitions.txt
    expire_in: 7d
186 187
  tags:
  - gitlab-org
Tomasz Maczukin's avatar
Tomasz Maczukin committed
188

Tomasz Maczukin's avatar
Tomasz Maczukin committed
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207
dep check:
  <<: *except_docs
  stage: prebuild
  cache: {}
  dependencies:
  script:
  - make dep_check

dep status:
  <<: *except_docs
  stage: prebuild
  cache: {}
  dependencies:
  script:
  - make dep_status
  only:
    variables:
    - $CI_DEP_STATUS_ENABLED

208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223
check feature flags docs:
  stage: prebuild
  cache: {}
  dependencies:
  script:
  - cp docs/configuration/feature-flags.md docs/configuration/feature-flags.md.orig
  - make update_feature_flags_docs
  - |
    diff docs/configuration/feature-flags.md.orig docs/configuration/feature-flags.md || (
      echo
      echo "Feature Flags list in documentation is not up-to-date"
      echo "Run 'make update_feature_flags_docs' to upate it"
      echo
      exit 1
    )

224 225 226 227
#
# Test stage
#

Alessio Caiazza's avatar
Alessio Caiazza committed
228
code_quality:
Alessio Caiazza's avatar
Alessio Caiazza committed
229
  <<: *except_docs
230
  stage: test
231 232 233 234 235
  image: docker:git
  services:
    - docker:dind
  variables:
    DOCKER_DRIVER: overlay2
236
    CODECLIMATE_FORMAT: json
237 238
  cache: {}
  dependencies: []
239
  script:
Alessio Caiazza's avatar
Alessio Caiazza committed
240
    - ./scripts/codequality analyze -f json --dev | tee gl-code-quality-report.json
241
  artifacts:
Alessio Caiazza's avatar
Alessio Caiazza committed
242
    paths: [gl-code-quality-report.json]
Tomasz Maczukin's avatar
Tomasz Maczukin committed
243
    expire_in: 7d
244

245
unit test: &unit_tests
Alessio Caiazza's avatar
Alessio Caiazza committed
246
  <<: *docker
247
  stage: test
248
  parallel: 5
249 250 251 252
  variables:
    <<: *docker_variables
    GIT_LFS_256_CHECKSUM: 7be85238cbbb957ab25de52b60279d40ba40d3faa72eeb2cb9fa77d6d92381e5
  before_script:
253 254 255 256 257
    # This' script content as well as the definition of GIT_LFS_256_CHECKSUM should be moved to
    # "prepare ci image". Git LFS should be installed inside of the CI image. Unfortunately, building
    # this image is currently blocked because of https://gitlab.com/gitlab-org/gitlab-runner/issues/3946.
    # After we will resolve this issue, we should update the CI configuration and move the Git LFS installation
    # to the proper place.
258
    - ./ci/install_git_lfs
259
  script:
Alessio Caiazza's avatar
Alessio Caiazza committed
260
    - source ci/touch_make_dependencies
Tomasz Maczukin's avatar
Tomasz Maczukin committed
261 262 263 264 265 266 267
    - make parallel_test_execute
  artifacts:
    paths:
      - .cover/*
      - .testoutput/*
    when: always
    expire_in: 7d
268

269
unit test with race:
270
  <<: *unit_tests
271
  allow_failure: true
Tomasz Maczukin's avatar
Tomasz Maczukin committed
272 273
  variables:
    <<: *docker_variables
274
    GIT_LFS_256_CHECKSUM: 7be85238cbbb957ab25de52b60279d40ba40d3faa72eeb2cb9fa77d6d92381e5
Tomasz Maczukin's avatar
Tomasz Maczukin committed
275 276 277
    CGO_ENABLED: "1"
    TESTFLAGS: "-cover -race"

Achilleas Pipinellis's avatar
Achilleas Pipinellis committed
278 279 280 281 282 283 284 285 286 287 288 289 290 291
docs check links:
  image: "registry.gitlab.com/gitlab-org/gitlab-build-images:gitlab-docs-lint"
  stage: test
  cache: {}
  dependencies: []
  before_script:
    - unset GPG_KEY
  script:
    - mv docs/ /tmp/gitlab-docs/content/$DOCS_GITLAB_REPO_SUFFIX
    - cd /tmp/gitlab-docs
    # Build HTML from Markdown
    - bundle exec nanoc
    # Check the internal links
    - bundle exec nanoc check internal_links
292 293
    # Check the internal anchor links
    - bundle exec nanoc check internal_anchors
294

295 296
.windows test:
  extends: .except_docs
297
  stage: test
298
  parallel: 3
299 300
  variables:
    GOROOT: "C:\\Go"
301
  before_script:
302 303 304 305
  - if (Test-Path $GOPATH) { Remove-Item -Force -Recurse $GOPATH }
  - New-Item $PKG_BASE_DIR -ItemType directory -Force
  - New-Item -ItemType SymbolicLink -Path $PKG_BUILD_DIR -Value $CI_PROJECT_DIR
  - cd $PKG_BUILD_DIR
306
  script:
307
  - .\ci\test_windows.ps1
308 309
  after_script:
  - if (Test-Path $PKG_BUILD_DIR) { $(Get-Item $PKG_BUILD_DIR).Delete() }
310
  allow_failure: true
311
  only:
312
  - /.*/@gitlab-org/gitlab-runner
313 314

windows 1803 tests:
315
  <<: *windows1803
316 317 318
  extends: .windows test

windows 1809 tests:
319
  <<: *windows1809
320
  extends: .windows test
321

322
git 1.7.1:
323
  <<: *except_docs
324 325 326 327 328 329
  image: centos:6
  stage: test
  variables:
    GOROOT: /usr/local/go
    GOPATH: /go
    CGO_ENABLED: 0
330 331
    OUR_PACKAGES: gitlab.com/gitlab-org/gitlab-runner/executors/shell gitlab.com/gitlab-org/gitlab-runner/shells
  before_script:
Alessio Caiazza's avatar
Alessio Caiazza committed
332
    - unset GPG_KEY
333
    - yum install -y -q git && git version
334
    - curl https://storage.googleapis.com/golang/go1.8.7.linux-amd64.tar.gz | tar zx -C $(dirname "$GOROOT")
335 336
    - export PATH=${GOROOT}/bin:$PATH
    - source ci/touch_make_dependencies
337 338
  script:
    - make test
339

Tomasz Maczukin's avatar
Tomasz Maczukin committed
340 341 342 343
#
# Coverage stage
#

344
.coverage_job: &coverage_job
345
  <<: *except_docs
Tomasz Maczukin's avatar
Tomasz Maczukin committed
346 347
  stage: coverage
  image: golang:1.10
Tomasz Maczukin's avatar
Tomasz Maczukin committed
348
  when: always
349

350
test coverage report:
351
  <<: *coverage_job
Tomasz Maczukin's avatar
Tomasz Maczukin committed
352 353 354 355 356 357 358 359 360 361 362
  coverage: /regular total:\s+\(statements\)\s+\d+.\d+\%/
  script:
    - source ci/touch_make_dependencies
    - make parallel_test_coverage_report
    - make parallel_test_coverage_report TESTFLAGS="-cover -race"
  artifacts:
    paths:
      - out/coverage/*
    expire_in: 7d

race conditions detector:
363
  <<: *coverage_job
Tomasz Maczukin's avatar
Tomasz Maczukin committed
364 365 366 367
  script:
  - source ci/touch_make_dependencies
  - make check_race_conditions

368 369
test junit report:
  <<: *coverage_job
370
  image: $CI_IMAGE
371 372 373 374 375 376 377
  script:
  - source ci/touch_make_dependencies
  - make parallel_test_junit_report
  artifacts:
    reports:
      junit: out/junit/report.xml

378 379 380 381
#
# Build stage
#

Tomasz Maczukin's avatar
Tomasz Maczukin committed
382
.binaries: &binaries
Alessio Caiazza's avatar
Alessio Caiazza committed
383
  <<: *except_docs
Kamil Trzciński's avatar
Kamil Trzciński committed
384
  stage: build
Kamil Trzciński's avatar
Kamil Trzciński committed
385
  script:
Tomasz Maczukin's avatar
Tomasz Maczukin committed
386
  - source ci/touch_make_dependencies
Tomasz Maczukin's avatar
Tomasz Maczukin committed
387 388
  - export platforms=$(echo $CI_JOB_NAME | sed 's|binaries ||')
  - make build BUILD_PLATFORMS="-osarch='$platforms'"
389 390 391 392
  artifacts:
    paths:
    - out/binaries/
    expire_in: 7d
393
  tags:
394
  - gitlab-org
395

Tomasz Maczukin's avatar
Tomasz Maczukin committed
396 397 398 399 400
binaries darwin/386 darwin/amd64: *binaries
binaries freebsd/386 freebsd/amd64 freebsd/arm: *binaries
binaries linux/386 linux/amd64 linux/arm: *binaries
binaries windows/386 windows/amd64: *binaries

401 402 403 404
#
# Package stage
#

Tomasz Maczukin's avatar
Tomasz Maczukin committed
405
.packages: &packages
Alessio Caiazza's avatar
Alessio Caiazza committed
406
  <<: *except_docs
407
  stage: package
Alessio Caiazza's avatar
Alessio Caiazza committed
408
  before_script:
Alessio Caiazza's avatar
Alessio Caiazza committed
409 410
  - |
    # checking GPG signing support
Alessio Caiazza's avatar
Alessio Caiazza committed
411 412 413 414
    if [ -n "$GPG_KEY" ]; then
      echo "$GPG_KEY" | gpg --batch --no-tty --allow-secret-key-import --import -
      unset GPG_KEY
      export GPG_KEYID=$(gpg --with-colon --list-secret-keys | head -n1 | cut -d : -f 5)
Alessio Caiazza's avatar
Alessio Caiazza committed
415 416 417
    else
      echo -e "\033[0;31m****** GPG signing disabled ******\033[0m"
    fi
Alessio Caiazza's avatar
Alessio Caiazza committed
418
  script:
Tomasz Maczukin's avatar
Tomasz Maczukin committed
419
  - source ci/touch_make_dependencies
Tomasz Maczukin's avatar
Tomasz Maczukin committed
420
  - make ${CI_JOB_NAME}
421 422 423 424 425
  artifacts:
    paths:
    - out/deb/
    - out/rpm/
    expire_in: 7d
426
  tags:
427
  - gitlab-org
428

Tomasz Maczukin's avatar
Tomasz Maczukin committed
429 430 431
package-deb: *packages
package-rpm: *packages

432 433 434 435
#
# Release stage
#

436
.release_docker_images: &release_docker_images
Tomasz Maczukin's avatar
Tomasz Maczukin committed
437
  <<: *docker
438
  stage: release
439 440 441 442
  variables: &release_docker_images_variables
    <<: *docker_variables
    PUBLISH_IMAGES: "true"
    PUSH_TO_DOCKER_HUB: "true"
443
    DOCKER_MACHINE_CHECKSUM: "a4c69bffb78d3cfe103b89dae61c3ea11cc2d1a91c4ff86e630c9ae88244db02"
444
    DUMB_INIT_CHECKSUM: "a8defac40aaca2ca0896c7c5adbc241af60c7c3df470c1a4c469a860bd805429"
Heiko Voigt's avatar
Heiko Voigt committed
445 446 447
    GIT_LFS_VERSION: "2.7.1"
    GIT_LFS_CHECKSUM: "c8952ee72af214e3669f834d829e8a0a3becd160dead18237f99e40d75a3e920"

Tomasz Maczukin's avatar
Tomasz Maczukin committed
448
  script:
449
  - source ci/touch_make_dependencies
450 451 452 453
  - make release_docker_images
  tags:
  - release

454 455 456 457 458 459 460 461 462 463 464 465 466
.build_windows_docker_images:
  <<: *except_docs
  stage: release
  variables:
    PUSH_TO_DOCKER_HUB: "false"
    GIT_256_CHECKSUM: "bd91db55bd95eaa80687df28877e2df8c8858a0266e9c67331cfddba2735f25c"
    GIT_LFS_256_CHECKSUM: "5c12db9728b53cba23e5f58f4a53d88cb2132e82fa1de0f8a79ce9d112e4d396"
  before_script:
  - if (Test-Path env:GPG_KEY) { Remove-Item Env:GPG_KEY }
  script:
  - .\ci\build_release_windows_images.ps1


Tomasz Maczukin's avatar
Tomasz Maczukin committed
467
.release: &release
468
  <<: *except_docs
469
  stage: release
470
  before_script:
Alessio Caiazza's avatar
Alessio Caiazza committed
471
  - unset GPG_KEY
Tomasz Maczukin's avatar
Tomasz Maczukin committed
472 473 474 475
  - source ci/touch_make_dependencies
  tags:
  - release

476 477 478 479
.release_s3: &release_s3
  <<: *release
  script:
  - make release_s3
480 481 482 483 484 485 486
  - |
    # publish release on gitlab.com
    if [[ -n "${CI_COMMIT_TAG}" ]]; then
      ./ci/release_gitlab
    else
      echo -e "\033[0;31m****** gitlab publishing disabled ******\033[0m"
    fi
487 488

.release_packagecloud: &release_packagecloud
Tomasz Maczukin's avatar
Tomasz Maczukin committed
489
  <<: *release
490 491 492 493
  script:
  - make release_packagecloud

.release_development: &release_development
494
  only:
495
  - branches@gitlab-org/gitlab-runner
496
  except:
497
  - master@gitlab-org/gitlab-runner
Alessio Caiazza's avatar
Alessio Caiazza committed
498
  - /(^docs[\/-].*|.*-docs$)/
Kamil Trzciński's avatar
Kamil Trzciński committed
499

500
.release_bleeding_edge: &release_bleeding_edge
Kamil Trzciński's avatar
Kamil Trzciński committed
501
  only:
502
  - master@gitlab-org/gitlab-runner
503
  - /\Av[0-9]+\.[0-9]+\.[0-9]+-rc[0-9]+\Z/@gitlab-org/gitlab-runner
Kamil Trzciński's avatar
Kamil Trzciński committed
504

505
.release_stable: &release_stable
Kamil Trzciński's avatar
Kamil Trzciński committed
506
  only:
507
  - /\Av[0-9]+\.[0-9]+\.[0-9]+\Z/@gitlab-org/gitlab-runner
508 509 510 511

development S3:
  <<: *release_s3
  <<: *release_development
512 513
  environment:
    name: development/s3/${CI_COMMIT_REF_NAME}
514
    url: https://gitlab-runner-downloads.s3.amazonaws.com/${CI_COMMIT_REF_NAME}/index.html
515

516 517 518 519 520 521 522 523 524 525
development docker images:
  <<: *release_docker_images
  variables:
    <<: *release_docker_images_variables
    PUBLISH_IMAGES: "false"
    PUSH_TO_DOCKER_HUB: "false"
  only:
  - branches
  except:
  - master
526
  - /(^docs[\/-].*|.*-docs$)/
527 528 529
  tags:
  - docker

530
development servercore1803 helper docker image:
531 532 533 534
  <<: *release_development
  <<: *windows1803
  extends: .build_windows_docker_images

535
development servercore1809 helper docker image:
536 537 538 539
  <<: *release_development
  <<: *windows1809
  extends: .build_windows_docker_images

540 541 542
bleeding edge S3:
  <<: *release_s3
  <<: *release_bleeding_edge
543 544
  environment:
    name: bleeding_edge/s3
545
    url: https://gitlab-runner-downloads.s3.amazonaws.com/${CI_COMMIT_REF_NAME}/index.html
546 547 548 549

bleeding edge packagecloud:
  <<: *release_packagecloud
  <<: *release_bleeding_edge
550 551 552 553 554 555 556 557 558 559
  environment:
    name: bleeding_edge/packagecloud
    url: https://packages.gitlab.com/runner/unstable

bleeding edge docker images:
  <<: *release_docker_images
  <<: *release_bleeding_edge
  environment:
    name: bleeding_edge/docker_images
    url: https://hub.docker.com/r/gitlab/gitlab-runner/tags/
560

561
bleeding edge servercore1803 docker images:
562 563 564 565
  <<: *release_bleeding_edge
  <<: *windows1803
  extends: .build_windows_docker_images
  variables:
566
    <<: *windows1803_variables
567 568 569 570 571
    PUSH_TO_DOCKER_HUB: "true"
  environment:
    name: bleeding_edge/docker_images/windows1803
    url: https://hub.docker.com/r/gitlab/gitlab-runner/tags/

572
bleeding edge servercore1809 docker images:
573 574 575 576
  <<: *release_bleeding_edge
  <<: *windows1809
  extends: .build_windows_docker_images
  variables:
577
    <<: *windows1809_variables
578 579 580 581 582
    PUSH_TO_DOCKER_HUB: "true"
  environment:
    name: bleeding_edge/docker_images/windows1809
    url: https://hub.docker.com/r/gitlab/gitlab-runner/tags/

583 584
stable S3:
  <<: *release_s3
585
  <<: *release_stable
586 587
  environment:
    name: stable/s3
588
    url: https://gitlab-runner-downloads.s3.amazonaws.com/${CI_COMMIT_REF_NAME}/index.html
589 590 591

stable packagecloud:
  <<: *release_packagecloud
592
  <<: *release_stable
593 594
  environment:
    name: stable/packagecloud
595
    url: https://packages.gitlab.com/runner/gitlab-runner
596 597 598 599 600

stable docker images:
  <<: *release_docker_images
  <<: *release_stable
  environment:
Tomasz Maczukin's avatar
Tomasz Maczukin committed
601 602
    name: stable/docker_images
    url: https://hub.docker.com/r/gitlab/gitlab-runner/tags/
603

604
stable servercore1803 docker images:
605 606 607 608
  <<: *release_stable
  <<: *windows1803
  extends: .build_windows_docker_images
  variables:
609
    <<: *windows1803_variables
610 611 612 613 614
    PUSH_TO_DOCKER_HUB: "true"
  environment:
    name: stable/docker_images/windows1803
    url: https://hub.docker.com/r/gitlab/gitlab-runner/tags/

615
stable servercore1809 docker images:
616 617 618 619
  <<: *release_stable
  <<: *windows1809
  extends: .build_windows_docker_images
  variables:
620
    <<: *windows1809_variables
621 622 623 624 625
    PUSH_TO_DOCKER_HUB: "true"
  environment:
    name: stable/docker_images/windows1809
    url: https://hub.docker.com/r/gitlab/gitlab-runner/tags/

626 627 628 629 630 631 632 633 634 635 636 637 638
static QA:
  <<: *except_docs
  stage: release
  image: alpine:3.7
  cache: {}
  dependencies:
  - code_quality
  script: |
    if [ "$(cat gl-code-quality-report.json)" != "[]" ] ; then
      apk add -U --no-cache jq > /dev/null
      jq -C . gl-code-quality-report.json
      exit 1
    fi