I have a working Tekton Pipeline that is successfully triggered by a GitHub webhook, but it doesn't work with Gitlab webhook. I can see that the Gitlab webhook is triggered and that it gets to the EventListener container in OpenShift, but the Pipeline itself does not run. So, does it work with Gitlab webhooks? If so, is there something that I need to setup or change so that it actually triggers the pipeline?
Thanks!
Cesar
A Tekton Trigger can initiated by any http-request, so if you use a GitHub-webhook, a GitLab webhook or a curl command should not matter.
However, those webhook requests provide data in a slightly different json-format, so to pass parameters to the Pipeline, you need to properly configure the TriggerBinding matching the request that you receive. You probably need a different TriggerBinding for GitLab than for GitHub.
but the Pipeline itself does not run
it is hard to answer this part without more information. Any error message?
Related
I have few CI and CD pipelines in azure devOps project in which CI pipelines connect to github enterprise repository to fetch the code.
CI pipelines were invoked by the trigger whenever there is a change in main branch of repository.
This was working fine until our git repository instance was changed. All our git repositories are migrated to the new instance.
I have updated the service connection, to point to the new git instance and manually invoked CI pipelines and tested. It worked fine.
But the issue is now with automatic triggering of CI pipelines. It is not working now.
I tried remove and add git service connections and repository details inside CI pipeline and enabled trigger, but still it is not getting automatically invoked whenever there is a change in repository.
What could be the reason for this ? I already removed and added the git repository details in CI pipeline, still that does not work. Is there anything I missed out? Any leads appreciated!
You can check the "Override the YAML trigger from here" setting for the types of trigger (Continuous integration or Pull request validation) available for your repo." in the Triggers UI.
If it does not work, please create a new pipeline to check if it works.
For more information, you could refer to: troubleshooting failing triggers
Finally figured out the issue and fixed. It was error with web hook in the repository.
Updated the webhook and it is working fine now.
I have a pipeline running externally and send the status of the pipeline back to GitLab through GitLab API. I am wondering if it is also possible to send the pipeline logs and store them in the job artifact of GitLab. From what I understand, the artifact seems to be created only via internal (gitlab-ci.yml) and documentation here does not state any option to create POST to the job artifact as well.
So I know that are multiple posts out there but not sure they covered my issue. So I have two branches dev and QA, I would like to do a NIGHTLY merge from dev to QA. I dont know how to go about doing this to setup a nightly pull request from dev into qa. Any help would be great, thank you!
how to go about doing this to setup a nightly pull request from dev into qa
Based on your requirement, you could setup schedule trigger Pipeline in Azure Devops.
Then you could add the task: Create Pull Request from Create Pull Request Extension.
When the specified time is reached, it will trigger the pipeline and create a pull request. You could set the auto-complete in this task, then the pull request will complete.
Or you could write script to run the Rest API to create and complete pull request.
Create- Pull Request.
Update- Pull Request
We use Azure Pipelines for our CI/CD processes since a few weeks. The CI pipeline gets code from GitHub, builds, tests and creates a deploy package.
From the beginning I am quite certain that every commit got detected as intended, but recently that is not the case. Manual triggers and scheduled triggers work, but continuous integration does not.
What could be the causes for this?
In the pipeline, we checked the box for "continuous integration", and we use the recommended GitHup App to provide authorization. This is verified to work, we can see the authorized GitHub repos in the pipelines settings.
You can check if the github branch you committed to is included in the Branch filters. If it is not included. Click Add to add the branch.
Check if there is skip CI command(eg.[skip ci]) in commit message. See here for more information.
If CI trigger is not working even all the settings are correct. You can try below workarounds:
1,Disable the CI trigger, save, then re-enable it and save it again.
2,Clone your build definition. See below screenshot
3, Create a new build pipeline with the same trigger and settings.
If all above arenot working. You can go to this site to see if there is a server outage of azure devops.
We ended up changing how we connect from Azure Pipelines to GitHub. The recommended way is to install the Azure App in GitHub and connect using that in Pipelines. My experience is that it worked at first, but stopped working. I read somewhere that only the first connection works with webhooks, so maybe we tried it somewhere else or something that broke it. I ended up using a GitHub servic account to pull and listen for webhooks, and that works just as expected.
I am trying to receive a call back to run a gitlab runner script from third party webapp which I can register a webhook URL, but I cannot find any documentation about it.
I am wondering if this is even possible to create a webhook address to receive post request and process the request body.
Where can I find the documentation or implementation sample?
run a gitlab runner script from third party webapp
If by runner script you mean project pipeline then you can use API triggers
You can add trigger in Project Settings -> CI/CD -> Pipeline triggers