Skip to content

Draft: Introduce status syntax for pipelines [RUN AS-IF-FOSS]

Furkan Ayhan requested to merge 280853-new-syntax-for-needs-pipeline into master

What does this MR do?

  • This MR adds a new syntax status to pipelines.
  • This will replace the usage of needs:pipeline. (Deprecated for now, will be removed in #335081)
  • It's used for reflecting/mirroring the status of another project's pipeline.

Related to #280853

Screenshots (strongly suggested)

Example CI Config:

build:
  stage: build
  script: exit 0

# current syntax
status_reflector_1:
  stage: test
  needs:
    pipeline: root/upstream-pipeline

# new syntax
status_reflector_2:
  stage: test
  status: root/upstream-pipeline

They work the same.

Screen_Shot_2021-06-30_at_17.03.47

Future works (maybe)

Adding a ref or branch option:

status_reflector_2:
  stage: test
  status:
    project: root/upstream-pipeline
    ref: '$CI_COMMIT_SHA'

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

Does this MR contain changes to processing or storing of credentials or tokens, authorization and authentication methods or other items described in the security review guidelines? If not, then delete this Security section.

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Furkan Ayhan

Merge request reports