Skip to content

Docs V1: Add plugin tutorial Chapter 3 - Config types and empty implementation - #7152

Merged
armistcxy merged 3 commits into
pipe-cd:masterfrom
rahulshendre:docs/plugin-book-ch3
Aug 26, 2026
Merged

Docs V1: Add plugin tutorial Chapter 3 - Config types and empty implementation#7152
armistcxy merged 3 commits into
pipe-cd:masterfrom
rahulshendre:docs/plugin-book-ch3

Conversation

@rahulshendre

Copy link
Copy Markdown
Contributor

What this PR does:
Adds chapter 3 of creating a plugin tutorial, it covers how to define the plugin's configuration types and add a compiling, empty DeploymentPlugin implementation.

Why we need it:
3rd 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):

…tation

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

netlify Bot commented Aug 18, 2026

Copy link
Copy Markdown

Deploy Preview for pipecd-site ready!

Name Link
🔨 Latest commit 6f9549b
🔍 Latest deploy log https://app.netlify.com/projects/pipecd-site/deploys/6a8ec9a613e8da0008e5bf98
😎 Deploy Preview https://deploy-preview-7152--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.

@rahulshendre

Copy link
Copy Markdown
Contributor Author

@khanhtc1202 @armistcxy @mohammedfirdouss @eeshaanSA, PTAL when you have time


## Define the configuration types

Recall the three type parameters of a DeploymentPlugin: Config, DeployTargetConfig, and ApplicationConfigSpec. The file plugin needs only one of them.

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.

I think we should wrap parameter name with ``


Recall the three type parameters of a DeploymentPlugin: Config, DeployTargetConfig, and ApplicationConfigSpec. The file plugin needs only one of them.

- It has no plugin-wide configuration, so it uses `sdk.ConfigNone`, the SDK's type for an empty configuration, in place of a Config type.

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.

same as above, wrap Config with ``

Recall the three type parameters of a DeploymentPlugin: Config, DeployTargetConfig, and ApplicationConfigSpec. The file plugin needs only one of them.

- It has no plugin-wide configuration, so it uses `sdk.ConfigNone`, the SDK's type for an empty configuration, in place of a Config type.
- It has no deploy targets, so its DeployTargetConfig is an empty struct.

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.

wrap DeployTargetConfig with ``

@armistcxy armistcxy 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.

LGTM overall

Copilot AI lite review requested due to automatic review settings August 26, 2026 10:59
@rahulshendre
rahulshendre requested a review from armistcxy August 26, 2026 10:59

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 3 to the Docs V1 “Creating a plugin” tutorial, covering the basic configuration types and a compiling (but empty) DeploymentPlugin implementation to establish a foundation for later chapters.

Changes:

  • Introduces Chapter 3 documentation explaining Config, DeployTargetConfig, and ApplicationConfigSpec choices for the sample plugin.
  • Adds example plugin.go snippets with type definitions and an initial DeploymentPlugin method set (placeholder implementations).
  • Adds example main.go snippet showing plugin registration via sdk.NewPlugin and sdk.WithDeploymentPlugin.

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


## Add an empty implementation

Define a `plugin` type and give it a method for every method in the DeploymentPlugin interface. Each method calls `panic` for now. This lets you confirm that the method set and the signatures are correct before writing any real logic.
)
```

Both `context` and `sdk` are used by the implementation you add next.
Signed-off-by: rahulshendre <rahulshendre789@gmail.com>
@armistcxy
armistcxy merged commit 113ddac into pipe-cd:master Aug 26, 2026
64 checks passed
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.

3 participants