I am going to automate our setup creation activity. For these I need to get 3 items from 3 different svns
a. application binaries from https://productvss:8443/svn/Connect200/branches/Release_5.0.0.0
b. logger binaries from https://productvss:8443/svn/Logger/branches/Release_2.4.7
c. License binaries from https://productvss:8443/svn/licensing/branches/Release_2.4
What is the best way for getting the files in CCNet? source code block or something else.
Assuming you are triggering the builds with something other than listening for changes on these repositories I would use Nant's exec task with the SVN command line tool to get the files.
<exec program="svn.exe">
<arg line="co https://productvss:8443/svn/Connect200/branches/Release_5.0.0.0 <local_wc_directory>"/>
</exec>
same idea for the other two repositories...
Or you can create a small SVN project with only externals to your different projects path.
So When CC.NET do a checkout, it will get all the structure from different SVN path/Repo.
http://svnbook.red-bean.com/en/1.0/ch07s03.html
Related
First, I'm a Jenkins neophyte. I have made a free-style software project in Jenkins to perform my Linux build. The Jenkins server is running on Windows so there are slave nodes configured for doing this Linux build. The sources are kept in a TFS server.
I updated our TFS plugin to the latest of 4.0.0. This plugin says that it is no longer necessary for slave nodes to have the Team Explorer Everywhere package installed as it uses the Java API. However, when I kick off my build, I get this:
Started by user Andy Falanga (afalanga)
[EnvInject] - Loading node environment variables.
Building remotely on dmdevlnx64-01 (PY27-64 CENTOS6-64 LOG4CPLUS PY26-64) in workspace /home/builder/jenkins/workspace/Linux Autotools Build
Deleting project workspace... done
Querying for remote changeset at '$/Sources/Branches/Andy/AutotoolsMigration' as of 'D2015-10-05T18:26:27Z'...
Query result is: Changeset #4872 by 'WINNTDOM\afalanga' on '2015-09-25T23:36:24Z'.
Listing workspaces from http://ets-tfs:8080/tfs/SoftwareCollection...
... Long list of workspaces
Workspace Created by Team Build
Getting version 'C4872' to '/home/builder/jenkins/workspace/Linux Autotools Build'...
Finished getting version 'C4872'.
[Linux Autotools Build] $ /bin/bash /tmp/hudson7081873611439714406.sh
Bootstrapping autotools
/tmp/hudson7081873611439714406.sh: line 4: ./bootstrap: No such file or directory
Build step 'Execute shell' marked build as failure
Notifying upstream projects of job completion
Finished: FAILURE
I log into that system and look in the directory /home/builder/jenkins/workspace/Linux Autotools Build and sure enough, there's nothing there. My configuration is pretty simple.
I have discard old builds checked and a simple rotation (this is just me learning how to use it).
I have it set to "Restrict where the build is done" and a label which associates to the 3 slave nodes for doing this build.
All TFS credentials are input and correct.
No build triggers
A simple shell script for Build->Execute Shell which bootstraps the autotools and calls configure and then make.
What am I doing incorrectly?
I found the answer and am posting it here in case someone runs into this. This seems better than simply deleting the question. The TFS plugin doesn't seem to like spaces in the project name. The name before Linux Autotools Build which didn't work and the name now, LinuxAutotoolsBuild which does.
The errors provided by the Jenkins system didn't provide enough information for this to be apparent. After trying a few other things the thought occurred, "Perhaps the spaces are causing grief."
Hope this helps someone.
I use jenkins to do auto deployment weekly to a tomcat server, and it is fairly simple to do using the "curl" with the tomcat manager. and since i am only uploading a .war file, so its very straight forward.
But when comes to a backend console application, Anyone has any idea how to use jenkins to upload an entire "set of folders with files" onto a linux box? The project that i have is built via ant and has all the folder inside the SVN.
A couple things come to mind.
Probably the most straightforward thing to do is use the ant scp task to push the directory / directories up to the server. You'll need the jsch jar on your Ant classpath to make it work, but that's not too bad to deal with. See the Ant docs for the scp task here. If you want to keep your main build script clean, just make another build script that Jenkins can run named 'deploy.xml' or similar. This has the added benefit that you can use it from places other than Jenkins.
Another idea is to check them out directly on the server from SVN. Again, ant can probably help you with this if you use the sshexec task, and run the subversion task inside of that. SSHexec docs here
Finally, Jenkins has a "Publish Over SSH" plugin you might try out. I've not used it personally, but it looks promising! Right over here!
There is server running under CentOS with php-fpm and nginx on aboard. Two projects are hosted, one of them is primary, the second contains half of the primary project as symlinks and part corresponding to itself. Both projects are in git repos. The primary project works correct under Linux and Windows machines after cloning the repo. But the second project contains symlinks and it doesn't work properly.
I don't know what to do. It's important to save the symlinks, but how should we work with the second project on Windows? Some hooks with git (replace symlinks with files before pull)?
git converts symlinks to text files on Windows, since symlinks are available only on *nix environments, and msysgit doesn't take care of them by default.
You can create a post-commit hook to workaround them.
Check answers on git symlinks in windows, specifically this one where a user has given steps to handle the scenario.
You are looking for git submodules: http://git-scm.com/docs/git-submodule
I'm setting up buildbot to build a project. The project's code is stored in SVN and it uses a couple of libs in our SVN repository.
When performing a manul build, what I need to do is (of course) to checkout the main project and the libs. The command used to checkout the libs is something like:
svn co svn://<path_to_lib_repo>/trunk mylib
That way the code of the library is stored in a local folder called "mylib" where the makefiles will look for.
Is there a way to configure the SVN build step to have the code checked-out to a folder with a custom name, as above? I did not found a way so far.
As a (temporarly?) workaround on Linux, I'm using the ShellCommand() step building myself the svn command, but I really don't like such solution.
Use the workdir paraemter to set the directory where you want the files. For example:
f.addStep(SVN(name='pull.src', repourl=svn://<path_to_lib_repo>/trunk,
workdir='mylib',
description='pull.src'))
I've a nant script that builds a VS2008 solution. When I run it myself by typing 'nant' in the command line all the correct DLLs are copied to the respective bin directories. But when Cruisecontrol performs the CI build no DLLs are copied to the bin directories.
Any ideas what's causing this?
Your problem, dear Mr. Flibble, is that you have specified "test" as the target in the cc.net config which is overrigind the default target (build) that gets executed when executing nant from the commandline.
Very probably there is something in your environment not in the Cruise Control environment. Add something in the CruiseControl build (like setting verbose on nant) and confirm you have the same paths set up.