DEV@cloud » Sharing Files with Build Agents

Sharing Files with Build Agents

Last modified by Michael Neale on 2014/09/29 01:17

NOTE: due to issues and complexities with webdav support - we are encouraging people to try other means of sharing credentials, software packages and such before using the feature that follows below. Credentials plugin + credentials binding can work well for secrets, tools installers for software and so on. 

Overview

When building software, you often need files which should not be stored in your source code repository.  These might include secret files such as passwords or key files.

To share such files with the build agents, each DEV@cloud account has a standard private WebDAV repository for storing arbitrary files.  These files are mounted under /private/<account-id> and are accessible to any job in your account. Note this is mounted read-only, so you can not modify any files from the job.

To enable your jobs to use the /private options, you just need to check the "Mount CloudBees DEV@cloud Private WebDav Repository" option on your build configuration page:

mountprivate.png

Please note this option only make sense for CloudBees slaves. If you're using an On Premise Executor, you'll need to configure a webdav mount to https://repository-<account>.forge.cloudbees.com/release/.

Adding Files

To upload files to this repository you need to connect with a WebDAV client to https://repository-{account-id}.forge.cloudbees.com/private/ using your CloudBees username based credentials (i.e. username / password - not email / password).

Because this repository is exposed over webdav, you and all of your developers can mount it as a webdav drive, allowing you to interact with it just like a local drive (drag and drop operations, etc).  How to mount this depends on your operating system, but here are some pointers on how to do this:

Using Alternate Maven Settings

Using this private file storage, you can upload a maven settings.xml which can be referenced by your build.  Once you've uploaded the settings.xml, you can pass it to your Maven build using the "Alternate Settings" field of your Maven build. This can be found by clicking the "Advanced" button in the Maven build section:

alternatesettings.png

NOTE: When providing an alternative settings.xml, you are advised to use a path relative to the workspace.  You can safely ignore this warning.

Again, the path to your private file store is /private/<account-id>/

Tags:
Created by Ryan Campbell on 2011/07/20 22:42