From 9b592a4c6388c2cac7b992727b95f25c9e51bed0 Mon Sep 17 00:00:00 2001 From: Rico Huijbers Date: Mon, 23 May 2022 15:37:09 +0200 Subject: [PATCH 1/2] docs(pipelines): explain how to retain symlinks (#20413) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../lib/codepipeline/codepipeline-source.ts | 30 ++++++++++++------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/packages/@aws-cdk/pipelines/lib/codepipeline/codepipeline-source.ts b/packages/@aws-cdk/pipelines/lib/codepipeline/codepipeline-source.ts index ef5f7479c66b5..0fe05412d297a 100644 --- a/packages/@aws-cdk/pipelines/lib/codepipeline/codepipeline-source.ts +++ b/packages/@aws-cdk/pipelines/lib/codepipeline/codepipeline-source.ts @@ -38,6 +38,9 @@ export abstract class CodePipelineSource extends Step implements ICodePipelineAc * * * **repo** - to read the repository * * **admin:repo_hook** - if you plan to use webhooks (true by default) + * + * If you need access to symlinks or the repository history, use a source of type + * `connection` instead. */ public static gitHub(repoString: string, branch: string, props: GitHubSourceOptions = {}): CodePipelineSource { return new GitHubSource(repoString, branch, props); @@ -92,6 +95,9 @@ export abstract class CodePipelineSource extends Step implements ICodePipelineAc * }); * ``` * + * If you need access to symlinks or the repository history, be sure to set + * `codeBuildCloneOutput`. + * * @param repoString A string that encodes owner and repository separated by a slash (e.g. 'owner/repo'). * @param branch The branch to use. * @param props The source properties, including the connection ARN. @@ -105,6 +111,10 @@ export abstract class CodePipelineSource extends Step implements ICodePipelineAc /** * Returns a CodeCommit source. * + * If you need access to symlinks or the repository history, be sure to set + * `codeBuildCloneOutput`. + * + * * @param repository The CodeCommit repository. * @param branch The branch to use. * @param props The source properties. @@ -360,12 +370,12 @@ export interface ConnectionSourceOptions { // long URL in @see /** - * Whether the output should be the contents of the repository - * (which is the default), - * or a link that allows CodeBuild to clone the repository before building. + * If this is set, the next CodeBuild job clones the repository (instead of CodePipeline downloading the files). + * + * This provides access to repository history, and retains symlinks (symlinks would otherwise be + * removed by CodePipeline). * - * **Note**: if this option is true, - * then only CodeBuild actions can use the resulting {@link output}. + * **Note**: if this option is true, only CodeBuild jobs can use the output artifact. * * @default false * @see https://docs.aws.amazon.com/codepipeline/latest/userguide/action-reference-CodestarConnectionSource.html#action-reference-CodestarConnectionSource-config @@ -435,12 +445,12 @@ export interface CodeCommitSourceOptions { readonly eventRole?: iam.IRole; /** - * Whether the output should be the contents of the repository - * (which is the default), - * or a link that allows CodeBuild to clone the repository before building. + * If this is set, the next CodeBuild job clones the repository (instead of CodePipeline downloading the files). + * + * This provides access to repository history, and retains symlinks (symlinks would otherwise be + * removed by CodePipeline). * - * **Note**: if this option is true, - * then only CodeBuild actions can use the resulting {@link output}. + * **Note**: if this option is true, only CodeBuild jobs can use the output artifact. * * @default false * @see https://docs.aws.amazon.com/codepipeline/latest/userguide/action-reference-CodeCommit.html From e9cbda37070389e52824e6514e402b34ac493361 Mon Sep 17 00:00:00 2001 From: MayForBlue <60128296+MayForBlue@users.noreply.github.com> Date: Tue, 24 May 2022 00:36:06 +0900 Subject: [PATCH 2/2] chore(s3): fix indent in sample code (#20457) I found wrong indents in sample code and fix those. ---- ### All Submissions: * [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/master/INTEGRATION_TESTS.md)? * [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-s3/README.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/@aws-cdk/aws-s3/README.md b/packages/@aws-cdk/aws-s3/README.md index ddf1f9a729d48..c2f87f1186a3c 100644 --- a/packages/@aws-cdk/aws-s3/README.md +++ b/packages/@aws-cdk/aws-s3/README.md @@ -522,7 +522,7 @@ by deploying with CDK version `1.126.0` or later **before** switching this value ```ts const bucket = new s3.Bucket(this, 'MyBucket', { - transferAcceleration: true, + transferAcceleration: true, }); ``` @@ -530,7 +530,7 @@ To access the bucket that is enabled for Transfer Acceleration, you must use a s ```ts const bucket = new s3.Bucket(this, 'MyBucket', { - transferAcceleration: true, + transferAcceleration: true, }); bucket.transferAccelerationUrlForObject('objectname'); ``` @@ -540,14 +540,14 @@ bucket.transferAccelerationUrlForObject('objectname'); [Intelligent Tiering](https://docs.aws.amazon.com/AmazonS3/latest/userguide/intelligent-tiering.html) can be configured to automatically move files to glacier: ```ts - new s3.Bucket(this, 'MyBucket', { - intelligentTieringConfigurations: [{ - name: 'foo', - prefix: 'folder/name', - archiveAccessTierTime: cdk.Duration.days(90), - deepArchiveAccessTierTime: cdk.Duration.days(180), - tags: [{key: 'tagname', value: 'tagvalue'}] - }], +new s3.Bucket(this, 'MyBucket', { + intelligentTieringConfigurations: [{ + name: 'foo', + prefix: 'folder/name', + archiveAccessTierTime: cdk.Duration.days(90), + deepArchiveAccessTierTime: cdk.Duration.days(180), + tags: [{key: 'tagname', value: 'tagvalue'}] + }], }); ```