You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

What is a workspace?

Each build has its own workspace: a directory that is sync'd between the Continua server and any agents the build runs on. It contains things like a serialized copy of the build's variables, any artifacts that are registered, and the build log. When a build is run on an agent, the correct version of the source is copied from the cache into the workspace. Using a copy means that we can run multiple builds of the same stage, at the same time, on the same agent without any conflicts. This is very useful if you set up feature branch builds.

Although a copy of the source is placed in the workspace on the agent, we don't sync this back to the server. The performance cost of moving a potentially large amount of data around for every build is too high. If you need changes to be available to later stages, you can specify which files are moved to and from agents for each stage.

 

What can I find in a Build's Workspace?

The contents of a build's work space changes depending on where it is and what stage the build is at. When a build has been initialized, the work space contains the variables and build log and only exists on the server. Once a build hast started, the work space will have been copied to an agent and will addtionally contain whatever repositories were associated with the Configuration that started the build. Lets assume you have associated two Repositories with the Configuration you're about to build and have called them MySourceRepo and MyBinariesRepo. The work space on the agent will look something like this:

\Source
    \MySourceRepo
    \MyBinariesRepo
\Variables
    <HOSTNAME>_Environment.xml
    VariablesNamesapces.xml
log

As the build progresses the work space will change. For example, after each stage has executed the Variables are registered as artifacts. An updated work space would look like this:

\Artifacts
    <HOSTNAME>_Environment.xml
    VariablesNamesapces.xml
\Source
    \MySourceRepo
    \MyBinariesRepo
\Variables
    <HOSTNAME>_Environment.xml
    VariablesNamesapces.xml
log

Continua allows you to have full access to the work space so you can copy and remove files as you please, you can also register some files as artifacts that will be kept after the build has been completed and the work space cleaned up. Lets assume you've created a stage that builds the source files in your repository, registers the output executable as an artifact and copies the output dll's to the work space's root. Your work space structure might look something like this:

\Artifacts
    <HOSTNAME>_Environment.xml
    VariablesNamesapces.xml
    MyApplication.exe
\Source
    \MySourceRepo
    \MyBinariesRepo
\Variables
    <HOSTNAME>_Environment.xml
    VariablesNamesapces.xml
log
mylib.dll
anotherlib.dll

Assuming you don't delete those files, they, along with the directory structure will exist no matter which stage the build is at.

 

 

How do I make use of files in the Work space?

When adding actions to stages in a Configuration, you may want to make use of the output of actions that have previously run. 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  • No labels