Skip to content
Michael Minton edited this page Jan 22, 2026 · 3 revisions

Welcome to the faktory wiki!

Start here -> https://github.com/Iddeal/faktory/blob/master/README.md

Faktory Lifecycle

image

Build Lifecycle

In the RunBuild method you start by calling Run and chaining additional calls via Then. Each of these actions gets appended to a list of BuildActions. These are not run until Execute is called.

If any action throws an exception or calls Fail, the entire build stops, and the failure is printed to the console. Currently, we do not support continue on failure.

Faktory Context

The Faktory will attempt to determine the context under which it is running. This context is available to your Faktory via the Context method.

Supported CI Environments

Name Supported Custom Logger
TeamCity Yes Yes

Adding support for another CI Context

  1. Create an IProgressReporter specific to the CI environment. See TeamCityProgressReporter for an example.
  2. Modify Context.CiRunner to add support for your new CI environment.
  3. Modify FaktoryRunner.BootUp to select the new IProgressReporter for your CI.

Helpers

Namespace Method Options Notes
AssemblyUpdater Update filePath, attributes See AssemblyInfo for updatable fields.
Crypto GetFileHash filePath Calculates SHA256 Hash
Io CleanDirectory path If the directory does not exist, it is created.
Io Copy file, destination If the destination doesn't exist, it is created.
Io Copy destination, files[] If the destination doesn't exist, it is created.
Io Copy source, destination, files, options This uses robocopy and options are passed to the robocopy command.
Io DeleteFile file
Io DeleteFiles files
Io DeleteDirectory directory
Io GetAllFilesMatching path, pattern Uses Directory.EnumerateFiles
Io WriteTextFile path, contents
MsBuild Clean solutionPath, configuration, platform
MsBuild Run solutionPath, configuration, platform, target, optimize, outputDir, args
MSpect FindRunner mspecPath Recursively searches for mspec console runner in given path
MSpect RunTests assemblies, outputDirectory, options, continueOnFailedTest Runs Machine.Specifications tests in given assemblies
NUnit FindRunner nunitPath Recursively searches for nunit console runner in given path
NUnit RunTests assemblies, outputDirectory, options, continueOnFailedTest Runs NUnit tests in given assemblies
Process Run command, arguments, workingDirectory, maskArguments, validExitCodes[]