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. As with all projects, the items mentioned on this page are subject to change or delay. The development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.
Status Authors Coach DRIs Owning Stage Created
proposed devops verify -

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

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

단계 참조의 구문 설탕

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

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

script:step:과 함께 사용할 수 없는 간단한 스크립트 실행을 돕기 위한 단축 구문으로, GitLab에서 제공하는 외부 저장 스텝 컴포넌트에 의해 실행됩니다.

GitLab에서 제공하는 스텝 컴포넌트는 덮어쓰지 않는 한 쉘 자동 감지를 수행하며, 현재 실행 중인 시스템에 따라 GitLab Runner가 수행하는 방식과 유사합니다.

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