A GitLab stage groups jobs; it does not own a separate process environment. Put proxy variables on the jobs that need them, optionally through a reusable hidden template:

.proxy-environment:
  variables:
    HTTP_PROXY: "$CODE_PROXY"
    HTTPS_PROXY: "$CODE_PROXY"
    NO_PROXY: "localhost,127.0.0.1"

external_check:
  extends: .proxy-environment
  stage: test
  script:
    - python ci/check_external_service.py

CODE_PROXY is supplied through the project’s existing variable management. For jobs allowed to access public services through public proxies, its value can use an HTTP endpoint from the HTTP proxy list. The Python command is an illustrative project task. Other jobs can omit this template, and several jobs in the same stage can choose different environments.

Leave these proxy names out of top-level YAML defaults if they should not be inherited broadly. Also inspect project, group and pipeline variables: their precedence can override a job’s YAML value.

inherit:variables controls inheritance of YAML default variables. It does not erase project or group CI/CD variables, so it is not a general switch for removing every proxy source.

This configures the job process. The HTTP client launched inside it must support those variables, and the runner’s earlier image-pull connection has its own configuration.

འབྲེལ་བའི་རྩོམ་ཡིག