Skip to content

Docs V1: Add plugin tutorial Chapter 2 - Setup, plugin types, and project scaffold - #7151

Open
rahulshendre wants to merge 7 commits into
pipe-cd:masterfrom
rahulshendre:docs/plugin-book-ch2
Open

Docs V1: Add plugin tutorial Chapter 2 - Setup, plugin types, and project scaffold#7151
rahulshendre wants to merge 7 commits into
pipe-cd:masterfrom
rahulshendre:docs/plugin-book-ch2

Conversation

@rahulshendre

Copy link
Copy Markdown
Contributor

What this PR does:
Adds Chapter 2 of the Creating a Plugin tutorial, which has sections: creating the project, adding the plugin SDK, and learning which plugin type you are building.

Why we need it:
2nd chapter of the tutorial

Which issue(s) this PR fixes:

Part of #6679

Does this PR introduce a user-facing change?:

  • How are users affected by this change:
  • Is this breaking change:
  • How to migrate (if breaking change):

…t scaffold

Signed-off-by: rahulshendre <rahulshendre789@gmail.com>
Comment on lines +49 to +51
- **Config** is configuration shared across the plugin, written in the `piped` configuration.
- **DeployTargetConfig** is configuration for a single deploy target, such as the connection details for a cluster.
- **ApplicationConfigSpec** is per-application configuration, such as the files an application deploys.

@khanhtc1202 khanhtc1202 Aug 12, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could be better if we have example for each type config or link to the examples/next chapter examples

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @khanhtc1202, I have linked the three config types to Chapter 3

Signed-off-by: rahulshendre <rahulshendre789@gmail.com>
@netlify

netlify Bot commented Aug 23, 2026

Copy link
Copy Markdown

Deploy Preview for pipecd-site ready!

Name Link
🔨 Latest commit 5723126
🔍 Latest deploy log https://app.netlify.com/projects/pipecd-site/deploys/6a8d48037d9bf10008ecfdaa
😎 Deploy Preview https://deploy-preview-7151--pipecd-site.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@codecov

codecov Bot commented Aug 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 35.98%. Comparing base (69545ec) to head (dc9e42b).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7151      +/-   ##
==========================================
+ Coverage   29.74%   35.98%   +6.24%     
==========================================
  Files         601      100     -501     
  Lines       64408     8548   -55860     
==========================================
- Hits        19158     3076   -16082     
+ Misses      43758     5301   -38457     
+ Partials     1492      171    -1321     
Flag Coverage Δ
. ?
.-pkg-app-pipedv1-plugin-analysis 32.16% <ø> (ø)
.-pkg-app-pipedv1-plugin-ecs 33.64% <ø> (ø)
.-pkg-app-pipedv1-plugin-kubernetes ?
.-pkg-app-pipedv1-plugin-kubernetes_multicluster ?
.-pkg-app-pipedv1-plugin-scriptrun 54.83% <ø> (ø)
.-pkg-app-pipedv1-plugin-terraform 38.46% <ø> (ø)
.-pkg-app-pipedv1-plugin-wait 33.04% <ø> (ø)
.-pkg-app-pipedv1-plugin-waitapproval 52.71% <ø> (ø)
.-pkg-plugin-sdk 49.65% <ø> (-0.20%) ⬇️
.-tool-actions-gh-release 19.23% <ø> (ø)
.-tool-actions-plan-preview 25.51% <ø> (ø)
.-tool-codegen-protoc-gen-auth 0.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copilot AI lite review requested due to automatic review settings August 23, 2026 07:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Chapter 2 to the Docs V1 “Creating a Plugin” tutorial, guiding readers through initializing a plugin Go module, adding the PipeCD plugin SDK, and understanding where their plugin fits in the SDK’s plugin-type model.

Changes:

  • Introduces Chapter 2 documentation covering project setup and SDK installation.
  • Explains SDK plugin type categories and summarizes the DeploymentPlugin interface surface area.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +37 to +41
`piped` does not define separate kinds of plugins on its own. For convenience, the SDK groups plugins by the interface they implement:

- **StagePlugin** provides stages that are useful during a deployment but has nothing of its own to deploy. The `wait` plugin, which pauses a pipeline for a set time, is a StagePlugin.
- **DeploymentPlugin** has something to deploy and syncs it. The `kubernetes` plugin is a DeploymentPlugin. A DeploymentPlugin also provides everything a StagePlugin does.
- **LivestatePlugin** reports the live state of deployed resources, so the web UI can show the difference between what is running and what is defined in Git. It is often implemented alongside a DeploymentPlugin.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added

- **DeployTargetConfig** is configuration for a single deploy target, such as the connection details for a cluster.
- **ApplicationConfigSpec** is per-application configuration, such as the files an application deploys.

The file plugin needs neither plugin-wide nor deploy-target configuration, so its Config and DeployTargetConfig are empty. You define all three types in the [next chapter](../chapter-03-config-types-and-empty-implementation/#define-the-configuration-types).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rahulshendre can you work on the suggestions by copilot.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mohammedfirdouss, done
I have skipped making this change as we are progressively merging chapters, so it's better to keep the link there

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants