This page contains information related to upcoming products, features, and functionality. It is important to note that the information presented is for informational purposes only. Please do not rely on this information for purchasing or planning purposes. The development, release, and timing of any products, features, or functionality may be subject to change or delay and remain at the sole discretion of GitLab Inc.
Status Authors Coach DRIs Owning Stage Created
proposed devops verify -

단계 정의에 대한 구문 설탕 확장

단계 정의는 지원되어야 하는 최소한의 구문을 설명합니다. 공통 워크플로우를 지원하기 위해 다음과 같은 구문 설탕을 사용하여 해당 문서의 여러 부분을 확장합니다.

단계 참조를 위한 구문 설탕

각 구문 설탕 확장은 간단한 단계 참조로 변환됩니다.

대상 환경에서 스크립트를 쉽게 실행

script:step:과 함께 사용할 수 없는 간단한 스크립트 실행을 지원하기 위한 약식 구문이며, GitLab에서 제공하는 외부 저장 단계 구성요소에 의해 실행됩니다.

GitLab에서 제공하는 단계 구성요소는 러너가 현재 실행 중인 시스템에 따라 쉘을 자동 감지하도록 하며, 덮어쓰지 않는 한 쉘을 자동 감지합니다.

inputs:env:는 해당 단계 구성요소의 일부 측면을 추가 제어하는 데 사용될 수 있습니다.

예를 들어:

spec:
---
type: steps
steps:
  - script: bundle exec rspec
  - script: bundle exec rspec
    inputs:
      shell: sh  # 러너에게 `sh` 쉘을 사용하도록 강제함 (자동 감지 대신)

이 구문 예제는 단계 실행을 위한 동등한 구문으로 다음과 같이 번역됩니다:

spec:
---
type: steps
steps:
  - step: gitlab.com/gitlab-org/components/steps/script@v1.0
    inputs:
      script: bundle exec rspec
  - step: gitlab.com/gitlab-org/components/steps/script@v1.0
    inputs:
      script: bundle exec rspec
      shell: sh  # 러너에게 `sh` 쉘을 사용하도록 강제함 (자동 감지 대신)

이 구문 예제는 유효하지 않으며(모호하며) script:step:을 동시에 사용할 수 없기 때문에 유효하지 않습니다:

spec:
---
type: steps
steps:
  - step: gitlab.com/my-component/ruby/install@v1.0
    script: bundle exec rspec