diff --git a/src/dotnet-aspire-daily/NOTES.md b/src/dotnet-aspire-daily/NOTES.md new file mode 100644 index 0000000..9df6bfd --- /dev/null +++ b/src/dotnet-aspire-daily/NOTES.md @@ -0,0 +1,6 @@ +## Changelog + +| Version | Notes | +| ------- | ---------------------------------------------------- | +| 1.0.0 | Initial Version | + diff --git a/src/dotnet-aspire-daily/NuGet.config.x b/src/dotnet-aspire-daily/NuGet.config.x new file mode 100644 index 0000000..15b9428 --- /dev/null +++ b/src/dotnet-aspire-daily/NuGet.config.x @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/dotnet-aspire-daily/README.md b/src/dotnet-aspire-daily/README.md new file mode 100644 index 0000000..5bb8ef9 --- /dev/null +++ b/src/dotnet-aspire-daily/README.md @@ -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`._ diff --git a/src/dotnet-aspire-daily/devcontainer-feature.json b/src/dotnet-aspire-daily/devcontainer-feature.json new file mode 100644 index 0000000..3fbb0a6 --- /dev/null +++ b/src/dotnet-aspire-daily/devcontainer-feature.json @@ -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" + ] +} \ No newline at end of file diff --git a/src/dotnet-aspire-daily/install.sh b/src/dotnet-aspire-daily/install.sh new file mode 100644 index 0000000..0094498 --- /dev/null +++ b/src/dotnet-aspire-daily/install.sh @@ -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" diff --git a/test/dotnet-aspire-daily/dotnetcontainer.sh b/test/dotnet-aspire-daily/dotnetcontainer.sh new file mode 100755 index 0000000..d0799f7 --- /dev/null +++ b/test/dotnet-aspire-daily/dotnetcontainer.sh @@ -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 diff --git a/test/dotnet-aspire-daily/scenarios.json b/test/dotnet-aspire-daily/scenarios.json new file mode 100644 index 0000000..6f9ccdb --- /dev/null +++ b/test/dotnet-aspire-daily/scenarios.json @@ -0,0 +1,8 @@ +{ + "dotnetcontainer": { + "image": "mcr.microsoft.com/devcontainers/dotnet:1-8.0", + "features": { + "ghcr.io/devcontainers/features/dotnet:2": {} + } + } +} \ No newline at end of file diff --git a/test/dotnet-aspire-daily/test.sh b/test/dotnet-aspire-daily/test.sh new file mode 100755 index 0000000..d0799f7 --- /dev/null +++ b/test/dotnet-aspire-daily/test.sh @@ -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