-
Notifications
You must be signed in to change notification settings - Fork 124
Enable buildpipeline build and add test apps for 4.7 and 4.7.1 #16
Enable buildpipeline build and add test apps for 4.7 and 4.7.1 #16
Conversation
dotnetapp-4.7/Dockerfile
Outdated
@@ -0,0 +1,26 @@ | |||
FROM microsoft/dotnet-framework:4.7 as builder |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Last week microsoft/dotnet-framework-docker#37 was merged. These new build
images should be used here. It would greatly simplify the Dockerfiles and the time to build them. Should be as simple as:
microsoft/dotnet-framework-build:4.7.1
WORKDIR /app
COPY . ./
RUN ["msbuild.exe", "dotnetapp-4.7.csproj", "/p:Configuration=Release"]
This applies to all the samples except 3.5.
manifest.json
Outdated
{ | ||
"sharedTags": { | ||
}, | ||
"platforms": [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This manifest doesn't look correct? Have you run the image builder tool on this manifest? I think it will fail the validation phase.
Each .NET version should be listed as a separate Image. 3.5 and 4.7.1 should each have two platforms and the 3.5 and 4.7.1 tags should be shared tags and not platform tags. Furthermore, I would consider the standalone versions to be shared tags for all versions even though we are not building them for both server versions. This would better support adding both versions if needed in the future.
README.DockerHub.md
Outdated
- [`4.7-windowsservercore-ltsc2016`, `4.7` (*dotnetapp-4.7/Dockerfile*)](https://github.com/Microsoft/dotnet-framework-docker-samples/blob/dockerhub/dotnetapp-4.7/Dockerfile) | ||
- [`4.6.2-windowsservercore-ltsc2016`, `4.6.2` (*dotnetapp-4.6.2/Dockerfile*)](https://github.com/Microsoft/dotnet-framework-docker-samples/blob/dockerhub/dotnetapp-4.7.1/Dockerfile) | ||
- [`3.5-windowsservercore-ltsc2016`, `3.5` (*dotnetapp-3.5/Dockerfile*)](https://github.com/Microsoft/dotnet-framework-docker-samples/blob/dockerhub/dotnetapp-3.5/Dockerfile) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the following comment should be added which exists in our other repos (e.g. https://github.com/Microsoft/dotnet-framework-docker/blob/master/README.md).
Note: .NET Core multi-arch tags, such as 2.0-runtime, have been updated to use nanoserver-1709 images if your host is Windows Server 1709 or higher or Windows 10 Fall Creators Update (Version 1709) or higher. You need Docker 17.10 or later to take advantage of these updated tags.
@MichaelSimons , updated the PR with code review comments. PTAL. Test pipe build : https://devdiv.visualstudio.com/DevDiv/_build/index?buildId=1175441&_a=summary |
@@ -1,4 +1,4 @@ | |||
FROM microsoft/dotnet-framework:3.5 | |||
FROM microsoft/dotnet-framework:3.5 as builder |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This suggests to me that we need to create a 3.5 builder as well. I don't want to ship our asymmetric samples between 3.5 and 4.x (not that these samples are the decision maker!).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed . Issue: #17 tracks the related work.
@@ -0,0 +1,64 @@ | |||
<?xml version="1.0" encoding="utf-8"?> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am wondering if we should switch all of our projects to SDK style. That would seem to be a good idea.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a good idea. Issue : #18 tracks this issue now.
@MichaelSimons ,Does this also require updating the build image ?
@MichaelSimons @richlander , do you have any further comments for this PR ? |
That's it for me. What's your game plan? |
I plan to complete this PR as is and enable the build pipeline ASAP. Next step will be working on improvements as noted in review comments and tracked by issues. Let me know if you have any suggestions. |
By "complete", I assume you mean "merge". Is having these changes in master useful as part of enabling the build pipeline? |
Yes, I meant "merge". These changes are for dockerhub branch specifically for producing dotnet-framework-samples images. Yes,having single branch will greatly improve the discoverability of the source code. Having these changes in master will also increase & require sample apps parity ( including aspnet,wcf apps ) . I would suggest bringing these changes in phases instead of the major overhaul. |
With the addition of multi-stage builds and the introduction of the build images, I think we should reconsider the need for the separate dockerhub branch. I think it would be beneficial to have the images we publish on Docker Hub come from the main examples. This is beneficial for customers as well as us (less maintenance). This is the pattern used by the .NET Core samples. I also am not sure it is necessary to have a sample on Docker Hub for each version. For .NET Core, we only push the latest version. |
Master branch examples are Sdk styled projects for 4.x sample apps. Do we know build images have necessary toolset to build these Sdk based projects? |
Yes, one sample for 4.latest and one for 3.5 is sufficient. |
Question: Now that we're supporting multiple DH repos in the dotnet-framework-docker GH repo, should we just collapse this one into it, too? |
Do you mean enabling dotnet-framework-docker GH repo to build dotnet-framework-docker-samples images or follow the same suggested pattern for dotnet-docker & dotnet-docker-samples as well ? To me , building multiple DH repo images is not very intuitive for users and may complicate the manifest file layout. |
My initial reaction is no.
|
The build images currently don't include the .NET Core sdk. The SDK will add another 282 MB assuming we skip the local package cache which I don't think would be needed in this full fx context. Are there other parts of the the sdk which could be trimmed down for this usage? This is where the work to break down the .NET Core sdk into components would be desirable. |
I logged microsoft/dotnet-framework-docker#49 to track support for Sdk styled projects. |
My understanding is as follow :
What is your take on #1 and #2 ? If we all agree, I will go ahead and merge this PR as is and once microsoft/dotnet-framework-docker#49 is available, will switch from dockerhub to master then. |
I was thinking that once a new .NET Fx version is available, we would publish a new sample image to DH, tag it with a new tag that matches the runtime, add it to the readme and remove the previous tag from the readme. The tag would still exist as is for eternity. My view is this is reasonable behavior for samples.
We should defer the branch consolidation until the build image supports the SDK based projects. We shouldn't be changing the samples in master to the old style. I think this is what you are proposing |
|
@rakeshsinghranchi - were you going to update the PR to only contain the 3.5 and 4.7.1 samples? |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good - just one minor comment.
dotnetapp-3.5/Dockerfile
Outdated
FROM microsoft/dotnet-framework:3.5 | ||
|
||
WORKDIR /app | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: I don't think all of the white space between every instruction is necessary. Consider reducing and making it consistent with the 4.7.1 Dockerfile.
This takes care of the following :
This makes PR #15 obsolete.
Pipeline build definition : https://devdiv.visualstudio.com/DefaultCollection/DevDiv/_apps/hub/ms.vss-ciworkflow.build-ci-hub?_a=edit-build-definition&id=7948