Is there any way to configure GitHub or ArgoCd to get notified for any updates done in JFrog Artifactory? - github

I am deploying microservices into Kubernetes,
So whenever a latest version of Docker image is pushed into Jrog Artifactory, it should notify Github or ArgoCD.
Is there any similar solution for this?

If your Artifactory server is installed on-prem, the easiest way is to implement a user plugin. You can use the one from our user plugins repository (and adapt it as needed), or write your own which will notify the services you need on events you need.
Here is a blog post detailing how to use the existing plugin.
Also, a built-in feature is on our roadmap.

Related

Is it possible to whitelist upstream packages in azure devops without disabling upstream sources?

We have a business need to manually approve every (external) upstream change before we start using it and only allow our developers to use an approved whitelist of packages and versions.
The two ways I can see to do this are either:
disable all pipelines and halt all development, enable an upstream source and pull the new package through and then disable it; making sure no additional upstream packages were pulled while the source was enabled
not use upstream sources but instead republish all packages manually (ongoing work will not be impacted while package approvals occur)
I have some basic tooling created to manage the manual approval and republish pipeline (I currently do this with a network local nuget registry and npm registry) so #2 seems like the path for me to take, but if I could simply upload a list of approved packages instead I could maybe simplify my workflow.
Is it possible to whitelist upstream packages in azure devops without disabling upstream sources?
Sorry for any inconvenience.
I am afraid there is no such way to whitelist upstream packages without disabling upstream sources at this moment.
Just as you know, there is not much settings for upstream sources currently, just add/delete, enable/disable. We could not have any way to set a whitelist to filter the packets from the upstream source.
As you have a business need to manually approve every (external) upstream change, you could add your request for this feature on our UserVoice site (https://developercommunity.visualstudio.com/content/idea/post.html?space=21 ), which is our main forum for product suggestions. Thank you for helping us build a better Azure DevOps.
Besides, as workaround, I also agree with the second way. We could use file matching patterns to publish multiple packages:
Push NuGet packages
Hope this helps.

How to skip specific commits in MyGet build service?

I would like to use MyGet build service to build my project hosted at GitHub. However, the service is triggered unnecessarily by updating README.md or other documents in the repository. Is there any way to skip these kinds of commits?
Unfortunately, there's no way out-of-the-box to filter commits, as there's no way for a machine to know what you'd like to build and what not (without going through extensive configuration). The GitHub commit webhook will fire either way, no matter what you commit. Any service responding to the webhook will listen for the event, including MyGet.
However, you could build your own triggers as MyGet Build Services supports POST web hooks. You could add your own filtering to your custom trigger, and choose when to fire the webhook, and when not to.
Details about how to create a custom build trigger for MyGet Build Services can be found here: http://docs.myget.org/docs/how-to/auto-trigger-a-myget-build-using-an-http-post-hook-url

Build triggering from 3rd party repository

Say I have a project, that depends on and build with the latest commit from a repository, managed by someone else, is there a generic way to get build triggering? I am not talking about for a project that you own where you have access to the Webhooks settings but where the project is someone else's.
An example I have for this is Docker images. Where I dockerise an application, I want to have a CI system rebuild that image whenever the application's source repository is updated. I don't have control over the webhooks of the application vendor's git so cannot add a webhook, but would like a trigger when it is updated. A short delay is reasonable (it does not need to be instant).
For argument's sake, we can assume that the repo is hosted on GitHub and that the CI supports web hooks.
Is there a tool/service that does this? I don't think that there is a way provided by GitHub or any of the other large Git hosts (GitLab or BitBucket) for doing this, but if I am mistaken please let me know. All I can think is to poll the repo in some schedules job and trigger the build from that. I suspect there may be a plugin for Jenkins to do this but would like something generic and if polling can be avoided in favour of the publish/subscribe model that would be perfect.

How to automate sync between a Github repository and Openshift?

What is the best way to automate syn between Github repository and Openshift ?
I found this documentation in openshift : https://www.openshift.com/forums/openshift/how-to-keep-a-github-repository-and-an-openshift-repository-in-sync For manually doing a syncrhonisation.
I guess the first question is why you want to automate it? What do you want to achieve? In many cases a manual push to Openshift and GitHub might be preferable.
However, let's explore some possibilities:
Configure a git remote with multiple urls and then just git push all. See also Able to push to all git remotes with the one command?
Use a GitHub Webhook - https://developer.github.com/webhooks/creating/. GutHub will then send a HTTP request to a given URL on each push. You can then setup something on your openshift gear which listens to the request and if it receives one pulls from GitHub. you might then need to restart the app via ctl_app (see https://www.openshift.com/kb/kb-e1055-how-to-restart-an-application)
Last but not least, you could make use of the .openshift/action_hooks/post_deploy deploy hook in OpenShift. I gets triggered after redeploy of your application. In there you should be able to the repo to GitHub as well.
Which approach makes most sense will depend on your use case.

Is there a way to publish a website from github or cloud9IDE directly to a web-host?

Is there a way deploy a website directly from github or cloud9 ide? using ftp or other way, right now it doesn't matter what hosting, just so it'll be fully functional and accessible online.
(I know github has a web-hosting of a kind but it seems very limited)
What webframework/language are you using? If you use RoR or Sinatra or any other rake-based framework you can use heroku.com. If your using asp.net you can use appharbor.com, finally if your using php you can use phpfog.com.
What these hostingproviders have in common is that you deploy the website by pushing your code with git, while you won't be deploying directly from github you can just add one of the above mentioned hosts to your remote-list (in addition to github) and then push to that remote when you wish to deploy.
Another solution would be to add a post-receive-hook to github which then triggers whenever you push to github, in that post-recieve-hook you could tell the webhost to pull from the repo. This does however require you to have git installed on the webserver aswell as some kind of webinterface for the post-recieve-hook to post to.