Documentation
¶
Index ¶
- Constants
- Variables
- func NewGitHubWorkflow(conf CIConfig, messageWriter io.Writer) *githubWorkflow
- func PrintConfiguration(w io.Writer, conf CIConfig) error
- func PrintPostExportMessage(w io.Writer, conf CIConfig) error
- type BufferWriter
- type CIConfig
- func (cc CIConfig) Branch() string
- func (cc CIConfig) FnBuilder() string
- func (cc CIConfig) FnGitHubWorkflowFilepath() string
- func (cc CIConfig) FnRuntime() string
- func (cc CIConfig) Force() bool
- func (cc CIConfig) KubeconfigSecret() string
- func (cc CIConfig) OutputPath() string
- func (cc CIConfig) RegistryLogin() bool
- func (cc CIConfig) RegistryLoginUrlVar() string
- func (cc CIConfig) RegistryPassSecret() string
- func (cc CIConfig) RegistryUrlVar() string
- func (cc CIConfig) RegistryUserVar() string
- func (cc CIConfig) RemoteBuild() bool
- func (cc CIConfig) SelfHostedRunner() bool
- func (cc CIConfig) TestStep() bool
- func (cc CIConfig) Verbose() bool
- func (cc CIConfig) WorkflowDispatch() bool
- func (cc CIConfig) WorkflowName() string
- type WorkflowWriter
Constants ¶
View Source
const ( ConfigCIFeatureFlag = "FUNC_ENABLE_CI_CONFIG" PathFlag = "path" PlatformFlag = "platform" DefaultPlatform = "github" DefaultGitHubWorkflowDir = ".github/workflows" DefaultGitHubWorkflowFilename = "func-deploy.yaml" BranchFlag = "branch" DefaultBranch = "main" WorkflowNameFlag = "workflow-name" DefaultWorkflowName = "Func Deploy" DefaultRemoteBuildWorkflowName = "Remote " + DefaultWorkflowName KubeconfigSecretNameFlag = "kubeconfig-secret-name" DefaultKubeconfigSecretName = "KUBECONFIG" RegistryLoginUrlVariableNameFlag = "registry-login-url-variable-name" DefaultRegistryLoginUrlVariableName = "REGISTRY_LOGIN_URL" RegistryUserVariableNameFlag = "registry-user-variable-name" DefaultRegistryUserVariableName = "REGISTRY_USERNAME" RegistryPassSecretNameFlag = "registry-pass-secret-name" DefaultRegistryPassSecretName = "REGISTRY_PASSWORD" RegistryUrlVariableNameFlag = "registry-url-variable-name" DefaultRegistryUrlVariableName = "REGISTRY_URL" RegistryLoginFlag = "registry-login" DefaultRegistryLogin = true WorkflowDispatchFlag = "workflow-dispatch" DefaultWorkflowDispatch = false RemoteBuildFlag = "remote" DefaultRemoteBuild = false SelfHostedRunnerFlag = "self-hosted-runner" DefaultSelfHostedRunner = false TestStepFlag = "test-step" DefaultTestStep = true ForceFlag = "force" DefaultForce = false VerboseFlag = "verbose" DefaultVerbose = false )
View Source
const ( MainLayoutPlainText = `` /* 281-byte string literal not displayed */ RequireManyPlainText = ` Required Secrets & Variables: %s %s %s %s %s ` RequireOnePlainText = ` Required secret: %s ` PostExportManyPlainText = ` GitHub Workflow created at: %s Create the following Secrets & Variables on github.com: %s %s %s %s %s ` PostExportOnePlainText = ` GitHub Workflow created at: %s Create the following Secret on github.com: %s ` )
Variables ¶
View Source
var DefaultWorkflowWriter = &fileWriter{}
DefaultWorkflowWriter is the default implementation for writing workflow files to disk.
View Source
var ErrWorkflowExists = errors.New("existing GitHub workflow detected, overwrite using the --force option")
ErrWorkflowExists is returned when a GitHub workflow file already exists and --force is not specified.
Functions ¶
func NewGitHubWorkflow ¶
func PrintConfiguration ¶ added in v0.49.0
Types ¶
type BufferWriter ¶ added in v0.49.0
BufferWriter is a test double (fake) that implements WorkflowWriter by writing to an in-memory buffer instead of the filesystem.
func NewBufferWriter ¶
func NewBufferWriter() *BufferWriter
NewBufferWriter creates a new BufferWriter test double.
func (*BufferWriter) Exist ¶ added in v0.49.0
func (bw *BufferWriter) Exist(_ string) bool
Exist is a fake implementation that returns true if the buffer has content.
type CIConfig ¶
type CIConfig struct {
// contains filtered or unexported fields
}
CIConfig readonly configuration
func NewCIConfig ¶
func NewCIConfig( fnLoader common.FunctionLoader, currentBranch common.CurrentBranchFunc, workingDir common.WorkDirFunc, workflowNameExplicit bool, ) (CIConfig, error)
func (CIConfig) FnGitHubWorkflowFilepath ¶
func (CIConfig) KubeconfigSecret ¶
func (CIConfig) OutputPath ¶ added in v0.49.0
func (CIConfig) RegistryLogin ¶ added in v0.49.0
func (CIConfig) RegistryLoginUrlVar ¶
func (CIConfig) RegistryPassSecret ¶
func (CIConfig) RegistryUrlVar ¶
func (CIConfig) RegistryUserVar ¶
func (CIConfig) RemoteBuild ¶ added in v0.49.0
func (CIConfig) SelfHostedRunner ¶ added in v0.49.0
func (CIConfig) WorkflowDispatch ¶ added in v0.49.0
func (CIConfig) WorkflowName ¶
Click to show internal directories.
Click to hide internal directories.