[go: up one dir, main page]

Skip to content

Support bridge job via API

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

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 by 🤖 GitLab Bot 🤖