Pipeline Execution Architecture in Buddy

How Buddy Pipelines Work

Buddy executes pipelines in isolated containers per action step, relying on cached layers and environment variables for context. Failures often occur due to missing environment inheritance or Docker image mismatches.

Pipeline Step: Build Docker Image
Base Image: node:18-alpine
Error: Module not found: "node_modules not present"

Ensure volume mounts and working directories are consistent across steps. Use shared filesystem or cache actions when reusing dependencies.

Environment and Variable Propagation

Global environment variables may not propagate as expected between pipelines triggered via webhooks or API. Use project-level and pipeline-level scopes appropriately.

env.GLOBAL_VAR is undefined in child pipeline

Always declare critical variables at the project level if used across multiple pipelines. Validate scopes during pipeline design.

Common Troubleshooting Scenarios

1. Webhook Delivery Failures

Webhook-triggered builds may not run due to IP restrictions, missing payload validation, or pipeline permissions.

Status: 403 Forbidden
Message: Invalid signature or unknown source

Verify webhook signatures, ensure source IPs are whitelisted, and enable the pipeline for external triggers.

2. Docker Build or Push Failures

Docker-based actions may fail due to tag mismatches, authentication issues, or rate limits from Docker Hub.

Error: denied: requested access to the resource is denied

Check DockerHub credentials in Buddy integrations, use authenticated registries, and monitor Docker pull quotas.

3. Broken Cache Layers

Cache keys or shared volumes may invalidate between builds, especially with dynamic paths or dependencies.

Warning: Cache not restored, step starting from scratch

Use fixed cache keys and restore paths. Avoid using timestamped directories unless cache busting is intentional.

Diagnostics and Logging

Pipeline Debug Mode

Enable debug mode in Buddy to see full logs, environment variable resolution, and exit codes from each step.

Enable: Pipeline > Settings > Debug Logs
Look for: "Action exited with code 1"

Container-Specific Errors

Some failures originate from container misconfigurations—such as missing tools or misaligned entrypoints.

Error: bash: yarn: command not found

Ensure each step's base image includes required binaries or install them during the action setup phase.

Step-by-Step Fix Guide

1. Normalize Environment Variables

Audit variable scopes across projects, pipelines, and actions. Avoid shadowing project-level vars in action-level configs.

2. Secure Docker Integrations

Use SSH or token-based auth for Docker registries. Validate credentials and avoid hardcoding sensitive data.

3. Implement Pipeline Retry Logic

Enable retries for flaky actions (e.g., network operations). Configure conditional execution using Buddy's failure rules.

4. Use Static Cache Paths

Keep consistent cache restore/save paths. Use shared cache between similar pipelines if possible to speed up builds.

5. Validate Webhook Permissions

Ensure GitHub/GitLab webhooks include valid tokens and Buddy's IPs are whitelisted in your firewall or cloud settings.

Best Practices for CI/CD with Buddy

  • Use Docker-in-Docker with care—avoid nesting multiple build layers unless necessary
  • Isolate pipeline stages using logical grouping for better visibility and faster debugging
  • Use parameterized pipelines for environment-specific deployments
  • Tag images and artifacts with Git SHA to ensure traceability
  • Automate test coverage and linting in pre-deploy steps

Conclusion

Buddy's CI/CD platform is intuitive and flexible—but like any system, complexity grows with scale. Visual pipelines can mask subtle issues in variable scoping, container configuration, or webhook setup. By mastering how Buddy manages environments, caches, and integrations, teams can build highly resilient pipelines that are both fast and secure. Establishing consistent patterns for debugging, observability, and authentication will ensure CI/CD pipelines remain reliable under real-world workloads.

FAQs

1. Why is my cache not restored in subsequent builds?

Check that cache keys and restore paths match exactly. Use static identifiers instead of dynamic filenames or timestamps.

2. How do I trigger pipelines from GitHub securely?

Use signed webhooks and validate payloads using the GitHub secret. Also ensure Buddy has permission to access the repo.

3. What causes Docker login failures in Buddy?

Often due to expired credentials or incorrect integration scope. Refresh Docker tokens and avoid expired secrets.

4. Can I use multiple environments in one pipeline?

Yes. Use parameterized pipelines and branching conditions to route builds to staging, dev, or production.

5. Why do my variables disappear between pipeline steps?

They might be scoped to a single action. Use project-level or pipeline-level variables to maintain context.