Pipeline not triggering

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?

My pipline yml:

- name: Build maven
  - runScriptConfig:
      image: java:8
      shellScript: ./mvnw clean install
- name: Build & Publish Dockerfile
  - publishImageConfig:
      dockerfilePath: ./Dockerfile
      buildContext: .
      tag: spring-boot-demo:${CICD_EXECUTION_SEQUENCE}
      pushRemote: true
      registry: <myregistry url>:8443
- name: Deploy yaml
  - applyYamlConfig:
      path: ./deployment.yaml
      NAMESPACE: dev
  • runScriptConfig:
    image: java:8

‘image: java:8’ should is ‘image: maven:3-jdk-7-slim’

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.

1 Like

I"m having the same issue in v2.2.1 of rancher server. I also notice this in my rancher logs. Not sure if it’s related.

2019/04/16 01:34:33 [ERROR] PipelineController p-86d2j/p-k9hjn [pipeline-controller] failed with : 422: {“error”:“Invalid url given”}

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 :slight_smile:

Hope it could help !

I used these documentations for my investigation :