Pre-requisites:

Steps:

1. Download and install BuildMaster from: https://inedo.com/buildmaster/download using the Inedo Hub installer

If you're not already aware, BuildMaster is a CI/CD tool that automates the release and deployment process from source control to production.

2. In BuildMaster, visit Admin > Extensions to install the following extensions:

Extensions are "plugins" that add and/or extend functionality (including deployment operations, automated approvals, source control integration, and more) within BuildMaster, and are fully customizable. Visit the Inedo SDK documentation for more information.

2.5 Upgrade Extensions (AMI Only)

If any of the extensions listed above appear out-of-date, make sure to upgrade them to their latest versions.

3. Applications dropdown > Create new application…

Fields:

An application in BuildMaster is similar to a project in Jenkins/TeamCity, and it can encapsulate all the necessary plans, pipelines, builds, and releases for software that gets released. For more information, visit the applications documentation.

4. Create a Build plan; Plans > Create Plan

Fields:

A plan is a script (using the language "OtterScript") that specifies the tasks and operations that occur to ultimately build or deploy an application. It is very simple to learn, has an associated visual editor, and offers both declarative and functional-style syntax that simplifies even the most complex deployments with features such as: conditionals, loops, retries, exception handling, parallel deployments, modules, direct PowerShell or Shell script usage, and much more. Visit the execution engine documentation to learn more.

5. Edit Build plan:

  ##AH:UseTextMode
  Git::Get-Source
  (
      RepositoryUrl: https://github.com/kramerica-industries/Accounts.git,
      Branch: tdwtf
  );

  NuGet::Restore-Packages();

  MSBuild::Build-Project Accounts.sln
  (
      To: ~\Output
  );

  WindowsSdk::Execute-VSTest
  (
      TestContainer: ~\Output\Accounts.Tests.dll
  );

  Create-Artifact Website
  (
      From: ~\Output\_PublishedWebsites\Accounts.Web
  );

6. Edit the pipeline; Pipelines > Accounts > JSON Editor:

  {
    "Name": "Accounts",
    "Color": "#c1103b",
    "Description": "Example pipeline for the TDWTF mug download",
    "Stages": [
      {
        "Name": "Build",
        "Targets": [
          {
            "PlanName": "Build",
            "EnvironmentName": "Integration",
            "ServerNames": [
              "localhost"
            ],
            "DefaultServerContext": "Specific"
          }
        ]
      },
      {
        "Name": "Testing",
        "Targets": [
          {
            "PlanName": "Deploy Accounts",
            "EnvironmentName": "Testing",
            "ServerNames": [
              "localhost"
            ],
            "DefaultServerContext": "Specific"
          }
        ]
      },
      {
        "Name": "Production",
        "Targets": [
          {
            "PlanName": "Deploy Accounts",
            "EnvironmentName": "Production",
            "ServerNames": [
              "localhost"
            ],
            "DefaultServerContext": "Specific"
          }
        ],
        "Gate": {
          "UserApprovals": [
            {
              "Name": "Admin",
              "Description": "Make sure there are no WTFs"
            }
          ]
        }
      }
    ]
  }

A pipeline is a concept familiar to anyone who is familiar with hosted CI solutions; a way to define a repeatable release process by defining the servers and environments that your builds will be deployed to, as well as the manual and automatic approvals required at each stage of the process. Visit the pipelines documentation to learn more.

7. Create a release; Releases > create…

Fields:

A release is an event where a planned set of changes are tested and delivered to production, or more specifically, a final pipeline stage (i.e. deployed).

8. Create a build; From release page, select "Create Build", then click "Create Build" with the default values

A build in BuildMaster is the fundamental unit of deployment under the context of a release that advances through a sequence of pipeline stages in order to effectively deploy a release. Its components may consist of any or all of the following: artifacts, unit tests, variables, and more.

9. If the build is successful, there will be a green box for the Build stage, with a Website artifact and 3 passed unit tests:

Successful Build

10. Edit the “Deploy Accounts” plan; Plans > Deploy Accounts – using a path on your desktop/server:

  Deploy-Artifact Website
(
    To: C:\tmp\buildmaster\$PipelineStageName
);

11. Deploy the build to Test; visit Builds > 1.2.3 #{buildNumber} > Testing

While not particularly impressive, hopefully it is obvious what is happening: with a single operation, a captured build artifact is deployed to a path based on variable evaluation, and can be as general or specific as necessary to accommodate any type of deployment, including packages, containers, etc.

Examine the files on disk at C:\tmp\buildmaster\Testing

On the build overview page, you can see that the deployment to Production is orange, because the pipeline contains an approval that was not met

12. On the build overview page, under Approvals, submit a "Make sure there are no WTFs" approval for the build

Once the approval is added, the production deployment option should turn blue

13. Deploy to Production

The release becomes "deployed" at this point, and in order to deploy the application again, you simply need to create a new release and build/deploy the BuildMaster build through the pipeline.

Examine the files on disk at C:\tmp\buildmaster\Production (they should match the ones from Testing)

14. Copy Production Execution Logs

To complete the process and receive your mug, the final step is to copy and paste the execution logs for the production deployment.

To accomplish this, visit the Accounts application overview, click Builds > "view deployments" for the Deployed build > filter by Production > click the specific date under the "Execution" heading > and finally, click "View Log Text".

15. Submit Application

Once the execution logs are copied, visit the following Google form: https://goo.gl/forms/LXnEp4G9EFCRCvUz2