This repository has been archived by the owner on Nov 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 520
Add buildProperties to project service configuration #383
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
58a0d91
Add buildArgs to service configuration and capture build configuratio…
alexfdezsauco 3108a51
Fix format
alexfdezsauco 2dcd4ff
Fix - Error CS8600: Converting null literal or possible null value to…
alexfdezsauco 348124e
Improve configuration format for build arguments
alexfdezsauco f4c74e6
Fix whitespace format
alexfdezsauco 9637b4d
Fix error CS8618: Non-nullable property 'Properties' is uninitialized…
alexfdezsauco 1cd9d49
Fix error CS8601: Possible null reference assignment.
alexfdezsauco 76bde24
Translate non first class properties as /p:{Key}={Value} into the bui…
alexfdezsauco 3101100
Fix property translation
alexfdezsauco 6bd44e4
All properties are used to create the msbuild project
alexfdezsauco e15b6ea
Change the name (to BuildProperties) and the type (to List<BuildPrope…
alexfdezsauco 5fdd75b
Add support of build properties when tye run with --docker option
alexfdezsauco 7e4e09e
Resolve conflicts in ProjectReader.cs
alexfdezsauco 666d913
Fix ComprehensionalTest
alexfdezsauco b61c8a8
Add tests to verify the output directory for the corresponding build …
alexfdezsauco e5508fc
Fix whitespace format
alexfdezsauco 1ef040f
Override the correct CreateTestCasesForTheory to fix error CS0618
alexfdezsauco 7334172
Remove the usage of BuildPropertiesToOptionsMap and fix the code format
alexfdezsauco File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
using System.ComponentModel.DataAnnotations; | ||
|
||
namespace Microsoft.Tye.ConfigModel | ||
{ | ||
public class BuildProperty | ||
{ | ||
[Required] | ||
public string Name { get; set; } = default!; | ||
|
||
[Required] | ||
public string Value { get; set; } = default!; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
using System; | ||
using Xunit; | ||
using Xunit.Sdk; | ||
|
||
namespace E2ETest | ||
{ | ||
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false)] | ||
[XunitTestCaseDiscoverer("E2ETest." + nameof(ConditionalTheoryDiscoverer), "Microsoft.Tye.E2ETest")] | ||
public class ConditionalTheoryAttribute : TheoryAttribute | ||
{ | ||
} | ||
} |
41 changes: 41 additions & 0 deletions
41
test/E2ETest/Infrastructure/ConditionalTheoryDiscoverer.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
using System.Collections.Generic; | ||
|
||
using Xunit.Abstractions; | ||
using Xunit.Sdk; | ||
|
||
namespace E2ETest | ||
{ | ||
internal class ConditionalTheoryDiscoverer : TheoryDiscoverer | ||
{ | ||
private readonly IMessageSink _diagnosticMessageSink; | ||
|
||
public ConditionalTheoryDiscoverer(IMessageSink diagnosticMessageSink) | ||
: base(diagnosticMessageSink) | ||
{ | ||
_diagnosticMessageSink = diagnosticMessageSink; | ||
} | ||
|
||
protected override IEnumerable<IXunitTestCase> CreateTestCasesForTheory( | ||
ITestFrameworkDiscoveryOptions discoveryOptions, | ||
ITestMethod testMethod, | ||
IAttributeInfo theoryAttribute) | ||
{ | ||
var skipReason = testMethod.EvaluateSkipConditions(); | ||
return skipReason != null | ||
? new IXunitTestCase[] | ||
{ | ||
new SkippedTestCase( | ||
skipReason, | ||
_diagnosticMessageSink, | ||
discoveryOptions.MethodDisplayOrDefault(), | ||
TestMethodDisplayOptions.None, | ||
testMethod) | ||
} | ||
: base.CreateTestCasesForTheory(discoveryOptions, testMethod, theoryAttribute); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
test/E2ETest/testassets/projects/frontend-backend/tye-debug-configuration.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# tye application configuration file | ||
# read all about it at https://github.com/dotnet/tye | ||
name: frontend-backend | ||
services: | ||
- name: backend | ||
project: backend/backend.csproj | ||
buildProperties: | ||
- name: Configuration | ||
value: Debug | ||
- name: frontend | ||
project: frontend/frontend.csproj | ||
buildProperties: | ||
- name: Configuration | ||
value: Debug |
14 changes: 14 additions & 0 deletions
14
test/E2ETest/testassets/projects/frontend-backend/tye-release-configuration.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# tye application configuration file | ||
# read all about it at https://github.com/dotnet/tye | ||
name: frontend-backend | ||
services: | ||
- name: backend | ||
project: backend/backend.csproj | ||
buildProperties: | ||
- name: Configuration | ||
value: Release | ||
- name: frontend | ||
project: frontend/frontend.csproj | ||
buildProperties: | ||
- name: Configuration | ||
value: Release |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
The reformatting changes make it really hard to tell what actually changed. In the future when you send more PRs (and please send more PRs these are great) I'd refrain from doing these changes as they are a bit distracting in the diff.
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.
Before commit I'm running 'dotnet format -w.'. I don't remember changing that line explicitly. I'll be more careful next time.
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.
No problem. Your contributing some great stuff! Keep it coming!