Documentation
¶
Overview ¶
Package build provides the build handlers for the Vela API.
Usage:
import "github.com/go-vela/server/api/build"
Index ¶
- func CancelBuild(c *gin.Context)
- func CleanBuild(database database.Interface, b *library.Build, services []*library.Service, ...)
- func CreateBuild(c *gin.Context)
- func DeleteBuild(c *gin.Context)
- func GetBuild(c *gin.Context)
- func GetBuildByID(c *gin.Context)
- func GetBuildToken(c *gin.Context)
- func ListBuildsForOrg(c *gin.Context)
- func ListBuildsForRepo(c *gin.Context)
- func PlanBuild(database database.Interface, p *pipeline.Build, b *library.Build, ...) error
- func PublishToQueue(queue queue.Service, db database.Interface, p *pipeline.Build, ...)
- func RestartBuild(c *gin.Context)
- func SkipEmptyBuild(p *pipeline.Build) string
- func UpdateBuild(c *gin.Context)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CancelBuild ¶
CancelBuild represents the API handler to cancel a running build.
func CleanBuild ¶
func CleanBuild(database database.Interface, b *library.Build, services []*library.Service, steps []*library.Step, e error)
cleanBuild is a helper function to kill the build without execution. This will kill all resources, like steps and services, for the build in the configured backend.
func CreateBuild ¶
CreateBuild represents the API handler to create a build in the configured backend.
func DeleteBuild ¶
DeleteBuild represents the API handler to remove a build for a repo from the configured backend.
func GetBuild ¶
GetBuild represents the API handler to capture a build for a repo from the configured backend.
func GetBuildByID ¶
GetBuildByID represents the API handler to capture a build by its id from the configured backend.
func GetBuildToken ¶
GetBuildToken represents the API handler to generate a build token.
func ListBuildsForOrg ¶
ListBuildsForOrg represents the API handler to capture a list of builds associated with an org from the configured backend.
func ListBuildsForRepo ¶
ListBuildsForRepo represents the API handler to capture a list of builds for a repo from the configured backend.
func PlanBuild ¶
func PlanBuild(database database.Interface, p *pipeline.Build, b *library.Build, r *library.Repo) error
PlanBuild is a helper function to plan the build for execution. This creates all resources, like steps and services, for the build in the configured backend. TODO: - return build and error.
func PublishToQueue ¶
func PublishToQueue(queue queue.Service, db database.Interface, p *pipeline.Build, b *library.Build, r *library.Repo, u *library.User)
PublishToQueue is a helper function that creates a build item and publishes it to the queue.
func RestartBuild ¶
RestartBuild represents the API handler to restart an existing build in the configured backend.
func SkipEmptyBuild ¶
SkipEmptyBuild checks if the build should be skipped due to it not containing any steps besides init or clone.
func UpdateBuild ¶
UpdateBuild represents the API handler to update a build for a repo in the configured backend.
Types ¶
This section is empty.