Documentation ¶
Index ¶
- func BaseURL(ip string) string
- func CleanupDeployment(pr *github.PullRequestEvent) error
- func CreateDeployment(pr *github.PullRequestEvent, svc *v1.Service, externalIP string) (*appsv1.Deployment, error)
- func CreateService(pr *github.PullRequestEvent) (*v1.Service, error)
- func GetExternalIP(s *v1.Service) (string, error)
- func Logs(d *appsv1.Deployment) string
- func WaitForDeploymentToStabilize(d *appsv1.Deployment, ip string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanupDeployment ¶
func CleanupDeployment(pr *github.PullRequestEvent) error
CleanupDeployment cleans up all deployments related to the given pull request
func CreateDeployment ¶ added in v0.18.0
func CreateDeployment(pr *github.PullRequestEvent, svc *v1.Service, externalIP string) (*appsv1.Deployment, error)
CreateDeployment creates a deployment for this pull request The deployment has two containers:
- An init container to git clone the PR branch
- A container to run hugo server
and one emptyDir volume to hold the git repository
func CreateService ¶ added in v0.18.0
func CreateService(pr *github.PullRequestEvent) (*v1.Service, error)
CreateService creates a service for the deployment to bind to and returns the external IP of the service
func GetExternalIP ¶ added in v0.18.0
GetExternalIP polls the service until an external IP is available and returns it
func Logs ¶ added in v0.20.0
func Logs(d *appsv1.Deployment) string
Logs returns the logs for both containers for the given deployment
func WaitForDeploymentToStabilize ¶ added in v0.18.0
func WaitForDeploymentToStabilize(d *appsv1.Deployment, ip string) error
WaitForDeploymentToStabilize waits till the Deployment has stabilized
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.