Skip to content
GitLab
Next
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • GitLab GitLab
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 44,758
    • Issues 44,758
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 1,331
    • Merge requests 1,331
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.orgGitLab.org
  • GitLabGitLab
  • Issues
  • #284086
Closed
Open
Issue created Nov 17, 2020 by Alexander Sharov@gd-asharov🦊

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