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

preflight.gitlab-ci.yml « ci « .gitlab - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 729815fd338a3fc56bdd02d708dc9b53583ab771 (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
.preflight-job-base:
  stage: preflight
  extends:
    - .default-retry
  needs: []

.qa-preflight-job:
  image: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images/debian-bullseye-ruby-${RUBY_VERSION}:bundler-${BUNDLER_VERSION}-chrome-${CHROME_VERSION}-docker-${DOCKER_VERSION}
  extends:
    - .preflight-job-base
    - .qa-cache
  variables:
    USE_BUNDLE_INSTALL: "false"
    SETUP_DB: "false"
  before_script:
    - !reference [.default-before_script, before_script]
    - cd qa && bundle install

.rails-production-server-boot:
  extends:
    - .preflight-job-base
    - .default-before_script
    - .production
    - .ruby-cache
    - .preflight:rules:rails-production-server-boot
    - .use-pg13

# Test the puma configuration present in `config/puma.rb.example`
rails-production-server-boot-puma-example:
  extends:
    - .rails-production-server-boot
  script:
    - cp config/puma.rb.example config/puma.rb
    - sed --in-place "s:/home/git/gitlab:${PWD}:" config/puma.rb
    - echo 'bind "tcp://127.0.0.1:3000"' >> config/puma.rb
    - bundle exec puma --environment production --config config/puma.rb &
    - sleep 40  # See https://gitlab.com/gitlab-org/gitlab/-/merge_requests/114124#note_1309506358
    - retry_times_sleep 10 5 "curl http://127.0.0.1:3000"
    - kill $(jobs -p)

# Test the puma configuration present in
# https://gitlab.com/gitlab-org/build/CNG/-/raw/master/gitlab-webservice/configuration/puma.rb
rails-production-server-boot-puma-cng:
  extends:
    - .rails-production-server-boot
  script:
    - define_trigger_branch_in_build_env
    - echo "TRIGGER_BRANCH is defined as ${TRIGGER_BRANCH}"
    - curl --silent "https://gitlab.com/gitlab-org/build/CNG/-/raw/${TRIGGER_BRANCH}/gitlab-webservice/configuration/puma.rb" > config/puma.rb
    - sed --in-place "s:/srv/gitlab:${PWD}:" config/puma.rb
    - bundle exec puma --environment production --config config/puma.rb &
    - sleep 40  # See https://gitlab.com/gitlab-org/gitlab/-/merge_requests/114124#note_1309506358
    - retry_times_sleep 10 5 "curl http://127.0.0.1:8080"
    - kill $(jobs -p)

no-ee-check:
  extends:
    - .preflight-job-base
    - .preflight:rules:no-ee-check
  script:
    - scripts/no-dir-check ee

no-jh-check:
  extends:
    - .preflight-job-base
    - .preflight:rules:no-jh-check
  script:
    - scripts/no-dir-check jh

qa:selectors:
  extends:
    - .qa-preflight-job
    - .qa:rules:selectors
  script:
    - bundle exec bin/qa Test::Sanity::Selectors