Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

From the homepage, click on the configuration name to navigate to the Configuration Activity page, as shown below. If you attempted to run a build before we created our action workflow then you should see that our Fail Streak is 1 and 1 failed build was has run.

So lets run our build by clicking the Quick Build Button (Fast Forward) in the top right hand corner of the screen. When a build begins executing it is added to the build queue while it searches for a compatible agent that can run all actions in the build's first stage. By default, Continua installs a local agent on the server, however additional agent licenses can be purchased to enable distributed builds. Once a suitable agent has been found, the build will be removed from the queue and become a Running Build, as shown below.

...

Once a build has completed, it will be displayed as either a green or red build, signifying whether the build finished successfully or failed. Regardless of the result, the Configuration Activity Page will provide an overview of the last 10 builds that were run. More details can be found by clicking on the build number, which will take you to the Build Detail page. So lets click on the last successful build and have a closer look at what happened with our build.

 

Build Activity

The Build Activity page provides an overview for a specific build. Along the top of the page you should notice several tabs that provide additional information regarding the current build. More information regarding these pages can be found in the Viewing Build Results Section. Feel free to poke around the entire builds section and check what information is available to you.

...

Remember how in Part 4: Create your First Action we set the output path of the MSBuild action to $Workspace$/output? By setting this as our output directory, Continua passed our compiled project back to the Continua Server. When an agent passes source back to the server, it is stored in the server's ContinuaShare, which you specified during the Continua install. Your source can be accessed through the ContinuaShare, however this is not the easiest way to access your project. Instead, lets create another stage in our build process and send our source to a more accessible location.

So lets navigate back to the Workflow editor on our configuration in the Configuration Wizard and add another stage by clicking the Add Stage button. This stage will be responsible for the sole task of moving our sourcecompleted project, so lets call our stage Move Project.

...

Once the new stage has been created, it will be added to the Stage Editor after our existing Build Stage, as shown below. These stages can be dragged around to change their execution order and clicking on the stage will select it and , which will show all the actions that will be executed in that stage. With our Move Project stage selected, our MSBuild action will not be shown in the Action Workflow Editor as that action is executed in the Build stage.

...

So with our Move Project stage selected, we will need to add two actions, a Create Directory Action and a Copy Action. Basically we are copying the files over to a more accessible location, but by running the Create directory action first, we are guaranteeing that our directory exists. For this example I want to copy all my project files to C:\ContinuaTutorial on my Continua Server. So find the Create Directory action under the File Operations action category and set the Path to \\$Server.Hostname$\c$$\ContinuaTutorial, as shown below. When specifying file locations, always remember that this stage could run an ANY Agent. If I pointed my Create Directory action to C:\ContinuaTutorial then this folder would be created on the Agent machine rather than the Continua Server. If this stage was run on the local agent then the folder would be created on the Continua server correctly, however this would be incorrect once distributed agents were if a distributed agent was running this stage.

So lets break this path down.

  • You can see that we are getting the Server's hostname from a Continua Dynamic Object by calling $Server.Hostname$.
  • We need to specify the C:/ local drive, however the dollar ($) sign is a reserved character in any fields that except accept Query Expressions. In Continua you can escape reserved characters by doubling them up. ie. $$. So instead of calling c$ for the local drive, we need to call c$$.
  • The actual directory that we want to create, ContinuaTutorial, is then specified. At runtime this path would then be read as \\<server_name\c$\ContinuaTutorial

When saving this Create Directory action, make sure it is enabled and Fail if directory exists is NOT checked, as we want the project to copy over the existing project every time we run a build.

...

Once both the Create Directory action and the Copy Action have been created, you your action workflow should look something like the screen grab screenshot below. So lets hit Save & Complete Wizard and then run our build again.

...

We are now almost at the finish line. At the moment Currently running a build manually isn't really that useful as you still need to hit the run button but this is all about to change.

...