-
Notifications
You must be signed in to change notification settings - Fork 4.4k
feat(aws-codebuild): add ProjectFileSystemLocation property to codebuild #6539
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 11 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
2446002
add ProjectFileSystemLocation to codebuild
nataibi 583a002
Merge branch 'master' into issue-6533
nataibi ecf9df7
update readme
nataibi 4347938
Merge branch 'issue-6533' of github.com:nataibi/aws-cdk into issue-6533
nataibi 118e0e6
future proof as suggested in #6539
nataibi 7d79242
Merge branch 'master' into issue-6533
nataibi 07a2d81
fix from review https://github.com/aws/aws-cdk/pull/6539#pullrequestr…
nataibi 8c6cbfa
Merge branch 'master' into issue-6533
nataibi 299544a
Update packages/@aws-cdk/aws-codebuild/lib/project.ts
nataibi ad68160
fix review https://github.com/aws/aws-cdk/pull/6539#pullrequestreview…
nataibi 1f7972d
Merge branch 'master' into issue-6533
nataibi 27566bb
fix review https://github.com/aws/aws-cdk/pull/6539/files/1f7972d2567…
nataibi 4e751c7
fix review https://github.com/aws/aws-cdk/pull/6539/files/1f7972d2567…
nataibi faade4e
Merge branch 'master' into issue-6533
nataibi 63c03cc
Merge branch 'master' into issue-6533
mergify[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,85 @@ | ||
| import { Construct } from '@aws-cdk/core'; | ||
| import { CfnProject } from './codebuild.generated'; | ||
| import { IProject } from './project'; | ||
|
|
||
| /** | ||
| * The type returned from {@link IFileSystemLocation#bind}. | ||
| */ | ||
| export interface FileSystemConfig { | ||
| /** | ||
| * File system location wrapper property. | ||
| * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-projectfilesystemlocation.html | ||
| */ | ||
| readonly location: CfnProject.ProjectFileSystemLocationProperty; | ||
| } | ||
|
|
||
| /** | ||
| * The interface of a CodeBuild FileSystemLocation. | ||
| * Implemented by {@link EfsFileSystemLocation}. | ||
| */ | ||
| export interface IFileSystemLocation { | ||
| /** | ||
| * Called by the project when a file system is added so it can perform | ||
| * binding operations on this file system location. | ||
| */ | ||
| bind(scope: Construct, project: IProject): FileSystemConfig; | ||
| } | ||
|
|
||
| /** | ||
| * FileSystemLocation provider definition for a CodeBuild Project. | ||
| */ | ||
| export class FileSystemLocation { | ||
| /** | ||
| * EFS file system provider. | ||
| * @param props the EFS File System location property. | ||
| */ | ||
| public static efs(props: EfsFileSystemLocationProps): IFileSystemLocation { | ||
| return new EfsFileSystemLocation(props); | ||
| } | ||
| } | ||
|
|
||
| /** | ||
| * EfsFileSystemLocation definition for a CodeBuild project. | ||
| */ | ||
| class EfsFileSystemLocation implements IFileSystemLocation { | ||
| constructor(private readonly props: EfsFileSystemLocationProps) {} | ||
|
|
||
| public bind(_scope: Construct, _project: IProject): FileSystemConfig { | ||
| return { | ||
| location: { | ||
| identifier: this.props.identifier, | ||
| location: this.props.location, | ||
| mountOptions: this.props.mountOptions, | ||
| mountPoint: this.props.mountPoint, | ||
| type: 'EFS', | ||
| }, | ||
| }; | ||
| } | ||
| } | ||
|
|
||
| /** | ||
| * Construction properties for {@link EfsFileSystemLocation}. | ||
| */ | ||
| export interface EfsFileSystemLocationProps { | ||
| /** | ||
| * The name used to access a file system created by Amazon EFS. | ||
| */ | ||
| readonly identifier: string; | ||
|
|
||
| /** | ||
| * A string that specifies the location of the file system, like Amazon EFS. | ||
| * @example 'fs-abcd1234.efs.us-west-2.amazonaws.com:/my-efs-mount-directory'. | ||
| */ | ||
| readonly location: string; | ||
|
|
||
| /** | ||
| * The mount options for a file system such as Amazon EFS. | ||
| * @default 'nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2'. | ||
| */ | ||
| readonly mountOptions?: string; | ||
|
|
||
| /** | ||
| * The location in the container where you mount the file system. | ||
| */ | ||
| readonly mountPoint: string; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.