-
Notifications
You must be signed in to change notification settings - Fork 17
/
RepositoryProps.go
75 lines (72 loc) · 2.62 KB
/
RepositoryProps.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
package awscodecommit
// Example:
// // Source stage: read from repository
// repo := codecommit.NewRepository(stack, jsii.String("TemplateRepo"), &RepositoryProps{
// RepositoryName: jsii.String("template-repo"),
// })
// sourceOutput := codepipeline.NewArtifact(jsii.String("SourceArtifact"))
// source := cpactions.NewCodeCommitSourceAction(&CodeCommitSourceActionProps{
// ActionName: jsii.String("Source"),
// Repository: repo,
// Output: sourceOutput,
// Trigger: cpactions.CodeCommitTrigger_POLL,
// })
// sourceStage := map[string]interface{}{
// "stageName": jsii.String("Source"),
// "actions": []CodeCommitSourceAction{
// source,
// },
// }
//
// // Deployment stage: create and deploy changeset with manual approval
// stackName := "OurStack"
// changeSetName := "StagedChangeSet"
//
// prodStage := map[string]interface{}{
// "stageName": jsii.String("Deploy"),
// "actions": []interface{}{
// cpactions.NewCloudFormationCreateReplaceChangeSetAction(&CloudFormationCreateReplaceChangeSetActionProps{
// "actionName": jsii.String("PrepareChanges"),
// "stackName": jsii.String(stackName),
// "changeSetName": jsii.String(changeSetName),
// "adminPermissions": jsii.Boolean(true),
// "templatePath": sourceOutput.atPath(jsii.String("template.yaml")),
// "runOrder": jsii.Number(1),
// }),
// cpactions.NewManualApprovalAction(&ManualApprovalActionProps{
// "actionName": jsii.String("ApproveChanges"),
// "runOrder": jsii.Number(2),
// }),
// cpactions.NewCloudFormationExecuteChangeSetAction(&CloudFormationExecuteChangeSetActionProps{
// "actionName": jsii.String("ExecuteChanges"),
// "stackName": jsii.String(stackName),
// "changeSetName": jsii.String(changeSetName),
// "runOrder": jsii.Number(3),
// }),
// },
// }
//
// codepipeline.NewPipeline(stack, jsii.String("Pipeline"), &PipelineProps{
// Stages: []stageProps{
// sourceStage,
// prodStage,
// },
// })
//
type RepositoryProps struct {
// Name of the repository.
//
// This property is required for all CodeCommit repositories.
RepositoryName *string `field:"required" json:"repositoryName" yaml:"repositoryName"`
// The contents with which to initialize the repository after it has been created.
// Default: - No initialization (create empty repo).
//
Code Code `field:"optional" json:"code" yaml:"code"`
// A description of the repository.
//
// Use the description to identify the
// purpose of the repository.
// Default: - No description.
//
Description *string `field:"optional" json:"description" yaml:"description"`
}