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.
Related
I'm building a .NET class library and I want to build and deploy on a release in gitlab. I've done similar things on Github but reading the documentation for gitlab-ci I can't see any way to trigger a pipeline to run when I create a release.
It seems that gitlab-ci only has the following triggers:
on push
On a trigger defined with the pipeline triggers API
when another pipeline runs
Will I have to set up a webhook when I create a release and trigger the pipeline to run using the triggers API?
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 that builds a docker image & push to ACR. My Requirement is to prevent the pipeline Build policy from triggering until two people approve the pull Request.
Currently when the pull request is created the build automatically start running, without waiting for pull request to be approved.
Azure DevOps doesn't provide triggers for this level of control. You should control this not with your build server, but with your source control. You should prevent certain stages/jobs/tasks from running by using branch filters. I always build PRs and make them part for the approval process. Waiting for approvals is antithetical to DevOps practices.
Always build on PRs, but only save images when you have merged the PR.
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?
I have a java application and am trying to use Azure DevOps to build and deploy. Am able to do a build and publish the artifact in the build pipeline. In the release pipeline, I stages (dev/train/prod) in each stage I have a maven task to detokenize the build specific to the environment which I am able to do but I want to publish it as a artifact similar to the one in build pipeline. Is there any task to do that or any other alternate approach?
Can we publish artifacts in release pipeline - Azure devOps?
Sorry for any inconvenience.
This behavior is by designed and MS replied they don't have plans to support uploading folder/artifacts from release in near future.
When you check the document Publish Pipeline Artifacts task, It stated that:
Use this task in a pipeline to publish artifacts for the Azure
Pipeline (note that publishing is NOT supported in release
pipelines. It is supported in multi stage pipelines, build
pipelines, and yaml pipelines).
And if you check directly code that is executed, then you can see the Publish Pipeline Artifact task works only for Build pipelines.
You could check this ticket on github for some more details, many communities are waiting for publish artifact from release pipeline.
So, I helped you add a request for this feature on our UserVoice site, which is our main forum for product suggestions:
https://developercommunity.visualstudio.com/idea/823829/support-publish-artifact-from-release-pipeline.html
You could vote and add your comments for this feedback. When there are enough communities vote and add comments for this feedback, the product team member will take this feedback seriously.
Hope this helps.
I was facing the same problem: I wanted to upload artifacts in a release pipeline and in a later agent phase download those artifacts again.
Based on some answers from a related SO Post I created an Extension that offers the possibility to:
Upload a file or a folder to the Release Logs
Automatically download an Artifact from the logs that was previously uploaded
The upload task is making use of the built-in logging command to add files to the Release Logs. The download task then queries the Azure DevOps REST Api to download all logs collected thus far, tries to find the specified artifact and copies it to a specific place.
If anyone is interested, it can be found on the Marketplace