How can i integrate Jenkins with Onedrive? - jenkins

I would like to integrate Jenkins with OneDrive to upload data's. I had a look at the Jenkins available plugins. But there is no OneDrive plugin to integrate. Is this possible to integrate? Any advice would be appreciated.

You will need to add code in some way, either bash / cmd / your-favorite-langauge and upload using the onedrive api
You should first attempt to do it locally, with a script or a few commands - later translate that into your Jenkins.
This is also best practice, you should stay away from Jenkins plugins since they are community driven. Unless the quality of life improvement is worth it.

Related

Is it possible to convert a Jenkins Shared Library into a Jenkins plugin?

I have a Jenkins Shared Library which supports functions to checkout, build, etc. Is it possible to convert the entire library into a plugin making it more portable and also protect the code?
Or any other ways by which I might not expose the code but give users the ability to access all the functionalities by calling the functions?
Shared library logic doesn't translate directly to a plugin.
Usually Jenkins admins are looking for a solution the other way around: how to convert a plugin to a shared library. A plugin has to be installed by an admin, requires a restart every time there is an update to the code, can potentially bring your whole master down in case of an error.
You probably have good reasons to want to hide the library code from your users. Maybe you can put your library in a repo where users don't have read access. In order to use the library in a build, only credentials stored in Jenkins have to be able to access the repository.

how to use jenkins and devops for .net and python development work

We are initial stage of bringing devops into our daily activities. Now we are workig on .net and pthon coding. So we have to plan for continuous delivery on our activities.
In the first scenario for python development works, we are using web2py now. So developers can directly access the python files and work and test their webdevelopment work by web2py with certain port.
How jenkins can help here to automate this process and developers should get a easy GUI or way to test or compile their codes before it got deployed o web2py.
Also we need to automate the build activity of .net code as well. What are the best possible ways

Visual reporting for Karate without Jenkins CI

I'm trying to get reporting working for Karate DSL, and it's proven a challenge because my team uses Circle CI instead of Jenkins. Cucumber reporting seems to only work for Jenkins.
I've had a look at this documentation, here:
https://github.com/intuit/karate/tree/master/karate-demo#example-report
https://github.com/jenkinsci/cucumber-reports-plugin
I was wondering if there is a circle friendly equivalent you could recommend? It'd be even better if the reports could be generated in the terminal. It's going to be a hard sell to convince my team to change CI tools just so I can implement a test framework.
Thanks!
Here's what I suggest:
If you follow the demo / doc instructions - you will get the HTML reports in say target/cucumber-html-reports, and this is "pure Maven and Java", no dependency on CircleCI at all so far.
Now all you need to do is somehow make these HTML reports accessible via the web. In Jenkins, there is an HTML Publisher Plugin. I am not familiar with CircleCI but a quick search suggests that there is a way to expose links to build artifacts.
Also note that when you follow the demo, Java JUnit XML reports would also be output to target/cucumber-reports. It looks like CircleCI has support for these which means that it should be able to derive the build pass/fail status and stats if configured right.
Also note that Karate now enables you to write custom reports: https://stackoverflow.com/a/66773839/143475

Jenkins plugins directory backup and restore

I'm trying to work out a way to backup and restore jenkins so we can provision a new jenkins automatically.
I cannot work out a way to backup+restore /path/to/jenkins/plugins without including the binaries. We would like the backup to be in xml file format, just as everything else in jenkins. My assumption was that we could somehow backup xml files, and jenkins could restore the plugin binaries if they are missing, since it has access to maven.
I would prefer to avoid using config management tools to install plugins, as I then I have to manage versions of plugins in a way that feels too controlled. I'm happy to just backup what ever is there, and restore it elsewhere when needed. The developers should be free to install plugins, without involving me or puppet.
Googl'ing the issue is difficult since "plugin" is used in so many other contexts.
Below link says it governs plugins as well, but I cannot see how this is - maybe I'm missing something.
http://jenkins-ci.org/content/keeping-your-configuration-and-data-subversion
I have ported the idea to use git and it generally works, except that plugins do not re-appear by magic on the new machine - only the default plugins come back.
Can anyone suggest?
If you don't want to back up the plugin binary files, you can use the Jenkins REST API to get the list of current plugins:
http://jenkins:8080/pluginManager/api/json?tree=plugins[shortName,version]&pretty=true.
(You can use tree=plugins[*] to see a more complete list of fields in the API.)
Save this data as part of your configuration backup and use the Jenkins API to restore the plugins when you're re-deploying.
There's additional documentation and how to update plugins on the pluginManager API page: http://jenkins:8080/pluginManager/api
The best idea I've come up with to date, is to split the instance into an OS disk and a Jenkins disk mounted on /var/lib/jenkins. Use your cloud provider's snapshot feature to backup the jenkins disk periodically. Jenkins is for many organisations I believe, always going to be a "flake" server, or a pet, that needs nurturing and does not benefit much from automation, other than what is used to maintain the OS.
To backup Jenkins components, you can use Handy Backup. A best practice is to set up at least daily backup in a differential or mixed (full/differential) mode. This is an advantage before using any plug-in, due to assured regularity of backups.

CI server, lunt build or Jenkins

My company currently uses lunt build as CI server. Hudson now forked to Jenkins, seems pretty powerful to me. I quickly installed it on tomcat, and the GUI seems to be quite powerful for setting up jobs, plus there is over 400 developer plugins and counting!
I was going to ask is it possible to do a POC with Jenkins.
Do any of you guys have experience with both or know the pros and cons i can use when i submit my proposal?
Thanks,
Shane.
Our small company's software team switched from Luntbuild to Jenkins (née Hudson) back in January, 2010, after using Luntbuild for three years. Every developer, including one manager, agrees that Jenkins is cleaner, simpler, and easier to use.
I found jobs (builds) much easier to set up and configure, in Jenkins, especially for projects built from different repository URLs. Documentation is neither project's strong-suit, but Luntbuild's seems more voluminous while being less useful. Jenkins' community is vibrant.
Beyond my personal experience, you may wish to consider the Wikipedia article titled Comparison of Continuous Integration Software.
Your best bet is to poke around on the actual Jenkins CI site. Here's a few links that might help your case.
https://wiki.jenkins-ci.org/display/JENKINS/Meet+Jenkins
There's a spot to "test drive" Jenkins on that page. It sounds like you already set up a Jenkins instance, you could possibly add a couple "dummy" builds to that as well.
Also, everything else you might have questions about could be found in the Jenkins wiki:
https://wiki.jenkins-ci.org/display/JENKINS/Home
Hope this helps.

Resources