Skip to content
GitLab
Next
    • Why GitLab
    • Pricing
    • Contact Sales
    • Explore
  • Why GitLab
  • Pricing
  • Contact Sales
  • Explore
  • Sign in
  • Get free trial
  • GitLab.orgGitLab.org
  • GitLabGitLab
  • Issues
  • #284086

Support bridge job via API

It's not possible to run a manual bridge job (child_trigger from the example) via api, it returns 404.

.gitlab-ci.yml example:

---
stages:
  - child:generate
  - child:trigger

child_generate:
  stage: child:generate
  script:
    - echo "generate templates here"
    - |
      cat > test.yml << EOF
      ---
      stages:
        - test
      test_job:
        stage: test
        scripts:
          - echo "test"
      EOF

child_trigger:
  stage: child:trigger
  trigger:
    strategy: depend
    include:
      - artifact: test.yml
        job: child_generate
  rules:
    - when: manual

curl request example:

curl -XPOST --globoff --header "PRIVATE-TOKEN: ${GITLAB_API_ACCESS_TOKEN}" "https://gitlab.com/api/v4/projects/<MYPROJECT>/jobs/<MYJOB>/play"

response: {"message":"404 Not found"}

Technical Notes

API should support both both manual and auto bridge jobs

Edited Dec 12, 2020 by Cheryl Li
Assignee
Assign to
Time tracking