Use this after something fails. Start with the symptom closest to what you are seeing.

Use this appendix when something has already failed. For preventative warnings, see Appendix H — Known Issues, Gotchas, and Things to Anticipate.

G.1 dotnet is not recognized

Symptom

Jenkins reports that dotnet cannot be found.

Check interactively

dotnet --info

Check from Jenkins

bat 'where dotnet'
bat 'dotnet --info'

Likely causes

  • .NET SDK not installed;
  • PATH not available to the Jenkins service;
  • Jenkins service started before a PATH change;
  • pipeline is running on a different agent than expected.

Resolution approach

  1. Confirm the SDK is installed.
  2. Confirm dotnet --info works interactively.
  3. Confirm Jenkins can locate it.
  4. Restart Jenkins only when appropriate after environment changes.
  5. Rerun the pipeline.

G.2 git is not recognized

Check:

git --version

and from Jenkins:

bat 'where git'
bat 'git --version'

Verify Git installation and the Jenkins service/agent PATH.

G.3 Pipeline builds locally but fails in CI

Compare:

  • working directory;
  • OS and shell;
  • .NET SDK/runtime;
  • Java/Jenkins environment;
  • environment variables;
  • credential availability;
  • file path separators;
  • files that exist locally but were never committed;
  • case sensitivity;
  • agent/runner image.

G.4 Test fails after a deliberate greeting change

This is expected if production code says:

Hello from Jenkins!

while the test still expects:

Hello, world!

Update the test only after confirming the failure was observed and understood.

G.5 Jenkins cannot clone the GitHub repository

Check:

  1. repository URL;
  2. repository visibility;
  3. GitHub credentials if private;
  4. Git installation on the Jenkins agent;
  5. branch name;
  6. network/DNS access from Jenkins;
  7. SCM configuration in the Pipeline job.

G.6 Static-site validation fails

Run locally:

powershell.exe -NoProfile -File .\scripts\Test-StaticSite.ps1

Check:

  • site/index.html exists;
  • the file is not empty;
  • required HTML elements exist;
  • expected H1 text matches;
  • local CSS links point to real files.

G.7 AWS CLI is not recognized

Run:

aws --version

For this guide, prefer AWS CLI v2.

If Jenkins cannot find AWS CLI but your terminal can, check the Jenkins service/agent PATH.

G.8 AWS authentication fails

Do not fix this by placing a real key in source control.

Check:

  1. which identity the pipeline is expected to use;
  2. whether credentials were injected correctly;
  3. whether credentials are expired;
  4. whether the AWS region/configuration is correct;
  5. whether system clock skew is significant;
  6. whether IAM allows the requested action.

G.9 AccessDenied during S3 deployment

Check the exact operation that failed.

Common required capabilities for a sync can include listing the bucket/prefix and putting objects; deletion additionally requires delete permission.

Scope permissions to the demo bucket/prefix rather than granting broad account-wide access.

G.10 Site deployed but browser still shows old content

Possible causes:

  • browser cache;
  • CloudFront cache if CloudFront was added;
  • deployed to the wrong bucket/prefix;
  • pipeline deployed a different commit;
  • HTML references cached assets.

Verify the S3 object itself before changing the pipeline.

G.11 Azure/GitHub hosted build works differently from local Jenkins

Hosted environments are freshly provisioned and may have:

  • different SDK versions;
  • different PowerShell versions;
  • different environment variables;
  • different filesystem paths.

Read the run’s environment/setup logs and compare them with the tested-environment record in PREREQUISITES.md.

G.12 Never solve a secret problem by committing the secret

If authentication fails, fix the authentication mechanism.

Do not paste real credentials into:

  • YAML;
  • Jenkinsfile;
  • PowerShell scripts;
  • README files;
  • issue comments;
  • screenshots.