Dashboard > CruiseControl.NET > ... > Task And Publisher Blocks > Package Publisher
Package Publisher Log In | Sign Up   View a printable version of the current page.  
CruiseControl.NET documentation for latest CI builds
Added by Craig Sutherland , last edited by Craig Sutherland on Jan 07, 2010  (view change)

Package Publisher

Generates a ZIP file package containing the specified files.
This will generate a "package" of files in a compressed format. The files must be specified, plus an optional manifest can be included.
This publisher also allows the generation of a "manifest" to include in the package. A manifest contains additional details on the package, both at a general level and at a file level.

Version

Available from version 1.4.4

Examples

Minimalist example
<package>
  <name>Example</name>
  <files>
    <file>Results.txt</file>
  </files>
</package>
Full example
<package>
  <name>Example</name>
  <compression>9</compression>
  <always>true</always>
  <flatten>true</flatten>
  <baseDirectory>C:\Builds\CC.Net</baseDirectory>
  <manifest type="defaultManifestGenerator" />
  <files>
    <file>Results.txt</file>
  </files>
</package>

Configuration Elements

Element Description Type Required Default Version
always Whether the package should always be generated or not.
By default a package will only be generated for a successful build. Setting this property to true, and including it in the publishers section means the package will always be generated, irrespective of the outcome of the build.
Boolean No false 1.4.4
baseDirectory The directory to base all the file locations from. String No Project working directory 1.4.4
compression The level of compression to use. The valid range is from zero to nine, zero is no compression and nine is maximum compression. Int32 No 5 1.4.4
description Description used for the visualisation of the buildstage, if left empty the process name will be shown. String No The task/publisher name. 1.5
dynamicValues The dynamic values to use for the task. Dynamic Values array No None 1.5
files The files to include in the package.
All relative files will be relative to the baseDirectory.
String array Yes n/a 1.4.4
flatten Should the file structure be flattened or not.
By default, the folder structure will also be included in the package. Setting this property to true will flatten (omit) the folder information.
Boolean No false 1.4.4
manifest The manifest generator to be used.
If this property is not set no manifest will be generated.
Manifest Generators No None 1.4.4
outputDir The location to output the package to. String No Project Artifact Directory 1.4.4
name The name of the package file.
This will be the filename of the package. If the extension zip is omitted, it will be added automatically.
String Yes n/a 1.4.4

Notes

Sub-folders

Sub-folders can be added using a combination of relative paths in the filename and a base directory. When a file is added, the publisher checks if the filename is relative to the base directory and strips the base directory from the file name.
For example, the following configuration will add two files, logo.gif in the root and AdminIcon.gif in a sub-folder.

<package>
  <baseDirectory>temp</baseDirectory>
  <files>
    <file>logo.gif</file>
    <file>images\AdminIcon.gif</file>
  </files>
  <name>output</name>
</package>
Automatically Generated

Documentation generated on Thursday, 7 Jan 2010 at 10:07:16 PM

Is there a way to download these packages from the webdashboard?

Hi Jeremiah,

This is not available in 1.4.4 - there is a new plug-in added as part of 1.5.0 that will allow this.

Sorry, I'm new to CruiseControl.
Does CruiseControl allow you to do both of the following?

1) Build .dlls and
2) Deploy them onto target servers.

can this achieved through some config settings?

regards

CruiseControl.net allows you to run a set of programs on a schedule, or when triggered through a web site or a gui application. The web site is the standard dashboard installed when ccnet is installed. The gui application could be cctray or FastForward.net. That's the basic capability.

You could use that to build .dlls and deploy them on to target servers. CruiseControl.net does have specific tasks used to build dlls, by calling out to NAnt, MSBuild or devenv. If you are building something more exotic you could use the generic execute task to call any compiler you'd like to.

CruiseControl.net does NOT have specific capability to deploy to servers, in the way that Capistrano or the various Microsoft management products do. But despite no specific capability, I have still done it. I used ccnet to trigger NAnt. NAnt copied files to an open network share on the destination server, and then used psexec from Microsoft to unzip the files and reset IIS on the server.

I don't think the outputDir argument may be working correctly? When I specify a directory I wish it to go into, it copies the file directly into it with a name of "PackagePublisher" - no extension etc. Which means if you have multiple packages, only the last one will survive. Shouldn't these be going into seperate directories like they do in the Artifacts directory? It also only copies the file, I would've assumed they would only be output to the outputDir, and not just copied from the artifacts dir.

Posted by james at Feb 24, 2010 05:47
Powered by a free Atlassian Confluence Open Source Project License granted to ThoughtWorks Inc. Evaluate Confluence today.
Powered by Atlassian Confluence 2.7.1, the Enterprise Wiki. Bug/feature request - Atlassian news - Contact administrators