Build when a change is pushed to GitLab Not Visible


(David Wu) #1

I am working to set up a DevOps Pipeline using the Jenkins and Gitlab Docker containers inside an Ubuntu Virtualbox VM. In Jenkins, I created two new items (pipeline) using the either the Freestyle and pipeline options. For the Freestyle project, I was able to see my sample Java project build works when a change is pushed to GitLab and triggered a build in Jenkins (working as design). I was able to complete both the Docker containers and the application’s configurations and the Gitlab was able to trigger a Jenkins build job whenever a Git push occurs. Then the next day and after I restart both container, the Gitlab push no longer works due to a 403 error. Then I went back to check the Jenkins build trigger setting and found the “Build when a change is pushed to GitLab” no longer exist. I assume when I restart the Jenkins container (image: jenkins/jenkins:lts), a new image was downloaded. So the question is, is the latest Jenkins image removed the “Build when a change is pushed to GitLab”? If so, what do I use instead?
By the way, the Gitlab webhook to Jenkins 403 error looks like this:
“Hook executed successfully but returned HTTP 403 Error 403 No valid crumb was included in the request

HTTP ERROR 403

Problem accessing /project/test-freestyle.Reason:

No valid crumb was included in the request
Powered by Jetty://9.4z-SNAPSHOT