Skip to content

Commit

Permalink
feat: Updates base image and adds features the nice way, allows local…
Browse files Browse the repository at this point in the history
… testing (#1406)

## Description

Updates devcontainer
- base image
- installs features via "features"
- allows local GitHub action testing

## Pipeline Reference

not needed

## Type of Change

- [x] Update to CI Environment or utilities (Non-module effecting
changes)
- [ ] Azure Verified Module updates:
- [ ] Bugfix containing backwards compatible bug fixes, and I have NOT
bumped the MAJOR or MINOR version in `version.json`:
- [ ] Someone has opened a bug report issue, and I have included "Closes
#{bug_report_issue_number}" in the PR description.
- [ ] The bug was found by the module author, and no one has opened an
issue to report it yet.
- [ ] Feature update backwards compatible feature updates, and I have
bumped the MINOR version in `version.json`.
- [ ] Breaking changes and I have bumped the MAJOR version in
`version.json`.
  - [ ] Update to documentation

## Checklist

- [x] I'm sure there are no other open Pull Requests for the same
update/change
- [ ] I have run `Set-AVMModule` locally to generate the supporting
module files.
- [ ] My corresponding pipelines / checks run clean and green without
any errors or warnings

---------

Co-authored-by: ChrisSidebotham-MSFT <[email protected]>
Co-authored-by: Sebastian Gräf <[email protected]>
  • Loading branch information
3 people authored Mar 27, 2024
1 parent 106ea7f commit 54fdcb3
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Ubuntu",
"image": "mcr.microsoft.com/devcontainers/javascript-node:0-18-bullseye",
"image": "mcr.microsoft.com/devcontainers/javascript-node:20-bullseye",
"customizations": {
"vscode": {
"extensions": [
Expand All @@ -17,15 +17,26 @@
]
}
},
"postCreateCommand": "npm install -g prettier && dotnet tool install -g Azure.Bicep.RegistryModuleTool && pwsh -C Install-Module Az.Accounts -Repository PSGallery -Force && pwsh -C Install-Module Az.Resources -Repository PSGallery -Force && pwsh -C Install-Module Az.KeyVault -Repository PSGallery -Force",
"postStartCommand": "az bicep install",
"postCreateCommand": "dotnet tool install -g Azure.Bicep.RegistryModuleTool",
"postStartCommand": "",
"remoteEnv": {
"PATH": "${containerEnv:PATH}:/home/node/.dotnet/tools:/home/node/.azure/bin"
},
"features": {
"azure-cli": "latest",
"dotnet": "8.0",
"ghcr.io/devcontainers/features/azure-cli:1": {
"version": "latest",
"installBicep": true
},
"ghcr.io/devcontainers/features/dotnet:2": {},
"ghcr.io/devcontainers/features/node:1": {},
"ghcr.io/devcontainers/features/powershell:1": {}
"ghcr.io/devcontainers/features/powershell:1": {
"modules": ["Az.Accounts", "Az.Resources", "Az.KeyVault", "Pester"]
},
"ghcr.io/devcontainers-contrib/features/prettier:1": {},
"ghcr.io/devcontainers/features/github-cli:1": {},
// act to run github actions locally
"ghcr.io/devcontainers-contrib/features/act-asdf:2": {},
// for act
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {}
}
}

0 comments on commit 54fdcb3

Please sign in to comment.