Documentation ¶
Overview ¶
Package deploy holds the structures to deploy infrastructure resources. This file defines application deployment resources.
Package deploy holds the structures to deploy infrastructure resources.
Package deploy holds the structures to deploy infrastructure resources. This file defines environment deployment resources.
Package deploy holds the structures to deploy infrastructure resources. This file defines pipeline deployment resources.
Package deploy holds the structures to deploy infrastructure resources. This file defines service deployment resources.
Package deploy holds the structures to deploy infrastructure resources. This file defines workload deployment resources.
Index ¶
- Constants
- func PipelineSourceFromManifest(mfSource *manifest.Source) (source interface{}, shouldPrompt bool, err error)
- type ArtifactBucket
- type AssociatedEnvironment
- type BitbucketSource
- type CodeCommitSource
- type ConfigStoreClient
- type CreateAppInput
- type CreateEnvironmentInput
- type CreateEnvironmentResponse
- type CreatePipelineInput
- type CreateTaskResourcesInput
- type DeleteWorkloadInput
- type GitHubSource
- type GitHubURL
- type GitHubV1Source
- type PipelineStage
- type Store
- type TaskStackInfo
Constants ¶
const ( // LegacyAppTemplateVersion is the version associated with the application template before we started versioning. LegacyAppTemplateVersion = "v0.0.0" // LatestAppTemplateVersion is the latest version number available for application templates. LatestAppTemplateVersion = "v1.0.0" )
const ( // AppTagKey is tag key for Copilot app. AppTagKey = "copilot-application" // EnvTagKey is tag key for Copilot env. EnvTagKey = "copilot-environment" // ServiceTagKey is tag key for Copilot svc. ServiceTagKey = "copilot-service" // TaskTagKey is tag key for Copilot task. TaskTagKey = "copilot-task" )
const ( // LegacyEnvTemplateVersion is the version associated with the environment template before we started versioning. LegacyEnvTemplateVersion = "v0.0.0" // LatestEnvTemplateVersion is the latest version number available for environment templates. LatestEnvTemplateVersion = "v1.3.0" )
const ( // WorkloadCfnTemplateNameFormat is the base output file name when `service package` // or `job package` is called. This is also used to render the pipeline CFN template. WorkloadCfnTemplateNameFormat = "%s-%s.stack.yml" // WorkloadCfnTemplateConfigurationNameFormat is the base output configuration // file name when `service package` or `job package is called. It's also used to // render the pipeline CFN template. WorkloadCfnTemplateConfigurationNameFormat = "%s-%s.params.json" // AddonsCfnTemplateNameFormat is the addons output file name when `service package` // is called. AddonsCfnTemplateNameFormat = "%s.addons.stack.yml" )
const FmtTaskECRRepoName = "copilot-%s"
FmtTaskECRRepoName is the pattern used to generate the ECR repository's name
Variables ¶
This section is empty.
Functions ¶
func PipelineSourceFromManifest ¶ added in v1.4.0
func PipelineSourceFromManifest(mfSource *manifest.Source) (source interface{}, shouldPrompt bool, err error)
PipelineSourceFromManifest processes manifest info about the source based on provider type. The return boolean is true for CodeStar Connections sources that require a polling prompt.
Types ¶
type ArtifactBucket ¶
type ArtifactBucket struct { // The name of the S3 bucket. BucketName string // The ARN of the KMS key used to en/decrypt artifacts stored in this bucket. KeyArn string }
ArtifactBucket represents an S3 bucket used by the CodePipeline to store intermediate artifacts produced by the pipeline.
func (*ArtifactBucket) Region ¶
func (a *ArtifactBucket) Region() (string, error)
Region parses out the region from the ARN of the KMS key associated with the artifact bucket.
type AssociatedEnvironment ¶
type AssociatedEnvironment struct { // Name of the environment, must be unique within an application. // This is also the name of the pipeline stage. Name string // The region this environment is stored in. Region string // AccountID of the account this environment is stored in. AccountID string }
AssociatedEnvironment defines the necessary information a pipeline stage needs for an Config Environment.
type BitbucketSource ¶ added in v1.3.0
type BitbucketSource struct { ProviderName string Branch string RepositoryURL string ConnectionARN string }
BitbucketSource defines the (BB) source of the artifacts to be built and deployed.
func (*BitbucketSource) Connection ¶ added in v1.5.0
func (s *BitbucketSource) Connection() string
Connection returns the ARN correlated with a ConnectionName in the pipeline manifest.
func (*BitbucketSource) ConnectionName ¶ added in v1.3.0
func (s *BitbucketSource) ConnectionName() (string, error)
ConnectionName generates a recognizable string by which the connection may be identified.
func (*BitbucketSource) Repository ¶ added in v1.3.0
func (s *BitbucketSource) Repository() (string, error)
Repository returns the repository portion. For CodeStar Connections, this needs to be in the format "some-user/my-repo."
type CodeCommitSource ¶ added in v1.1.0
CodeCommitSource defines the (CC) source of the artifacts to be built and deployed.
func (*CodeCommitSource) Repository ¶ added in v1.1.0
func (s *CodeCommitSource) Repository() (string, error)
Repository returns the repository portion. For example, given "aws/amazon-copilot", this function returns "amazon-copilot".
type ConfigStoreClient ¶
type ConfigStoreClient interface { GetEnvironment(appName string, environmentName string) (*config.Environment, error) ListEnvironments(appName string) ([]*config.Environment, error) GetService(appName, svcName string) (*config.Workload, error) }
ConfigStoreClient wraps config store methods utilized by deploy store.
type CreateAppInput ¶
type CreateAppInput struct { Name string // Name of the application that needs to be created. AccountID string // AWS account ID to administrate the application. DNSDelegationAccounts []string // Accounts to grant DNS access to for this application. DomainName string // DNS Name used for this application. DomainHostedZoneID string // Hosted Zone ID for the domain. AdditionalTags map[string]string // AdditionalTags are labels applied to resources under the application. }
CreateAppInput holds the fields required to create an application stack set.
type CreateEnvironmentInput ¶
type CreateEnvironmentInput struct { // The version of the environment template to create the stack. If empty, creates the legacy stack. Version string AppName string // Name of the application this environment belongs to. Name string // Name of the environment, must be unique within an application. Prod bool // Whether or not this environment is a production environment. ToolsAccountPrincipalARN string // The Principal ARN of the tools account. AppDNSName string // The DNS name of this application, if it exists AdditionalTags map[string]string // AdditionalTags are labels applied to resources under the application. CustomResourcesURLs map[string]string // Environment custom resource script S3 object URLs. ImportVPCConfig *config.ImportVPC // Optional configuration if users have an existing VPC. AdjustVPCConfig *config.AdjustVPC // Optional configuration if users want to override default VPC configuration. CFNServiceRoleARN string // Optional. A service role ARN that CloudFormation should use to make calls to resources in the stack. }
CreateEnvironmentInput holds the fields required to deploy an environment.
type CreateEnvironmentResponse ¶
type CreateEnvironmentResponse struct { Env *config.Environment Err error }
CreateEnvironmentResponse holds the created environment on successful deployment. Otherwise, the environment is set to nil and a descriptive error is returned.
type CreatePipelineInput ¶
type CreatePipelineInput struct { // Name of the application this pipeline belongs to AppName string // Name of the pipeline Name string // The source code provider for this pipeline Source interface{} // The stages of the pipeline. The order of stages in this list // will be the order we deploy to. Stages []PipelineStage // A list of artifact buckets and corresponding KMS keys that will // be used in this pipeline. ArtifactBuckets []ArtifactBucket // AdditionalTags are labels applied to resources under the application. AdditionalTags map[string]string }
CreatePipelineInput represents the fields required to deploy a pipeline.
type CreateTaskResourcesInput ¶
type CreateTaskResourcesInput struct { Name string CPU int Memory int Image string TaskRole string ExecutionRole string Command []string EntryPoint []string EnvVars map[string]string App string Env string AdditionalTags map[string]string }
CreateTaskResourcesInput holds the fields required to create a task stack.
type DeleteWorkloadInput ¶ added in v0.5.0
type DeleteWorkloadInput struct { Name string // Name of the workload that needs to be deleted. EnvName string // Name of the environment the service is deployed in. AppName string // Name of the application the service belongs to. }
DeleteWorkloadInput holds the fields required to delete a workload.
type GitHubSource ¶ added in v1.1.0
type GitHubSource struct { ProviderName string Branch string RepositoryURL GitHubURL ConnectionARN string }
GitHubSource (version 2) defines the source of the artifacts to be built and deployed. This version uses CodeStar Connections to authenticate access to the remote repo.
func (*GitHubSource) Connection ¶ added in v1.5.0
func (s *GitHubSource) Connection() string
Connection returns the ARN correlated with a ConnectionName in the pipeline manifest.
func (*GitHubSource) ConnectionName ¶ added in v1.4.0
func (s *GitHubSource) ConnectionName() (string, error)
ConnectionName generates a recognizable string by which the connection may be identified.
func (*GitHubSource) Owner ¶ added in v1.1.0
func (s *GitHubSource) Owner() (string, error)
Owner returns the repository owner portion. For example, given "aws/amazon-copilot", this function returns "aws".
func (*GitHubSource) Repository ¶ added in v1.1.0
func (s *GitHubSource) Repository() (string, error)
Repository returns the repository portion. For CodeStar Connections, this needs to be in the format "some-user/my-repo."
type GitHubURL ¶ added in v1.4.0
type GitHubURL string
GitHubURL is the common type for repo URLs for both GitHubSource versions: GitHubV1 (w/ access tokens) and GitHub (V2 w CodeStar Connections).
type GitHubV1Source ¶ added in v1.4.0
type GitHubV1Source struct { ProviderName string Branch string RepositoryURL GitHubURL PersonalAccessTokenSecretID string }
GitHubV1Source defines the source of the artifacts to be built and deployed. This version uses personal access tokens and is not recommended. https://docs.aws.amazon.com/codepipeline/latest/userguide/update-github-action-connections.html
func (*GitHubV1Source) GitHubPersonalAccessTokenSecretID ¶ added in v1.4.0
func (s *GitHubV1Source) GitHubPersonalAccessTokenSecretID() (string, error)
GitHubPersonalAccessTokenSecretID returns the ID of the secret in the Secrets manager, which stores the GitHub Personal Access token if the provider is "GitHubV1".
func (*GitHubV1Source) Owner ¶ added in v1.4.0
func (s *GitHubV1Source) Owner() (string, error)
Owner returns the repository owner portion. For example, given "aws/amazon-copilot", this function returns "aws".
func (*GitHubV1Source) Repository ¶ added in v1.4.0
func (s *GitHubV1Source) Repository() (string, error)
Repository returns the repository portion. For example, given "aws/amazon-copilot", this function returns "amazon-copilot".
type PipelineStage ¶
type PipelineStage struct { *AssociatedEnvironment LocalWorkloads []string RequiresApproval bool TestCommands []string }
PipelineStage represents configuration for each deployment stage of a workspace. A stage consists of the Config Environment the pipeline is deploying to, the containerized services that will be deployed, and test commands, if the user has opted to add any.
func (*PipelineStage) WorkloadTemplateConfigurationPath ¶ added in v0.5.0
func (s *PipelineStage) WorkloadTemplateConfigurationPath(wlName string) string
WorkloadTemplateConfigurationPath returns the full path to the workload CFN template configuration file built during the build stage.
func (*PipelineStage) WorkloadTemplatePath ¶ added in v0.5.0
func (s *PipelineStage) WorkloadTemplatePath(wlName string) string
WorkloadTemplatePath returns the full path to the workload CFN template built during the build stage.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store fetches information on deployed services.
func NewStore ¶
func NewStore(store ConfigStoreClient) (*Store, error)
NewStore returns a new store.
func (*Store) IsServiceDeployed ¶
IsServiceDeployed returns whether a service is deployed in an environment or not.
func (*Store) ListDeployedServices ¶
ListDeployedServices returns the names of deployed services in an environment part of an application.
type TaskStackInfo ¶ added in v1.1.0
TaskStackInfo contains essential information about a Copilot task stack
func (TaskStackInfo) ECRRepoName ¶ added in v1.1.0
func (t TaskStackInfo) ECRRepoName() string
ECRRepoName returns the name of the ECR repo for the one-off task.
func (TaskStackInfo) TaskName ¶ added in v1.1.0
func (t TaskStackInfo) TaskName() string
TaskName returns the name of the one-off task. This is the same as the value of the copilot-task tag. For example, a stack called "task-db-migrate" will have the TaskName "db-migrate"
Directories ¶
Path | Synopsis |
---|---|
Package cloudformation provides functionality to deploy CLI concepts with AWS CloudFormation.
|
Package cloudformation provides functionality to deploy CLI concepts with AWS CloudFormation. |
mocks
Package mocks is a generated GoMock package.
|
Package mocks is a generated GoMock package. |
stack/mocks
Package mocks is a generated GoMock package.
|
Package mocks is a generated GoMock package. |
Package mocks is a generated GoMock package.
|
Package mocks is a generated GoMock package. |