I'm using Jenkins for CI, I'm trying to establish a build strategy. My point here is to build
after every commit. I saw that I need to create post-commit file in the hooks directory of my
project repository.
The porblem is that I'm using SVN as an Eclipse plugin, so I don't really have a repository,
I'm just using "right click -> Team " on my project to synchronize/update/commit ...
I can't see where to create my post-commit file in order to launch a Jenkins build.
Does anyone kow how to deal with this issue ?
I've seen many posts before, but none of them was helpful !
Thanks
The simplest solution is to use Poll SCM in your Jenkins job and have it look for changes e.g. every 5 minutes. It won't trigger the build instantly on commit, but it will decouple your SVN and Jenkins a bit more.
Related
I can checkout the code from github using import org.ajoberstar.gradle.git.tasks.*
. But I want to check out the code immediately after code checkined to github repository automatically and deploys it into web server.Is there any plugin to identify the commit history in github repo.Or some other ways to do it.
Two options I can think of:
Use a git commit hook to trigger the gradle task.
Periodically poll git log to check for new commits (you might be able to use gradle's new continuous mode to achieve this)
We have over 100 build configurations in Team City, and I've come to realize over the past few months that these assets are just as important (if not more so) than the actual project assets (code, config, etc) we are delivering.
To that end, I know TC provides it's own build configuration version control but to me that seems a bit low on features - for example if a build stops working it would be really good to be able to diff the actual XML build configurations in my favorite diff tool rather than rely on TC's built in one, or to be able to view differences across a longer time frame than simply against the previous state.
Obviously this can be handled manually by extracting the build definition and committing, and then applying self disciple to always do this when you change the definition. Can anyone suggest a more joined up approach? We're using TeamCity Enterprise v8.0.5
Can you upgrade to TeamCity 9? TeamCity now has built in support to sync the build configurations to Git or Mercurial.
https://www.jetbrains.com/teamcity/whatsnew/
https://www.youtube.com/watch?v=zTLeCrdxGIw
As an interim solution before you upgrade to TeamCity 9, you could write a scheduled job to run every 10mins (or even every minute) and automatically commit the changes to a new repository. I'd use a new repository so TeamCity doesn't ever try and trigger off the commits.
I don't know what OS or VCS you are using, but you'd just need to commit all XML files so you get project-config.xml, build type XML, and plugin config, you don't want .properties files as the build number files will change after every build.
<TeamCityData>/config/projects/**/*.xml
If you are using Git you could easily just init a repo in the projects directory, add a .gitignore for anything other than *.xml, and run git add . and git commit -m "Build configuration settings were edited" as a scheduled job.
I am looking for a solution to this. Here is my setup:
Local Eclipse with all maven projects on. When i commit them to GitHub, my Jenkins server automatically builds the project. (For every push to github)
However, in my Maven repository on the Jenkins server, i want to be able to get each one (1.0.1 -> 1.0.2 etc.) is there any way i can do this? Ideally an eclipse plugin so that it changes the version before it gets to GitHub.
If i used the maven-version-plugin, it would not update on my local eclipse machine, therefore it would just use the same version each time.
Any Solutions?
I would suggest to use the maven-release-plugin which exactly does things like this. This comprises of two steps. First mvn release:prepare and second mvn release:perform.
This is a follow-on to my question at https://stackoverflow.com/questions/10226287/jenkins-git-and-eclipse
I'm trying to get a post-commit hook running which will invoke a Jenkins build. I can create the hook, place it in my native Git (i.e. not EGit) hooks directory and it works as intended. However, I prefer to have the hook running in my EGit environment as I don't want the complexity of managing two Git environments. I cannot, however, establish where I should place the hook in order for it to be picked up by EGit - any ideas?
=================
Answering my own question - seems EGit cannot do this - see here
If all you want is to have a commit start a jenkins build, then just configure the jenkins job to poll the git repository and start a build whenever a change (=new commit) is found.
I want to create a new hudson job that pulls sources from two version control system cvs and svn.
Is this possible. I dont want to move from cvs stuff to svn, because we will soon be moving to git.
suggestions?
if you create a 'freestyle' software project you can configure it to use CVS for example.
In the build instructions you add the commands necessary to checkout the subversion sources if they are not yet checked out and update them if they are.
After these commands you add your regular build commands.
Of course the build will only trigger on the configured CVS.
To trigger on both, create a dummy project which checks out the subversion, does nothing, but configure it to trigger the first job.
I hope there are no overlapping folders/files because then you're in for a lot of fun...
good luck!