Skip to content
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

feat(codebuild): macOS codebuild support #31203

Merged
merged 5 commits into from
Aug 23, 2024
Merged

Conversation

alanxluc
Copy link
Contributor

Issue # (if applicable)

Closes #31170.

Reason for this change

CodeBuild recently added support for Mac builds. https://aws.amazon.com/about-aws/whats-new/2024/08/aws-codebuild-mac-builds/

The CDK can to be extended to support Mac CodeBuild fleets, as well as using those fleets in CodeBuild projects.

Description of changes

  • Added MAC_ARM value to EnvironmentType enum
  • Added MacBuildImage to project.ts

All design decisions were made by following the previous precedent set by LinuxBuildImage and WindowsBuildImage.

Description of how you validated changes

I added unit tests and integration tests for MacBuildImage. I ensured that the CDK was able to build, and that the output CloudFormation stack had the correct resources. I also successfully built the Codebuild project that was deployed.

Checklist


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@github-actions github-actions bot added the beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK label Aug 23, 2024
@aws-cdk-automation aws-cdk-automation requested a review from a team August 23, 2024 14:35
@github-actions github-actions bot added effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2 labels Aug 23, 2024
@aws-cdk-automation aws-cdk-automation added the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Aug 23, 2024
GavinZZ
GavinZZ previously approved these changes Aug 23, 2024
Copy link
Contributor

@GavinZZ GavinZZ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! Excited to see this supported.

Copy link
Contributor

mergify bot commented Aug 23, 2024

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation aws-cdk-automation removed the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Aug 23, 2024
Comment on lines 2333 to 2335
if (buildEnvironment.computeType != ComputeType.MEDIUM) {
errors.push('Mac images only support medium compute type');
}
Copy link
Contributor

@moelasmar moelasmar Aug 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alanxluc .. I think this type of validation is that there is a big probability to change, and I think it should not be part of CDK validations.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack, will revise. Is the other validation good to keep?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, they look reasonable. Thanks @alanxluc for your contribution :)

@moelasmar moelasmar added the pr/do-not-merge This PR should not be merged at this time. label Aug 23, 2024
Copy link
Contributor

@moelasmar moelasmar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left one minor comment

@mergify mergify bot dismissed stale reviews from GavinZZ and moelasmar August 23, 2024 20:35

Pull request has been modified.

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: d677c4e
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@GavinZZ GavinZZ added pr/do-not-merge This PR should not be merged at this time. and removed pr/do-not-merge This PR should not be merged at this time. labels Aug 23, 2024
@GavinZZ GavinZZ merged commit 823ff6e into aws:main Aug 23, 2024
18 checks passed
Copy link

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

codebuild: Add support for MacOS
4 participants