Skip to content

Fix triggering multiple children pipeline with the same artifact

What does this MR do?

This MR aims to fix the bug for issue #212373 (closed).

Note: it is behind a feature flag ci_new_artifact_file_reader (#249588 (closed))

.gitlab-ci.yml
stages:
  - generate
  - run

generate-config:
  stage: generate
  script:
    - ./generate-configs.sh
    - cat config-a.yml
    - cat config-b.yml
  artifacts:
    paths:
      - config-a.yml
      - config-b.yml

trigger-a:
  stage: run
  trigger:
    include:
      - artifact: config-a.yml
        job: generate-config

trigger-b:
  stage: run
  trigger:
    include:
      - artifact: config-b.yml
        job: generate-config
generate-configs.sh
#!/bin/bash

cat > config-a.yml <<HEREDOC
service-a-1:
  script:
    - echo 'job 1 for service A'
service-a-2:
  script:
    - echo 'job 2 for service A'
HEREDOC

cat > config-b.yml <<HEREDOC
service-b-1:
  script:
    - echo 'job 1 for service B'
service-b-2:
  script:
    - echo 'job 2 for service B'
HEREDOC
Result:

Screen_Shot_2020-08-24_at_16.16.13


In this MR, we are adding a retry mechanism to avoid this error.

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • 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