I’ve created a simple pipeline of a spring boot app and it works fine when triggering it manually but it doesn’t seem to want to trigger from git push events, am I missing something?
I have the same issue with private GitLab repository. I have found out that the Rancher doesn’t automatically create a webhook in my repository. I have tried to create webhook manually, but I don’t know where to get a security token for it. Can anybody help me, or provide a brief guide on how to correctly add a repository so that the pipeline would trigger from git push events.
I had the same issue for 2 days and i after 2 days i have finally made it work.
I know it’s been a while since the ticket has been opened but I didn’t find anything that could fix my issue.
What i had :
A simple project in private gitlab community edition (v12.3.9) with a .rancher-pipeline that build my project into a docker image, push it in a private registry and deploy in a rancher app (v2.3.5). The build works when i trigger it manually.
What i have done to make it work :
First, you need to look for the webhooks. In a nutshell, they are triggers in your Gitlab repository (and in other repository such as Github) and will send request to an endpoint.
When you setup your pipeline in Rancher, it should create a Webhook in your repository. To check if it works, in gitlab go in your project > Settings > Integrations . Scroll and little bit down and will be able to see your Webhook. If you don’t have it, don’t try to create it by yourself, your Gitlab doesn’t let application create webhook. Reach the admin panel of your Gitlab, go in Settings > Network and under Outbound Request, check allow requests to the local network from web hooks and services OR add your host in the whitelist.
Recreate your pipeline and it will work