Skip to content

feat(pipelines): install Docker in test_commands CodeBuild project#2097

Merged
mergify[bot] merged 4 commits intoaws:mainlinefrom
huanjani:test-commands
Mar 24, 2021
Merged

feat(pipelines): install Docker in test_commands CodeBuild project#2097
mergify[bot] merged 4 commits intoaws:mainlinefrom
huanjani:test-commands

Conversation

@huanjani
Copy link
Copy Markdown
Contributor

If users have their tests configured in containers, they can now use docker build commands in the test_commands field of the pipeline manifest.

Addresses #1280.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@huanjani huanjani requested a review from a team as a code owner March 23, 2021 21:58
@huanjani huanjani requested a review from bvtujo March 23, 2021 21:58
Copy link
Copy Markdown
Contributor

@bvtujo bvtujo left a comment

Choose a reason for hiding this comment

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

Looks great! Do we need to update any integration tests for this?

@huanjani
Copy link
Copy Markdown
Contributor Author

huanjani commented Mar 23, 2021

Looks great! Do we need to update any integration tests for this?

They're passing locally. I updated the stack/pipeline ones. It'd be nice to eventually test containerized tests where we test test_commands.

@ceagan
Copy link
Copy Markdown

ceagan commented Mar 24, 2021

Suggestion: the environment variable for the AWS_ACCOUNT_ID can also be exposed here like it is for the main build. It could be helpful when pulling images from an ECR private repository, which in turn is helpful to avoid Docker Hub pull limits.

        EnvironmentVariables:
          - Name: AWS_ACCOUNT_ID
            Value: !Sub '${AWS::AccountId}'

Copy link
Copy Markdown

@ceagan ceagan left a comment

Choose a reason for hiding this comment

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

I was able to pull these changes and test with a sandbox build I've been working on and it works perfectly! Thanks!

@mergify mergify Bot merged commit 5274b27 into aws:mainline Mar 24, 2021
@huanjani
Copy link
Copy Markdown
Contributor Author

Suggestion: the environment variable for the AWS_ACCOUNT_ID can also be exposed here like it is for the main build. It could be helpful when pulling images from an ECR private repository, which in turn is helpful to avoid Docker Hub pull limits.

        EnvironmentVariables:
          - Name: AWS_ACCOUNT_ID
            Value: !Sub '${AWS::AccountId}'

Thanks for this suggestion (and for your Gitter post that got this ball rolling)!

@huanjani huanjani deleted the test-commands branch March 24, 2021 23:42
thrau pushed a commit to localstack/copilot-cli-local that referenced this pull request Dec 9, 2022
…ws#2097)

If users have their tests configured in containers, they can now use `docker build` commands in the `test_commands` field of the pipeline manifest. 

Addresses aws#1280.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants