Skip to content

Commit

Permalink
Add dotnet-aspire-daily (#7)
Browse files Browse the repository at this point in the history
* Add dotnet-aspire-daily
  • Loading branch information
ElanHasson authored Jan 13, 2024
1 parent 903c05a commit ea6e51c
Show file tree
Hide file tree
Showing 7 changed files with 108 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/dotnet-aspire-daily/NOTES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
## Changelog

| Version | Notes |
| ------- | ---------------------------------------------------- |
| 1.0.0 | Initial Version |

36 changes: 36 additions & 0 deletions src/dotnet-aspire-daily/NuGet.config.x
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- THIS FILE SHOULD BE MERGED INTO YOUR NuGet.config -->

<configuration>
<packageSources>
<clear />
<add key="nuget" value="https://api.nuget.org/v3/index.json" />
<add key="dotnet-public" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json" />
<add key="dotnet-eng" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json" />
<add key="dotnet8" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet8/nuget/v3/index.json" />
<add key="dotnet-libraries" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-libraries/nuget/v3/index.json" />
<add key="orleans-nightly" value="https://orleans.pkgs.visualstudio.com/orleans-public/_packaging/orleans-nightly/nuget/v3/index.json" />
</packageSources>
<packageSourceMapping>
<packageSource key="dotnet-public">
<package pattern="*" />
</packageSource>
<packageSource key="dotnet8">
<package pattern="*" />
</packageSource>
<packageSource key="dotnet-libraries">
<package pattern="Microsoft.DeveloperControlPlane*" />
<package pattern="System.CommandLine" />
</packageSource>
<packageSource key="dotnet-eng">
<package pattern="*" />
</packageSource>
<packageSource key="orleans-nightly">
<package pattern="Microsoft.Orleans.*" />
</packageSource>
<packageSource key="nuget">
<package pattern="*" />
</packageSource>
</packageSourceMapping>
<disabledPackageSources />
</configuration>
11 changes: 11 additions & 0 deletions src/dotnet-aspire-daily/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"name": ".NET Aspire Daily Builds",
"id": "dotnet-aspire-daily",
"version": "1.0.0",
"description": "Installs the .NET Aspire Daily Builds. See: https://github.com/dotnet/aspire/blob/main/docs/using-latest-daily.md",
"options": {},
"mounts": [],
"installsAfter": [
"ghcr.io/devcontainers/features/dotnet"
]
}
9 changes: 9 additions & 0 deletions src/dotnet-aspire-daily/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh
set -e

echo "Activating feature 'aspire'"

dotnet workload update
dotnet workload update --skip-sign-check --source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet8/nuget/v3/index.json
dotnet workload install aspire --skip-sign-check --source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet8/nuget/v3/index.json
cp NuGet.config.x "${workspaceFolder}/LOOK-HERE-ASPIRE-NuGet.Config"
19 changes: 19 additions & 0 deletions test/dotnet-aspire-daily/dotnetcontainer.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash
set -e
source dev-container-features-test-lib

# NOTE: this is an "auto-generated" test, which means it will be
# executed against an auto-generated devcontainer.json that
# includes the 'digitalocean-doctl-cli-persistence' Feature with no options.
#
# https://github.com/devcontainers/cli/blob/main/docs/features/test.md
#
# From my tests, this means the `doctl` CLI will not be installed:
# Thus, here, I only check basic directory existence

# Default behavior checks
check "Make sure Aspire Workload is installed. grep returns 0 if found." test "$(dotnet workload list | grep aspire | echo $?)" = "0"

check "Ensure NuGet.config is copied to workspaceFolder" test -f "${workspaceFolder}/LOOK-HERE-ASPIRE-NuGet.Config"

reportResults
8 changes: 8 additions & 0 deletions test/dotnet-aspire-daily/scenarios.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"dotnetcontainer": {
"image": "mcr.microsoft.com/devcontainers/dotnet:1-8.0",
"features": {
"ghcr.io/devcontainers/features/dotnet:2": {}
}
}
}
19 changes: 19 additions & 0 deletions test/dotnet-aspire-daily/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash
set -e
source dev-container-features-test-lib

# NOTE: this is an "auto-generated" test, which means it will be
# executed against an auto-generated devcontainer.json that
# includes the 'digitalocean-doctl-cli-persistence' Feature with no options.
#
# https://github.com/devcontainers/cli/blob/main/docs/features/test.md
#
# From my tests, this means the `doctl` CLI will not be installed:
# Thus, here, I only check basic directory existence

# Default behavior checks
check "Make sure Aspire Workload is installed. grep returns 0 if found." test "$(dotnet workload list | grep aspire | echo $?)" = "0"

check "Ensure NuGet.config is copied to workspaceFolder" test -f "${workspaceFolder}/LOOK-HERE-ASPIRE-NuGet.Config"

reportResults

0 comments on commit ea6e51c

Please sign in to comment.