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

Create tests that verifies the Dockerfiles and templates are in sync #2114

Merged
merged 2 commits into from
Jul 22, 2020

Conversation

MichaelSimons
Copy link
Member

@MichaelSimons MichaelSimons commented Jul 21, 2020

related #1933

These changes introduce a pre-build validation step in the builds. This works nicely for validating the templates and Dockerfiles are in-sync. It will also provide a nice place to validate the readme tag listing is up-to-date as well. I will back port the common eng infrastructure changes to docker-tools once merged.

@MichaelSimons MichaelSimons force-pushed the template-tests branch 16 times, most recently from 307753d to b905b8f Compare July 22, 2020 13:47
@MichaelSimons MichaelSimons marked this pull request as ready for review July 22, 2020 14:05
@MichaelSimons MichaelSimons requested a review from mthalman July 22, 2020 14:05
}

& $PSScriptRoot/../common/Invoke-ImageBuilder.ps1 `
-ImageBuilderArgs "generateDockerfiles --architecture * --os-type *$pathArgs" `
-ImageBuilderArgs "generateDockerfiles --architecture '*' --os-type '*'$customImageBuilderArgs" `
Copy link
Member Author

Choose a reason for hiding this comment

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

The quoted asterisks are required when running in a linux environment.

@@ -18,13 +18,6 @@
<Content Include="TestAppArtifacts/*">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="../../manifest.json">
Copy link
Member Author

Choose a reason for hiding this comment

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

Continuing this pattern didn't seem like a good choice as we would need to copy pretty much the entire repo as content in order to validate the Dockerfile templates. Instead an ENV is now used to specify the source repo directory.

Copy link
Member

@mthalman mthalman left a comment

Choose a reason for hiding this comment

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

This will be very nice to have. Great solution.

@MichaelSimons MichaelSimons merged commit 555a6aa into dotnet:nightly Jul 22, 2020
@MichaelSimons MichaelSimons deleted the template-tests branch July 22, 2020 15:46
MichaelSimons added a commit to MichaelSimons/dotnet-docker that referenced this pull request Jul 23, 2020
MichaelSimons added a commit to MichaelSimons/dotnet-docker that referenced this pull request Jul 23, 2020
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.

2 participants