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

resource/aws_codebuild_project: Support report build status for GitHub source type #5156

Merged
merged 1 commit into from Jul 12, 2018

Conversation

bflad
Copy link
Member

@bflad bflad commented Jul 11, 2018

Closes #5153

The source hash changes are expected and valid without state migration. The source attribute should really be a schema.TypeList.

Changes proposed in this pull request:

  • Add source report_build_status argument
  • Add acceptance testing for all supported source type
  • Only set ReportBuildStatus for GITHUB source type

Output from acceptance testing:

$ make testacc TEST=./aws TESTARGS='-run=TestAccAWSCodeBuildProject'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -run=TestAccAWSCodeBuildProject -timeout 120m
=== RUN   TestAccAWSCodeBuildProject_importBasic
--- PASS: TestAccAWSCodeBuildProject_importBasic (32.14s)
=== RUN   TestAccAWSCodeBuildProject_basic
--- PASS: TestAccAWSCodeBuildProject_basic (29.92s)
=== RUN   TestAccAWSCodeBuildProject_BadgeEnabled
--- PASS: TestAccAWSCodeBuildProject_BadgeEnabled (29.83s)
=== RUN   TestAccAWSCodeBuildProject_BuildTimeout
--- PASS: TestAccAWSCodeBuildProject_BuildTimeout (37.07s)
=== RUN   TestAccAWSCodeBuildProject_Cache
--- PASS: TestAccAWSCodeBuildProject_Cache (62.54s)
=== RUN   TestAccAWSCodeBuildProject_Description
--- PASS: TestAccAWSCodeBuildProject_Description (38.31s)
=== RUN   TestAccAWSCodeBuildProject_EncryptionKey
--- PASS: TestAccAWSCodeBuildProject_EncryptionKey (49.68s)
=== RUN   TestAccAWSCodeBuildProject_Environment_EnvironmentVariable_Type
--- PASS: TestAccAWSCodeBuildProject_Environment_EnvironmentVariable_Type (38.64s)
=== RUN   TestAccAWSCodeBuildProject_Source_Auth
--- PASS: TestAccAWSCodeBuildProject_Source_Auth (22.53s)
=== RUN   TestAccAWSCodeBuildProject_Source_GitCloneDepth
--- PASS: TestAccAWSCodeBuildProject_Source_GitCloneDepth (37.28s)
=== RUN   TestAccAWSCodeBuildProject_Source_InsecureSSL
--- PASS: TestAccAWSCodeBuildProject_Source_InsecureSSL (37.46s)
=== RUN   TestAccAWSCodeBuildProject_Source_ReportBuildStatus
--- PASS: TestAccAWSCodeBuildProject_Source_ReportBuildStatus (37.79s)
=== RUN   TestAccAWSCodeBuildProject_Source_Type_Bitbucket
--- PASS: TestAccAWSCodeBuildProject_Source_Type_Bitbucket (21.74s)
=== RUN   TestAccAWSCodeBuildProject_Source_Type_CodeCommit
--- PASS: TestAccAWSCodeBuildProject_Source_Type_CodeCommit (30.03s)
=== RUN   TestAccAWSCodeBuildProject_Source_Type_CodePipeline
--- PASS: TestAccAWSCodeBuildProject_Source_Type_CodePipeline (29.69s)
=== RUN   TestAccAWSCodeBuildProject_Source_Type_GitHubEnterprise
--- PASS: TestAccAWSCodeBuildProject_Source_Type_GitHubEnterprise (31.00s)
=== RUN   TestAccAWSCodeBuildProject_Source_Type_S3
--- PASS: TestAccAWSCodeBuildProject_Source_Type_S3 (22.38s)
=== RUN   TestAccAWSCodeBuildProject_Tags
--- PASS: TestAccAWSCodeBuildProject_Tags (33.43s)
=== RUN   TestAccAWSCodeBuildProject_VpcConfig
--- PASS: TestAccAWSCodeBuildProject_VpcConfig (57.15s)
=== RUN   TestAccAWSCodeBuildProject_WindowsContainer
--- PASS: TestAccAWSCodeBuildProject_WindowsContainer (22.21s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	700.882s

@bflad bflad added enhancement Requests to existing resources that expand the functionality or scope. service/codebuild Issues and PRs that pertain to the codebuild service. labels Jul 11, 2018
@bflad bflad requested a review from a team July 11, 2018 15:17
@ghost ghost added the size/L Managed by automation to categorize the size of a PR. label Jul 11, 2018
Copy link
Member

@tombuildsstuff tombuildsstuff left a comment

Choose a reason for hiding this comment

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

otherwise LGTM 👍

@@ -194,6 +194,7 @@ The following arguments are supported:
* `git_clone_depth` - (Optional) Truncate git history to this many commits.
* `insecure_ssl` - (Optional) Ignore SSL warnings when connecting to source control.
* `location` - (Optional) The location of the source code from git or s3.
* `report_build_status` - (Optional) Set to `true` to report the status of a build's start and finish to your source provider. This option is only valid when your source provider is GitHub.
Copy link
Member

Choose a reason for hiding this comment

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

does this want a blue info box?

Copy link
Member Author

Choose a reason for hiding this comment

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

Hmm that verbiage was from the SDK documentation right before it said If this is set and you use a different source provider, an invalidInputException is thrown. -- a situation which we handle automatically here. I think it is important to note the restriction with the specific argument but not to the point where we clutter the resource documentation with a separate callout box.

@bflad bflad added this to the v1.28.0 milestone Jul 12, 2018
@bflad bflad merged commit c6751d6 into master Jul 12, 2018
@bflad bflad deleted the f-aws_codebuild_project-report_build_status branch July 12, 2018 12:26
bflad added a commit that referenced this pull request Jul 12, 2018
@bflad
Copy link
Member Author

bflad commented Jul 18, 2018

This has been released in version 1.28.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

@ghost
Copy link

ghost commented Apr 4, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@hashicorp hashicorp locked and limited conversation to collaborators Apr 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/codebuild Issues and PRs that pertain to the codebuild service. size/L Managed by automation to categorize the size of a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature Request: Add Report Build Status Argument to CodeBuild Project Resource
2 participants