Alon212
Alon212

Reputation: 93

trigger pipeline fails in gitlab-ci

trying to trigger a pipeline in another project.

trigger job:
    stage: triggers
    needs: [test_01]
    trigger:
        include: 
            - project: voodoo212/ourlordandsavior
              file: .gitlab-ci.yml
        # strategy: depend

the remote pipeline runs fine when run separately but fails when triggered from another pipeline. anything I am missing here? the triggered pipeline do start running but seem like it is the same error I got when not passing cache path

$ ./configure.sh
/bin/bash: line 114: ./configure.sh: No such file or directory

Upvotes: 2

Views: 1869

Answers (2)

Alon212
Alon212

Reputation: 93

I just realized I had the syntax wrong ! no need to use include to run it just

trigger job:
    stage: deploy
    needs: [test_01]
    trigger:
        project: voodoo212/ourlordandsavior
        strategy: depend

Upvotes: 1

Kuljeet Singh
Kuljeet Singh

Reputation: 33

You can trigger it through API

script:
- curl --request POST --form "token=$CI_JOB_TOKEN" --form ref=master "https://gitlab.example.com/api/v4/projects/9/trigger/pipeline"

Upvotes: 0

Related Questions