Files
actions-runner-controller/testing/workflow.go
Yusuke Kuoka b5194fd75a Enhance RunnerSet to optionally retain PVs accross restarts (#1340)
* Enhance RunnerSet to optionally retain PVs accross restarts

This is our initial attempt to bring back the ability to retain PVs across runner pod restarts when using RunnerSet.
The implementation is composed of two new controllers, `runnerpersistentvolumeclaim-controller` and `runnerpersistentvolume-controller`.
It all starts from our existing `runnerset-controller`. The controller now tries to mark any PVCs created by StatefulSets created for the RunnerSet.
Once the controller terminated statefulsets, their corresponding PVCs are clean up by `runnerpersistentvolumeclaim-controller`, then PVs are unbound from their corresponding PVCs by `runnerpersistentvolume-controller` so that they can be reused by future PVCs createf for future StatefulSets that shares the same same StorageClass.

Ref #1286

* Update E2E test suite to cover runner, docker, and go caching with RunnerSet + PVs

Ref #1286
2022-05-16 09:26:48 +09:00

55 lines
1.4 KiB
Go

package testing
const (
ActionsCheckoutV2 = "actions/checkout@v2"
)
type Workflow struct {
Name string `json:"name"`
On On `json:"on"`
Jobs map[string]Job `json:"jobs"`
}
type On struct {
Push *Push `json:"push,omitempty"`
WorkflowDispatch *WorkflowDispatch `json:"workflow_dispatch,omitempty"`
}
type Push struct {
Branches []string `json:"branches,omitempty"`
}
type WorkflowDispatch struct {
Inputs map[string]InputSpec `json:"inputs,omitempty"`
}
type InputSpec struct {
Description string `json:"description,omitempty"`
Required bool `json:"required,omitempty"`
Default string `json:"default,omitempty"`
}
type Job struct {
RunsOn string `json:"runs-on"`
Steps []Step `json:"steps"`
}
type Step struct {
Name string `json:"name,omitempty"`
Uses string `json:"uses,omitempty"`
With *With `json:"with,omitempty"`
Run string `json:"run,omitempty"`
}
type With struct {
Version string `json:"version,omitempty"`
GoVersion string `json:"go-version,omitempty"`
// https://github.com/docker/setup-buildx-action#inputs
BuildkitdFlags string `json:"buildkitd-flags,omitempty"`
Install bool `json:"install,omitempty"`
// This can be either the address or the context name
// https://github.com/docker/buildx/blob/master/docs/reference/buildx_create.md#description
Endpoint string `json:"endpoint,omitempty"`
}