mirror of
https://github.com/thegeeklab/drone-plugin-lib.git
synced 2024-11-05 02:40:40 +00:00
Add Context struct
This commit is contained in:
parent
a3ef97d454
commit
c7b7745e10
@ -8,23 +8,27 @@ package plugin
|
||||
import "time"
|
||||
|
||||
type (
|
||||
// BaseConfig is the common configuration for a plugin.
|
||||
// Context contains information about the current execution context.
|
||||
//
|
||||
// The configuration organizes all the information available to a plugin
|
||||
// executing as a step within a stage.
|
||||
// The context organizes all the information available to a plugin executing
|
||||
// as a step within a stage.
|
||||
//
|
||||
// Plugins can choose to compose this within their own config.
|
||||
//
|
||||
// import "github.com/drone-plugins/drone-plugin-lib/pkg/plugin"
|
||||
//
|
||||
// type MyPluginConfig struct {
|
||||
// plugin.BaseConfig
|
||||
// type MyPluginContext struct {
|
||||
// plugin.Context
|
||||
// Foo string
|
||||
// Bar string
|
||||
// }
|
||||
BaseConfig struct {
|
||||
Stage Stage
|
||||
Step Step
|
||||
Context struct {
|
||||
Build Build
|
||||
Repo Repo
|
||||
Commit Commit
|
||||
Stage Stage
|
||||
Step Step
|
||||
SemVer SemVer
|
||||
}
|
||||
|
||||
// Build represents a build of a repository.
|
||||
|
Loading…
Reference in New Issue
Block a user