jx: Fails to query last commit status on repo
Summary
Jenkins fails to query the status of the PRs in gitlab v11.1.4 so, it can’t complete a simple promote pipeline. Webhooks are created correctly, manually added access to all and notify everything to the webhook (just in case).
Steps to reproduce the behavior
jx create git gitlab https://mygitlab.onpremise.local jx create git token myname jx import $my_very_simple_python_proyect
Jx version
The output of jx version
is:
NAME VERSION
jx 1.3.391
jenkins x platform 0.0.2755
Kubernetes cluster v1.10.3-eks
kubectl v1.12.0
helm client v2.10.0+g9ad53aa
helm server v2.10.0+g9ad53aa
git git version 2.7.4
Kubernetes cluster
EKS cluster, created with terraform using the eks module.
Operating system / Environment
Tested on Ubuntu and Fedora
Expected behavior
Jenkins is able to understand that the PR is created, merge it and finish the pipeline successfully deploying code in the next environment.
Actual behavior
The PR is created in the next environment repo, but jenkins keeps showing:
Failed to query the Pull Request last commit status for https://mygitlab.onpremise.local/myname/environment-jx-sta/merge_requests/1 ref...
If I merge it manually it starts showing:
Merge commit has not yet any statuses on repo myname/environment-jx-sta merge sha ... ```
The code is actually deployed to the staging environment, but looks like the pipeline can't check it and times out.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 18 (7 by maintainers)
Having the same issue
I added
--no-wait=true --no-poll=true
to myjx promote
command and the automatic merge works as expected.Hi, I have the same issue. When I manually post the following to gitlab api the Jenkins job is completed:
curl --request POST --header "PRIVATE-TOKEN: **my-gitlab-api-token**" "http://**my-gitlab-host**/api/v4/projects/**my-project-id**/statuses/**sha-of-the-merge**?state=success"
Maybe the post should be added in the promote.go as an extra step for Gitlab provider.
Btw, Jenkins X is really amazing
@dimmel82 @erSitzt thank you both.
I changed the Jenkinsfile of environment-heroalpine-staging to the following:
At first it didn’t work, because i omitted the gitLabConnection(‘jx-gitlab’) line (i simply overlooked it). Then it was stuck at:
I then did the following POST request:
Then the pipeline went on with
and ends successfully.
I am using jenkins-x version 0.0.3734 with gitlab. In the build pipeline i use a pod with jx version retrieved from https://github.com/jenkins-x/jx/releases/download/v1.3.1096/jx-linux-amd64.tar.gz
With the added gitLabConnection, the above pipeline succeeds even without the POST request. Thanks!
I have the same issue with github, but after 15-20 tries it does complete.
Having this problem now… Any progress? @dimmel82 's curl suggestion got it past where it was stuck, but now it’s stuck here:
I think it’s because the build pipeline for jx-staging is stuck here: