Pipeline triggered through API not showing trigger variables

Hi everyone,

I have been triggering a pipeline on gitlab.com for a private project through the API a couple of months ago. Doing this added the triggered label to the associated jobs and I could see the trigger variables in the right side plane of the job’s log page.

However new pipeline’s triggered recently through the API are no longer being identified as triggered and are not displaying the trigger variables on the jobs log page.



The trigger variables can be viewed on the right for this job run 2 months ago…


… but using the same API endpoint, the trigger variables can no longer be viewed on the right for this job run recently


These new pipelines were definitely triggered by the API endpoint using

https://gitlab.com/api/v4/projects/:id/ref/master/trigger/pipeline

and you can see the time the job ran is the same as the “Last Used” time under the trigger token, in the example of the image the “Last Used” time under the trigger token reads 23h ago. My .gitlab-ci.yml has a single target configured as

  only:
  - triggers

The jobs all succeed, I get an output that is correct and only possible if the trigger variables were avilable, so the trigger variables definitely reach the CI script.

Is this a bug or has the API been updated in some way such that I need to update by API call to ensure the job is identified as triggered by the API so that it will also show the trigger variables.

Thanks

1 Like

+1

I have the exact same issue! Just today, I posted the same question on SO: https://stackoverflow.com/questions/45966983/gitlab-9-5-build-trigger-not-working-as-expected

This started happening after we recently updated to EE 9.5.

Sorry for the inconvenience. This bug happened in 9.5 because we changed where to store triggered variables for better architecture. We already fixed this problem and the patch will go into 10.0.

We also consider a next patch release (9.5.x) for fixing this regression. For users don’t want to upgrade to 10.0 immediately.

Here is the issue tracker on CE repository; https://gitlab.com/gitlab-org/gitlab-ce/issues/37559

1 Like