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

build-images.gitlab-ci.yml « ci « .gitlab - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 4ee15ccb311023bbb379a56a7e418b3521c7c352 (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
.base-image-build:
  extends: .use-kaniko
  variables:
    GIT_LFS_SKIP_SMUDGE: 1 # disable pulling objects from lfs
  retry: 2

.base-image-build-buildx:
  extends: .use-buildx
  variables:
    GIT_LFS_SKIP_SMUDGE: 1 # disable pulling objects from lfs
  retry: 2

# This image is used by:
# - The `review-qa-*` jobs
# - The `e2e:package-and-test` child pipeline test stage jobs
# See https://docs.gitlab.com/ee/development/testing_guide/end_to_end/index.html#testing-code-in-merge-requests for more details.
build-qa-image:
  extends:
    - .base-image-build-buildx
    - .build-images:rules:build-qa-image
  stage: build-images
  needs: []
  script:
    - run_timed_command "scripts/build_qa_image"

build-qa-image as-if-foss:
  extends:
    - build-qa-image
    - .as-if-foss
    - .build-images:rules:build-qa-image-as-if-foss

# Prepares an image with GDK configured based on code in master. This saves some time in MRs because some installation
# and complilation will have already been performed.
build-qa-on-gdk-master-image:
  extends:
    - .base-image-build-buildx
    - .build-images:rules:build-qa-on-gdk-master-image
  tags:
    - e2e
  stage: build-images
  needs: []
  variables:
    QA_GDK_IMAGE: "${CI_REGISTRY}/${CI_PROJECT_PATH}/gitlab-qa-gdk"
  before_script:
    - !reference [.use-buildx, before_script]
    - sysctl -n -w fs.inotify.max_user_watches=524288
  script:
    - |
      docker buildx build \
        --cache-to=type=inline \
        --cache-from ${QA_GDK_IMAGE}:master \
        --platform=${ARCH:-amd64} \
        --add-host gdk.test:127.0.0.1 \
        --tag ${QA_GDK_IMAGE}:master \
        --file="qa/gdk/Dockerfile" \
        --push \
        ${CI_PROJECT_DIR}

build-assets-image:
  extends:
    - .base-image-build
    - .build-images:rules:build-assets-image
  stage: build-images
  needs: ["compile-production-assets"]
  script:
    - skopeo login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
    - run_timed_command "scripts/build_assets_image"
  artifacts:
    expire_in: 7 days
    paths:
      # The `cached-assets-hash.txt` file is used in `review-build-cng-env` (`.gitlab/ci/review-apps/main.gitlab-ci.yml`)
      # to pass the assets image tag to the CNG downstream pipeline.
      - cached-assets-hash.txt