Circle ci trigger a build on pull request creation or update - github

We are usng circle ci and github.
So i have a remote k8 cluster for staging, on which we have our test suite.
I have a project on github, and id like to deploy and run the tests on the cluster everytime a pull request is created or updated. The reason for doing it on pull requests is that we wwant to merge the feature branch with master and then run the tests on the rmeote testing cluster:
I have read a few articles, but nothing that explains to me how this could be achieved.
Github web hooks calling circle ci on pull request creation or update?
Build status based on the result of remote testing?

Not currently possible on CircleCI, they do not expose all the payload from a github.
its on their todo list

Yes it is possible now, just don't specify any branch and it will trigger on every pull requests creation or update.

Related

How to create a CI/CD pipeline for deployment on physical server

I have multiple servers installed at client site. I can access all of them via anydesk. I have python project running on them. All of the source code is in azure devops. I want to create a CI CD pipeline so that whenever we merge pull request to main branch, it should automatically be deployed on client's server.
Previously, I have worked on many web API's which was deployed on azure. We had branches created for each client and whenever we merge changes into those clients branch, it automatically used to start deployment on API as our repo and branch was linked to web API.
To deploy the new code changes on server, I have to follow manual way of first logging into the client server via anydesk and then perform the git pull to pull the required changes. This is very manual thing and we sometime do mistake in it. I am looking for a way to connect the client server with the branch of the repo so that once we merge our changes to that branch, it should automatically deploy the changes. Is there any way we can do it? Is there any tool/service available for this. All the client server are Ubuntu machines. Please give some suggestions. Thanks

Showing ConcourseCI build status on github pull requests

I currently have a fully functioning pipeline that's been deployed to a concourse server. It will receive push events from a github repo, and run the pipeline as such.
I have a webhook that's also able to talk from github to the concourseCI server.
It looks something like this:
https://concourse.myorganization.app/api/v1/teams/my_team/pipelines/git-repo-name/resources/git-repo-pull-requests/check/webhook?webhook_token=some_token
I have it dropped into the settings of the Github repo as a webhook, and it's returning 2xx after each push to a pull request. How can I get the status of the build in ConcourseCI to show up on the pull request like this
GitHub build status is independent from the webhook: the webhook goes from GitHub to Concourse, while here we need the opposite direction: from Concourse to GitHub. Also, it cannot be synchronous, since the webhook triggers a build that takes time to complete.
You need to signal the build status with a Concourse resource. The one I prefer (since I wrote it :-) is https://github.com/Pix4D/cogito.

How to deploy git hub pull request at arbitrary url from jenkins?

I have a git hub pull request raised which I can build using properties from pipeline in Jenkins.
However, I also want that same pull request gets deployed using kubernetes through jenkins.
I have already API for same application, deployed to specified path in Ingress.yaml file which I don't want to change. Only I want to create new path, test the pull request and then delete once it is merged.
Is it possible using job variables in Jenkins to achieve so?

Github - Octopus Deploy Integration

Basically i have the following scenario that i need to solve:
On a schedule basis, OctopusDeploy is pulling the latest releases from code repo using GitHub Feed and then perform some operation through the tentacle agent on another server.
Problem:
Currently we have to trigger a release in Github manually whenever there is changes to the repo so that Octopus Deploy can pick up new changes. Is there a way to trigger the release in GitHub automatically whenever there is a merged event to the master.
Thanks.
I’m going to guess that you don’t want to expose your Octopus Deploy instance to the internet... so how about use reoccurring scheduled deployments?
https://octopus.com/blog/octopus-release-2018.4#recurring-scheduled-deployments
Currently we have to trigger a release in GitHub manually whenever there is changes to the repo so that Octopus Deploy can pick up new changes.
Is there a way to trigger the release in GitHub automatically whenever there is a merged event to the master.
First, since March 2022 (4 years later):
Octopus Deploy is now a GitHub secret scanning partner
GitHub secret scanning protects users by searching repositories for known types of secrets.
By identifying and flagging these secrets we help protect users from data leaks and fraud associated with exposed data.
We have partnered with Octopus Deploy to scan for access tokens for their cloud-hosted product, Octopus Cloud.
Octopus API keys allow users to perform tasks like creating and deploying releases. We'll forward access tokens found in public repositories to Octopus Deploy, who will notify the affected user via email
In that new context:
no need for an external private Octopus Deploy
The check would be done for any new commit
But this is limited to secret scanning, so it might not do everything you were doing in your case.

Showing Jenkins pipeline status against pull requests in GitHub

I have recently started using Jenkins Pipelines and have a multibranch job configured which is happily picking up Jenkinsfile on one of my branches.
I have seen in screenshots on posts\articles that Jenkins can report back to pull requests in GitHub the status of whether the branch has passed\failed checks performed in the pipeline.
I am not seeing any such feedback for my pull request I have opened, I can see in Jenkins it has triggered a pipeline build which has passed.
How can I get the notification to show the pipeline checks have passed in GitHub. Do I need to configure something else?
I found out this was simply down to me using the Git instead of GitHub sources option when configuring the multibranch pipeline job in Jenkins.
The docs for the GitHub Branch Source plugin gave me the clues!
I now get status messages on my pull requests showing whether pipeline checks are pending\failed\passed.
Check out the Github Pull Request Builder Plugin, it should do what you require: https://wiki.jenkins-ci.org/display/JENKINS/GitHub+pull+request+builder+plugin