How can I run Jenkins job via eclipse? - eclipse

I don't use maven, I use ant (if it related...)
Should I create a new plugin?
Is there any exist one?
I tried to look for instruction but all related to maven.
Thanks

You can try this plugin which adds a view to Eclipse and allows you to monitor and trigger build jobs on Jenkins or Hudson.

Related

Jenkins and Eclipse Plugin

I am new to Jenkins. How Jenkins is helpful for a developer using Eclipse IDE? In simple, how to set up Continuous Integration with Eclipse and Jenkins?
Please guide me to a link where I can follow steps to set up Eclipse with Jenkins plugin and trigger builds from developer machine.
Thanks in advance!
If you are new to Jenkins Tutorials Point has a good tutorial that will guide you through the basics
http://www.tutorialspoint.com/jenkins/
Jenkins also have a step-by-step guide
Plugin tutorial: https://wiki.jenkins-ci.org/display/JENKINS/Plugin+tutorial
Using Eclipse with Jenkins: https://wiki.jenkins-ci.org/display/JENKINS/Setting+up+Eclipse+to+build+Jenkins
The critical connection you have to have is a build process, using either Gradle or Maven. Once you can build your project from the command line using your build script, you can start to automate it in Jenkins. If you don't have that build process yet, you won't be able to automate it with Jenkins.
You'll also need a source code management (SCM) system, like git or Subversion. In general, you don't want to have to trigger builds manually, you want builds to trigger automatically when new code is checked into git or subversion. Plugins in your SCM or in Jenkins can "watch" your code repository for new checkins, and spawn builds from that.
I just tried something which actually worked for me and I think sharing the recipe will be helpful for the newbies to the DevOps-Development integrated environment.
Drag and drop this plugin (Hudson/Jenkins Mylyn Builds Connector) in your Eclipse workspace and proceed with the installation process with Eclipse marketplace wizard. Once it is installed you will be asked to restart your Eclipse in order to reflect the new changes.
*If there is any issue installing the plugin then it means, plugins that you have are conflicting with the ones attempted to be installed. Once it computes the alternate paths, it pops up the next wizard page. You should be able to see what the conflicts are and choose one of the necessary actions.
Next, in you Eclipse IDE, go to Window ---> Show View ---> Other ---> Mylyn ---> Builds
Select Builds and click Open.
You will now see a Build page in your Eclipse IDE. Just go ahead and click on "Create a new build server". A new window will pop up, select Hudson(supports Jenkins) and click Next.
Copy paste your Jenkins server URL in the Server field and give it a name (Label), click Finish.
You will see your new build server under Builds. Right click on it ---> Plan ---> Open in browser.
This will open your Jenkins dashboard inside the Eclipse IDE. You will be able to perform any operation and trigger a Build pipeline job from here.

Is there any tool to create Jenkins Plugin?

I have a Jenkins job that is working fine. Now i need to create the Jenkins Plugin bundling the whole functionality of the current Jenkins job.
I know we can create Jenkins job using maven, jelly and java. But I want some easy way of creating the plugin.
Do anyone know any tools that does my requirement.?????
Well, as you already known, in most cases, we develop jenkins plugin using maven & java.
But as an alternative, you can always choose other methods if you you like and here are some:
If you are not good at Java and would like to try develop jenkins plugin in Ruby or Python , you can try:
https://github.com/jenkinsci/jenkins.py/wiki
https://github.com/jenkinsci/jenkins.py/wiki/Getting-Started-With-Python-Plugins
Jenkins Plugin development in Ruby
If you don't like Maven and want to try other build tool like Gradle, then this is for you:
https://wiki.jenkins-ci.org/display/JENKINS/Gradle+JPI+Plugin
Also, I found in CloudBee site there is a way to develop jenkins plugin using only Groovy script,this is super easy and I am sure you will like it.
https://www.cloudbees.com/event/topic/groovy-way-write-jenkins-plugin

How to integrate qunit with eclipse

How can I integrate qunit with eclipse? I could not find a plugin for the same in Eclipse marketplace.
Is there any other way by which I can integrate the two?
Should it be through JS Test Driver?
Here's one way to do this:
Download and install the headless browser "phantomJS". It has a plugin for launching qunit tasks.
In Eclipse, define a menu item Run/External Tools/Configuration with a command line like this
phantomjs-1.9.7-linux-x86_64/bin/phantomjs phantomjs/run-qunit.js nttp://mysite.com/myproject/tests/qunit-composite.html
If you have many test scripts and test cases, and if want to store your run results in a database, then additionally do this:
Install the Build Server TeamCity, it is free and has an Eclipse plugin.
Configure and start TeamCity from the command line.
In TeamCity, add a new project with a single Build Step with the phantomjs call mentioned above
All this brings more complexity of course.

Automating the deployment process of plugin

I have an eclipse plugin, when I deploy it, I use a feature project then export through the wizard to get zip file to install in any eclipse based app.
How can I automate this ?
I want the whole process to run automatically.
Use the PDE Build stuff, also see the documentation.

Publish WTP project in Eclipse from Ant

Is there any way to have an Ant script running in Eclipse publish a WTP project? I want my ant script to perform some tasks, then kick off the publish as if I had done it from the UI, and then do some more things.
Don't know how far you got with this. But if you create your own ant script, and put
at the top, your script will get imported in the the WTP generated ant script. That said, all i've gotten it to do is add the targets, I haven't quite figured out the "hooking in" to existing behaviour yet.
If you did find anything interesting, post it, as I'm looking for more info on integrating WTP with existing builds.