-
Notifications
You must be signed in to change notification settings - Fork 8
first commit of devcontainer feature for .NET Aspire #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
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 hidden or 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,25 @@ | ||
| { | ||
| "image": "mcr.microsoft.com/devcontainers/javascript-node:1-20-bookworm", | ||
| "customizations": { | ||
| "vscode": { | ||
| "settings": { | ||
| "json.schemas": [ | ||
| { | ||
| "fileMatch": [ | ||
| "*/devcontainer-feature.json" | ||
| ], | ||
| "url": "https://raw.githubusercontent.com/devcontainers/spec/main/schemas/devContainerFeature.schema.json" | ||
| } | ||
| ] | ||
| }, | ||
| "extensions": [ | ||
| "mads-hartmann.bash-ide-vscode" | ||
| ] | ||
| } | ||
| }, | ||
| "features": { | ||
| "ghcr.io/devcontainers/features/docker-in-docker:2": {} | ||
| }, | ||
| "remoteUser": "node", | ||
| "updateContentCommand": "npm install -g @devcontainers/cli" | ||
| } |
This file contains hidden or 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,47 @@ | ||
| name: "Release dev container features & Generate Documentation" | ||
| on: | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| deploy: | ||
| if: ${{ github.ref == 'refs/heads/main' }} | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: write | ||
| pull-requests: write | ||
| packages: write | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: "Publish Features" | ||
| uses: devcontainers/action@v1 | ||
| with: | ||
| publish-features: "true" | ||
| base-path-to-features: "./src" | ||
| generate-docs: "true" | ||
|
|
||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Create PR for Documentation | ||
| id: push_image_info | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| run: | | ||
| set -e | ||
| echo "Start." | ||
| # Configure git and Push updates | ||
| git config --global user.email github-actions[bot]@users.noreply.github.com | ||
| git config --global user.name github-actions[bot] | ||
| git config pull.rebase false | ||
| branch=automated-documentation-update-$GITHUB_RUN_ID | ||
| git checkout -b $branch | ||
| message='Automated documentation update' | ||
| # Add / update and commit | ||
| git add */**/README.md | ||
| git commit -m 'Automated documentation update [skip ci]' || export NO_UPDATES=true | ||
| # Push | ||
| if [ "$NO_UPDATES" != "true" ] ; then | ||
| git push origin "$branch" | ||
| gh pr create --title "$message" --body "$message" | ||
| fi |
This file contains hidden or 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,58 @@ | ||
| name: "CI - Test Features" | ||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| pull_request: | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| test-autogenerated: | ||
| runs-on: ubuntu-latest | ||
| continue-on-error: true | ||
| strategy: | ||
| matrix: | ||
| features: | ||
| - color | ||
| - hello | ||
| baseImage: | ||
| - debian:latest | ||
| - ubuntu:latest | ||
| - mcr.microsoft.com/devcontainers/base:ubuntu | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: "Install latest devcontainer CLI" | ||
| run: npm install -g @devcontainers/cli | ||
|
|
||
| - name: "Generating tests for '${{ matrix.features }}' against '${{ matrix.baseImage }}'" | ||
| run: devcontainer features test --skip-scenarios -f ${{ matrix.features }} -i ${{ matrix.baseImage }} . | ||
|
|
||
| test-scenarios: | ||
| runs-on: ubuntu-latest | ||
| continue-on-error: true | ||
| strategy: | ||
| matrix: | ||
| features: | ||
| - color | ||
| - hello | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: "Install latest devcontainer CLI" | ||
| run: npm install -g @devcontainers/cli | ||
|
|
||
| - name: "Generating tests for '${{ matrix.features }}' scenarios" | ||
| run: devcontainer features test -f ${{ matrix.features }} --skip-autogenerated --skip-duplicated . | ||
|
|
||
| test-global: | ||
| runs-on: ubuntu-latest | ||
| continue-on-error: true | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: "Install latest devcontainer CLI" | ||
| run: npm install -g @devcontainers/cli | ||
|
|
||
| - name: "Testing global scenarios" | ||
| run: devcontainer features test --global-scenarios-only . |
This file contains hidden or 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 @@ | ||
| name: "Validate devcontainer-feature.json files" | ||
| on: | ||
| workflow_dispatch: | ||
| pull_request: | ||
|
|
||
| jobs: | ||
| validate: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: "Validate devcontainer-feature.json files" | ||
| uses: devcontainers/action@v1 | ||
| with: | ||
| validate-only: "true" | ||
| base-path-to-features: "./src" |
This file contains hidden or 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,5 @@ | ||
| # Code of Conduct | ||
|
|
||
| This project has adopted the code of conduct defined by the Contributor Covenant | ||
| to clarify expected behavior in our community. | ||
| For more information, see the [.NET Foundation Code of Conduct](https://dotnetfoundation.org/code-of-conduct). |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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,23 @@ | ||
| The MIT License (MIT) | ||
|
|
||
| Copyright (c) .NET Foundation and Contributors | ||
|
|
||
| All rights reserved. | ||
|
|
||
| Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| of this software and associated documentation files (the "Software"), to deal | ||
| in the Software without restriction, including without limitation the rights | ||
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| copies of the Software, and to permit persons to whom the Software is | ||
| furnished to do so, subject to the following conditions: | ||
|
|
||
| The above copyright notice and this permission notice shall be included in all | ||
| copies or substantial portions of the Software. | ||
|
|
||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
| SOFTWARE. |
This file contains hidden or 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 |
|---|---|---|
| @@ -1,3 +1,6 @@ | ||
| # Contributing | ||
|
|
||
| This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. | ||
| # .NET Aspire (dotnetaspire) | ||
|
|
||
| This repo builds, tests and publishes a cevcontainer feature that installs .NET Aspire and if necessary the .NET (dotnet) that it depends on. Options are provided to choose a different version or additional versions. | ||
|
|
||
| See [README.md in the subfolder](src/dotnetaspire/README.md) for more information. | ||
This file contains hidden or 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 hidden or 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,64 @@ | ||
|
|
||
| # .NET Aspire (dotnetaspire) | ||
|
|
||
| This Feature installs .NET Aspire and if necessary the .NET (dotnet) that it depends on. Options are provided to choose a different version or additional versions. | ||
|
|
||
| ## OS Support | ||
|
|
||
| This Feature should work on recent versions of Debian/Ubuntu-based distributions that support .NET and have the `apt` package manager installed | ||
|
|
||
| `bash` is required to execute the `install.sh` script. | ||
|
|
||
| ## Example Usage | ||
|
|
||
| ```json | ||
| "features": { | ||
| "ghcr.io/devcontainers/features/dotnetaspire:1": {} | ||
| } | ||
| ``` | ||
|
|
||
| ## Options | ||
|
|
||
| | Options Id | Description | Type | Default Value | | ||
| |-----|-----|-----|-----| | ||
| | version | .NET Aspire version. Use 'latest' for the latest supported version, '9.0' for the 9.0 version, 'X.Y' or 'X.Y.Z' for a specific version, or 'latest-daily' for the latest unsupported build. | string | latest | | ||
|
|
||
| ## Customizations | ||
|
|
||
| ### VS Code Extensions | ||
|
|
||
| - `ms-dotnettools.csdevkit` | ||
|
|
||
| ## Configuration examples | ||
|
|
||
| Installing only the latest .NET Aspire version (the default). | ||
|
|
||
| ``` jsonc | ||
| "features": { | ||
| "ghcr.io/devcontainers/features/dotnetaspire:1": "latest" // or "" or {} | ||
| } | ||
| ``` | ||
|
|
||
| Installing .NET Aspire version 9.0. | ||
|
|
||
| ``` jsonc | ||
| "features": { | ||
| "ghcr.io/devcontainers/features/dotnetaspire:1": "9.0" // or "" or {} | ||
| } | ||
| ``` | ||
|
|
||
| Installing the latest .NET Aspire unsupported build. | ||
|
|
||
| ``` jsonc | ||
| "features": { | ||
| "ghcr.io/devcontainers/features/dotnetaspire:1": "latest-daily" // or "" or {} | ||
| } | ||
| ``` | ||
|
|
||
|
|
||
| ## OS Support | ||
|
|
||
| This Feature should work on recent versions of Debian/Ubuntu-based distributions with the `apt` package manager installed. | ||
|
|
||
| `bash` is required to execute the `install.sh` script. | ||
|
|
This file contains hidden or 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,42 @@ | ||
| { | ||
| "id": "dotnetaspire", | ||
| "version": "1.0.0", | ||
| "name": ".NET Aspire", | ||
| "documentationURL": "https://github.com/devcontainers/features/tree/main/src/dotnetaspire", | ||
| "description": "Installs .NET Aspire. See https://aka.ms/dotnetaspire", | ||
| "options": { | ||
| "version": { | ||
| "type": "string", | ||
| "proposals": [ | ||
| "latest daily", | ||
| "latest", | ||
| "9.0", | ||
danmoseley marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ], | ||
| "default": "9.0", | ||
| "description": "Select or enter a .NET Aspire version. Use 'latest' for the latest supported version, '9.0' for the 9.0 version, 'X.Y' or 'X.Y.Z' for a specific version, or 'latest-daily' for the latest unsupported build." | ||
| }, | ||
| }, | ||
| "customizations": { | ||
| "vscode": { | ||
| "extensions": [ | ||
| "ms-dotnettools.csdevkit", | ||
| "ms-azuretools.vscode-bicep", | ||
| "GitHub.copilot-chat", | ||
| "GitHub.copilot" | ||
| ], | ||
| "settings": { | ||
| "remote.autoForwardPorts": true, | ||
| "remote.autoForwardPortsSource": "hybrid", | ||
| "remote.otherPortsAttributes": { | ||
| "onAutoForward": "ignore" | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "dependsOn": { | ||
| "ghcr.io/devcontainers/features/dotnet": { | ||
| "version": "8.0", | ||
danmoseley marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| "additionalVersions": "9.0" | ||
| } | ||
| } | ||
| } | ||
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.
Uh oh!
There was an error while loading. Please reload this page.