Skip to content

Commit

Permalink
Add dotnet-aspire-daily
Browse files Browse the repository at this point in the history
  • Loading branch information
ElanHasson committed Jan 13, 2024
1 parent e090356 commit 3acf382
Show file tree
Hide file tree
Showing 8 changed files with 156 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>
45 changes: 45 additions & 0 deletions src/dotnet-aspire-daily/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@

# Persistence for DigitalOcean doctl CLI (digitalocean-doctl-cli-persistence)

Avoid extra logins from the DigitalOcean CLI (doctl) by preserving the `~/.config/doctl` folder across container instances.

## Example Usage

```json
"features": {
"ghcr.io/ElanHasson/devcontainer-features/digitalocean-doctl-cli-persistence:1": {}
}
```

## Options

| Options Id | Description | Type | Default Value |
|-----|-----|-----|-----|


## Changelog

| Version | Notes |
| ------- | ---------------------------------------------------- |
| 1.1.0 | Improved ownership handling and added support to merge any existing doctl configuration into new folder so no configuration is lost. |
| 1.0.0 | Initial Version |

## OS and Architecture Support

| | amd64 | arm64 |
| ------ | ----- | ----- |
| ubuntu |||
| debian |||

- ✅: Tested and verified on Github Actions
- ❓: Who knows?

## References

- [DigitalOcean CLI Feature](https://github.com/devcontainers-contrib/features/tree/main/src/digitalocean-cli)
- [joshuanian/github-cli-persistence](https://github.com/joshuanianji/devcontainer-features/tree/main/src/github-cli-persistence)


---

_Note: This file was auto-generated from the [devcontainer-feature.json](https://github.com/ElanHasson/devcontainer-features/blob/main/src/digitalocean-doctl-cli-persistence/devcontainer-feature.json). Add additional notes to a `NOTES.md`._
14 changes: 14 additions & 0 deletions src/dotnet-aspire-daily/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"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": [],
"dependsOn": {
"ghcr.io/devcontainers/features/dotnet:2": {}
},
"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 3acf382

Please sign in to comment.