Use this to look up a command or directive by name, including syntax, required and optional values, examples, cautions, and chapter links.

This appendix is sorted alphabetically by tool family, then alphabetically by command/directive. That is more useful for reference than sorting by importance.

Every entry should include:

  • purpose;
  • syntax;
  • required values;
  • optional values used by this guide;
  • at least one complete example;
  • important behavior/cautions;
  • Used in chapter links.

This is a curated reference for commands used in the guide, not a replacement for each product’s complete official command reference.

AWS CLI

aws --version

Purpose: Display the installed AWS CLI version.

Syntax:

aws --version

Required parameters: None.
Optional parameters: None for this use.

Example:

aws --version

Used in: Appendix G — Troubleshooting

aws s3 sync

Purpose: Synchronize files between a local directory and S3, or between S3 locations.

Syntax:

aws s3 sync <SOURCE> <TARGET> [OPTIONS]

Required:

  • <SOURCE> — local path or S3 URI.
  • <TARGET> — local path or S3 URI.

Optional parameters used/discussed in this guide:

  • --delete — delete destination objects/files that are not present in the source. Destructive; use deliberately.
  • --dryrun — show what would be done without performing the operations. Useful before --delete.
  • --region <REGION> — select an AWS region where needed.
  • --profile <PROFILE> — use a named local AWS CLI profile where appropriate for manual testing.

Beginner example:

aws s3 sync .\site "s3://<BUCKET-NAME>"

Preview a destructive sync:

aws s3 sync .\site "s3://<BUCKET-NAME>" --delete --dryrun

Perform the destructive mirror only after reviewing the dry run:

aws s3 sync .\site "s3://<BUCKET-NAME>" --delete

Used in: Chapter 4, Chapter 7, Chapter 9

.NET CLI

dotnet add ... reference

Purpose: Add a project-to-project reference.

Syntax:

dotnet add <PROJECT> reference <REFERENCED-PROJECT>

Required:

  • <PROJECT> — project receiving the reference.
  • <REFERENCED-PROJECT> — project being referenced.

Example:

dotnet add tests/JenkinsHelloWorld.Tests/JenkinsHelloWorld.Tests.csproj `
    reference `
    src/JenkinsHelloWorld/JenkinsHelloWorld.csproj

Used in: Chapter 3

dotnet build

Purpose: Compile a project or solution.

Syntax:

dotnet build <SOLUTION-OR-PROJECT> [OPTIONS]

Required:

  • <SOLUTION-OR-PROJECT> — target to build.

Optional parameters used here:

  • --configuration <CONFIGURATION> — use Release in the guide pipeline.
  • --no-restore — do not implicitly restore packages.

Example:

dotnet build JenkinsCSharpDemo.sln --configuration Release --no-restore

Used in: Chapter 3

dotnet new console

Purpose: Create a console application project.

Syntax:

dotnet new console -n <NAME> -o <OUTPUT>

Required for the guide example:

  • -n <NAME> — project name.
  • -o <OUTPUT> — destination directory.

Example:

dotnet new console -n JenkinsHelloWorld -o src/JenkinsHelloWorld

Used in: Chapter 3

dotnet new sln

Purpose: Create a solution file.

Syntax:

dotnet new sln -n <NAME> --format sln

Example:

dotnet new sln -n JenkinsCSharpDemo --format sln

With .NET SDK 10, --format sln explicitly creates the .sln filename used throughout this guide. Without it, the SDK defaults to .slnx.

Used in: Chapter 3

dotnet new xunit

Purpose: Create an xUnit test project.

Syntax:

dotnet new xunit -n <NAME> -o <OUTPUT>

Example:

dotnet new xunit -n JenkinsHelloWorld.Tests -o tests/JenkinsHelloWorld.Tests

Used in: Chapter 3

dotnet publish

Purpose: Produce deployable/runnable application output.

Syntax:

dotnet publish <PROJECT> [OPTIONS]

Required:

  • <PROJECT> — project to publish.

Optional parameters used here:

  • --configuration Release
  • --runtime win-x64
  • --self-contained false
  • --output <PATH>

Example:

dotnet publish src/JenkinsHelloWorld/JenkinsHelloWorld.csproj `
    --configuration Release `
    --runtime win-x64 `
    --self-contained false `
    --output artifacts/publish

Used in: Chapter 3

dotnet restore

Purpose: Restore NuGet dependencies.

Syntax:

dotnet restore <SOLUTION-OR-PROJECT> [OPTIONS]

Required:

  • <SOLUTION-OR-PROJECT> — target to restore.

Example:

dotnet restore JenkinsCSharpDemo.sln

Used in: Chapter 3

dotnet sln ... add

Purpose: Add a project to a solution.

Syntax:

dotnet sln <SOLUTION> add <PROJECT>

Example:

dotnet sln JenkinsCSharpDemo.sln add src/JenkinsHelloWorld/JenkinsHelloWorld.csproj

Used in: Chapter 3

dotnet test

Purpose: Run tests.

Syntax:

dotnet test <SOLUTION-OR-PROJECT> [OPTIONS]

Optional parameters used here:

  • --configuration Release
  • --no-build

Example:

dotnet test JenkinsCSharpDemo.sln --configuration Release --no-build

Expected: test execution completes with zero failed tests.

Used in: Chapter 3

Git

git add

Purpose: Stage changes for a commit.

Syntax:

git add <PATHSPEC>

Required:

  • <PATHSPEC> — file(s)/directory pattern.

Example:

git add .

. stages relevant changes beneath the current directory.

Used in: Chapter 3

git clone

Purpose: Create a local working copy of a repository.

Syntax:

git clone <REPOSITORY-URL> [DIRECTORY]

Required:

  • <REPOSITORY-URL>

Optional:

  • [DIRECTORY] — alternate local destination directory.

Example:

git clone "https://github.com/<GITHUB-USER>/jenkins-csharp-demo.git"

Used in: Chapter 3

git commit

Purpose: Create a commit from staged changes.

Syntax:

git commit -m "<MESSAGE>"

Required in this form:

  • -m "<MESSAGE>"

Example:

git commit -m "Add initial C# Jenkins demo"

Used in: Chapter 3

git push

Purpose: Send local commits to a remote repository.

Syntax:

git push [REMOTE] [BRANCH]

Optional when upstream is configured:

  • [REMOTE]
  • [BRANCH]

Example:

git push

Used in: Chapter 3

git status

Purpose: Show working-tree/staging state.

Syntax:

git status

Example:

git status

Used in: Chapter 3

Jenkins Declarative Pipeline

agent

Purpose: Select where pipeline/stage execution can run.

Syntax example:

agent any

any means any eligible Jenkins agent.

Used in: Chapter 2

archiveArtifacts

Purpose: Preserve files from a Jenkins run.

Syntax used here:

archiveArtifacts artifacts: 'artifacts/publish/**/*',
                 fingerprint: true

Required:

  • artifacts — file pattern.

Optional used here:

  • fingerprint: true — record fingerprints for traceability.

Used in: Chapter 3

bat

Purpose: Execute a Windows batch/cmd command.

Example:

bat 'dotnet --info'

Used in: Appendix C

environment

Purpose: Define pipeline/stage environment variables.

Example:

environment {
    S3_BUCKET = '<BUCKET-NAME>'
}

Do not place real secret values directly in source.

Used in: Appendix C

pipeline

Purpose: Top-level Declarative Pipeline block.

pipeline {
    ...
}

Used in: Chapter 2

post

Purpose: Run steps based on final pipeline/stage status.

Example:

post {
    success {
        echo 'Build succeeded.'
    }
}

Used in: Appendix C

powershell

Purpose: Execute PowerShell from Jenkins on a compatible Windows agent/plugin setup.

Example:

powershell '''
    ./scripts/Test-StaticSite.ps1
'''

Used in: Appendix C

stage

Purpose: Define a named logical pipeline phase.

Syntax:

stage('Build') {
    steps {
        ...
    }
}

Required: stage name string.

Used in: Chapter 2

stages

Purpose: Container for one or more Declarative Pipeline stages.

stages {
    ...
}

Used in: Chapter 2

steps

Purpose: Container for executable pipeline steps.

steps {
    echo 'Hello'
}

Used in: Chapter 2

PowerShell

Get-Content

Purpose: Read file content.

Guide validation-script example:

$Html = Get-Content -LiteralPath $IndexPath -Raw

Important options:

  • -LiteralPath <PATH> — exact path.
  • -Raw — read the file as one string.

Used in: Appendix B

Join-Path

Purpose: Combine path components safely.

$IndexPath = Join-Path $SitePath "index.html"

Used in: Appendix B

Test-Path

Purpose: Test whether a path exists.

Test-Path -LiteralPath $IndexPath -PathType Leaf

Options used:

  • -LiteralPath — exact path.
  • -PathType Leaf — require a file rather than a directory.

Used in: Appendix B

YAML / Azure Pipelines

pool.vmImage

Purpose: Select a Microsoft-hosted agent image.

pool:
  vmImage: windows-latest

Used in: Chapter 6

publish

Purpose: Publish a Pipeline Artifact.

- publish: $(Build.ArtifactStagingDirectory)/publish
  artifact: JenkinsHelloWorld

Required:

  • path after publish;
  • artifact name is strongly recommended for clarity.

Used in: Chapter 6

trigger

Purpose: Define Azure Pipelines CI branch triggers.

trigger:
  branches:
    include:
      - main

Used in: Appendix D

YAML / GitHub Actions

env

Purpose: Define environment variables at supported workflow/job/step scopes.

env:
  S3_BUCKET: ${{ secrets.S3_BUCKET }}

Used in: Chapter 9

jobs

Purpose: Define workflow jobs.

jobs:
  build:
    ...

Used in: Chapter 8

on

Purpose: Define workflow events.

on:
  push:
    branches:
      - main

Used in: Chapter 8

run

Purpose: Execute a shell command/script.

- name: Test
  run: dotnet test JenkinsCSharpDemo.sln

Used in: Chapter 8

runs-on

Purpose: Select the runner.

runs-on: windows-latest

Used in: Chapter 8

uses

Purpose: Invoke a reusable GitHub Action.

uses: actions/checkout@v6

Pin the major version used by the verified guide baseline and review it periodically.

Used in: Appendix E