> For the complete documentation index, see [llms.txt](https://charles-bryant.gitbook.io/automating-the-microsoft-stack/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://charles-bryant.gitbook.io/automating-the-microsoft-stack/build/stages.md).

# Stages

## Dependency Resolution

* Dependency resolution is the process of gathering dependencies necessary for building and running the application.

## Build

* Build is the process of creating runnable assets from source code.

## Quick Test

* Quick tests are tests that run in 1 second or less.
* Quick tests generally include:
  * Unit
  * FxCop
  * StyleCop
  * Static Security Checks
* If they run in 1 second or less, quick tests also include functional UI and API tests tagged as Quick.
* Automated quick tests will be ran automatically after every build.
* A build will be certified only after all automated quick tests have passed.

## Packaging

* Packaging is the process of creating a distributable package from build and static assets and dependencies.

## Release

* Release is the process of shipping versioned packages to the artifact repository.

## Artifact Repository

We currently build the entire application in one pass and produce all of the artifacts at the end of the build. The package stage in the build pipeline will create a versioned folder and each application is packaged into a zip and stored in the Application folder. Separate zips are created for sql schema, object, data, and rollback files and added to the Database folder. The environment configuration is packaged into a zip and added to the Configuration folder (this will eventually be replaced by DSC). Lastly, the build generates a version meta file and it is added to the root of the version folder.

* Artifact Repository
  * Project
    * Channel
      * Version  &#x20;
  * AppName
    * CI
      * AppName.5.4.7-1254\_CI
        * Application
        * Database
          * Schema
          * Object
          * Data
          * Rollback
        * Configuration
        * Meta
    * Beta (Test)
      * AppName.5.4.7-1254\_Beta&#x20;
    * Alpha (Dev)
      * AppName.5.4.7-1254\_Alpha
    * RC (UAT)
      * AppName.5.4.7-1254\_RC
    * Gold&#x20;
      * AppName.5.4.7-1254

## Pipelines

### Build

On each build a new CI version folder is automatically created.

### Test

The Test pipeline will monitor the CI channel. The Test pipeline will automatically trigger when a new version is found. If there are new CI versions created while tests are running, the Test pipeline will get the latest version.

Since the Test database is reset on each test it is viable to deploy any version to Test.

If the tests pass on the Test server a new Beta version is automatically created by promoting (copying) the CI version to the Beta channel.

### Dev

The Dev pipeline will monitor the Beta channel. Nightly, the Dev pipeline will select the newest version from the Beta channel to automatically deploy to the Development server.

Once sprint testing is complete the Sprint Tested pipeline is manually triggered and the Beta channel is promoted to Alpha.

### UAT

When the team is ready for UAT, they select the next version in the Alpha channel to deploy to UAT and trigger the deploy. The deploy has to be with a version that is newer than the current version in UAT.

Database schema changes can only rollback one version.

Once UAT is complete the UAT Certified pipeline is manually triggered and the Beta channel is promoted to Alpha.

### Production

When the team is ready for Production deployment, they select the next version in the RC channel to deploy to Production and trigger the deploy. The deploy has to be with a version that is newer than the current version in Production.

Database schema changes can only rollback one version.

Once the Production deployment is complete the RC version is promoted to the Gold channel.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://charles-bryant.gitbook.io/automating-the-microsoft-stack/build/stages.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
