CI/CD Pipelines: Debugging and Troubleshooting

Debug logs, common CI/CD failures, strict shell mode, retries, and faster pipeline diagnosis.

View
StandardDetailedCompact
Export
Copy the compact sheet, download it, or print it.
Download
`D` dense toggle · `C` copy all
## Find failures faster
Enable GitHub Actions step debug logging
Set repository or organization secret:
ACTIONS_STEP_DEBUG=true

# Turn on runner debug logs for detailed troubleshooting.

Inspect GitLab job traces
Open the failed job in GitLab.
Expand collapsed sections.
Download artifacts and reports if available.

# Review the full job log and artifacts from failed jobs.

Replay Jenkins pipeline with edits
Open the failed pipeline run.
Use Replay if your Jenkins setup permits it.
Test the fix before committing it back to Jenkinsfile.

# Retry a failed Jenkins pipeline with small script adjustments.

## Frequent CI/CD problems and fixes
Missing secrets or permissions
test -n "$API_TOKEN" || { echo "API_TOKEN is required"; exit 1; }

# Fail early when credentials or roles are unavailable.

Use strict shell mode in scripts
set -euo pipefail

# Stop on errors and unset variables.

Retry flaky network operations
for i in 1 2 3; do
  npm ci && break
  sleep 5
done

# Wrap downloads or package installs with bounded retries.

Cancel outdated duplicate runs
concurrency:
  group: ci-${{ github.ref }}
  cancel-in-progress: true

# Keep only the latest run active for a branch or PR.

Recommended next

No recommendations yet.