Last date of deploy -date is wrong

I have two environments in GitLab and I have built two build triggers to build and deploy my site to two different Firebase Hosting sites. There is a staging environment and a production environment. But when building & deploying just the staging environment, the production also says in Dato that the Last date of deploy would be the same as in the staging environment.

I think this is because of the webhook is triggered by a pipeline event, event if the pipeline is not for the production environment.

Is there a way to read the Request body to know for example which stage is the trigger affecting? Because now it is very confusing to see that the production version also went live, when the aim was only preview the changes in the staging environment.

Screenshot 2021-09-08 at 14.24.14

Screenshot 2021-09-08 at 15.10.20

Hello @pepita.kautto each build trigger should have different success/failure endpoints that you should call.

Are you sure that you are using the appropriate one for each trigger? Meaning the Gitlab CI for staging using the staging endpoints, etc?

Hello,

I have a repository that includes two environments, production and staging. Also in Dato, I have two build triggers, that trigger each job that will build and deploy the code from master branch to its designated environment. Iโ€™m using the custom environment variable from Dato to tell the ci/cd job which one I want to trigger.

The problem seems to be that the pipeline event webhook from Dato is triggered every time any pipeline event happens. The request body is telling which environment was supposed to be updated but as there is a pipeline event, both of these will give the updated Last date of deploy in the UI.

Is there a way to read the environment part of the request body and pair that with the notification of the last date of deploy? Or do you have any other suggestions how this date could be updated correctly? Or then just hide the text so it does not confuse our client too much?

Can you please confirm that you are using the two different webhooks, one per production and a different one per staging that you can find here:

If so, maybe we should have a call together to understand if thereโ€™s a problem in your setup or a bug on our end. Feel free to book a slot here: Calendly - DatoCMS

Thanks

1 Like

Hello,
yes, I do have two webhooks, one for each environment. But as the webhook is triggered by any pipeline event in the repository, both webhook will get triggered!

Thanks, I will book us a call! :blush: