Updates to codespaces config (#25)
This commit is contained in:
Родитель
5c915f45c3
Коммит
90d1364531
|
@ -0,0 +1,10 @@
|
|||
# Copyright (c) Microsoft Corporation.
|
||||
# Licensed under the MIT License.
|
||||
|
||||
# Visual Studio Code image with .NET
|
||||
|
||||
# NOTE:
|
||||
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.245.2/containers/dotnet/.devcontainer/base.Dockerfile
|
||||
|
||||
ARG VARIANT="6.0-bullseye-slim"
|
||||
FROM mcr.microsoft.com/vscode/devcontainers/dotnet:0-${VARIANT}
|
|
@ -12,6 +12,6 @@ if ($Null -eq (Get-PackageProvider -Name NuGet -ErrorAction Ignore)) {
|
|||
if ($Null -eq (Get-InstalledModule -Name PowerShellGet -MinimumVersion 2.2.5 -ErrorAction Ignore)) {
|
||||
Install-Module -Name PowerShellGet -MinimumVersion 2.2.5 -Scope CurrentUser -Force -AllowClobber;
|
||||
}
|
||||
if ($Null -eq (Get-InstalledModule -Name PSRule.Rules.Azure -MinimumVersion 1.17.0 -ErrorAction Ignore)) {
|
||||
Install-Module -Name PSRule.Rules.Azure -MinimumVersion 1.17.0 -Scope CurrentUser -Force;
|
||||
if ($Null -eq (Get-InstalledModule -Name PSRule.Rules.Azure -MinimumVersion 1.19.2 -ErrorAction Ignore)) {
|
||||
Install-Module -Name PSRule.Rules.Azure -MinimumVersion 1.19.2 -Scope CurrentUser -Force;
|
||||
}
|
||||
|
|
|
@ -1,25 +1,37 @@
|
|||
{
|
||||
"name": "PSRule for Azure QuickStart",
|
||||
"settings": {
|
||||
"$schema": "https://raw.githubusercontent.com/devcontainers/spec/main/schemas/devContainer.schema.json",
|
||||
"name": "PSRule for Azure QuickStart",
|
||||
"customizations": {
|
||||
"vscode": {
|
||||
"settings": {
|
||||
"terminal.integrated.defaultProfile.linux": "pwsh",
|
||||
"terminal.integrated.profiles.linux": {
|
||||
"pwsh": {
|
||||
"path": "/bin/pwsh"
|
||||
}
|
||||
"pwsh": {
|
||||
"path": "/opt/microsoft/powershell/7/pwsh"
|
||||
}
|
||||
}
|
||||
},
|
||||
"extensions": [
|
||||
},
|
||||
"extensions": [
|
||||
"ms-dotnettools.csharp",
|
||||
"ms-vscode.powershell",
|
||||
"bewhite.psrule-vscode",
|
||||
"msazurermtools.azurerm-vscode-tools",
|
||||
"ms-azuretools.vscode-bicep",
|
||||
"ms-azure-devops.azure-pipelines"
|
||||
],
|
||||
"features": {
|
||||
"github-cli": "latest",
|
||||
"azure-cli": "latest",
|
||||
"powershell": "latest"
|
||||
},
|
||||
"onCreateCommand": "pwsh -f .devcontainer/container-build.ps1",
|
||||
"postStartCommand": "pwsh -f .devcontainer/container-start.ps1"
|
||||
"ms-azuretools.vscode-bicep"
|
||||
]
|
||||
}
|
||||
},
|
||||
"features": {
|
||||
"github-cli": "latest",
|
||||
"azure-cli": "latest",
|
||||
"powershell": "latest"
|
||||
},
|
||||
"onCreateCommand": "/opt/microsoft/powershell/7/pwsh -f .devcontainer/container-build.ps1",
|
||||
"postStartCommand": "/opt/microsoft/powershell/7/pwsh -f .devcontainer/container-start.ps1",
|
||||
"build": {
|
||||
"dockerfile": "Dockerfile",
|
||||
"args": {
|
||||
"VARIANT": "6.0-bullseye-slim"
|
||||
}
|
||||
},
|
||||
"remoteUser": "vscode"
|
||||
}
|
||||
|
|
|
@ -35,6 +35,6 @@ jobs:
|
|||
|
||||
# Run analysis by using the PSRule GitHub action.
|
||||
- name: Run PSRule analysis
|
||||
uses: microsoft/ps-rule@v2.2.0
|
||||
uses: microsoft/ps-rule@v2.4.0
|
||||
with:
|
||||
modules: 'PSRule.Rules.Azure'
|
||||
|
|
|
@ -32,6 +32,6 @@ jobs:
|
|||
uses: actions/checkout@v3
|
||||
|
||||
- name: Run PSRule analysis
|
||||
uses: Microsoft/ps-rule@v2.2.0
|
||||
uses: Microsoft/ps-rule@v2.4.0
|
||||
with:
|
||||
modules: PSRule.Rules.MSFT.OSS
|
||||
|
|
|
@ -1,5 +1,23 @@
|
|||
{
|
||||
"files.associations": {
|
||||
"**/.pipelines/**/*.yaml": "azure-pipelines"
|
||||
}
|
||||
"files.associations": {
|
||||
"**/.pipelines/**/*.yaml": "azure-pipelines"
|
||||
},
|
||||
"editor.insertSpaces": true,
|
||||
"[json]": {
|
||||
"editor.detectIndentation": false,
|
||||
"editor.formatOnSave": true,
|
||||
"editor.tabSize": 2,
|
||||
"files.insertFinalNewline": true
|
||||
},
|
||||
"[jsonc]": {
|
||||
"editor.detectIndentation": false,
|
||||
"editor.formatOnSave": true,
|
||||
"editor.tabSize": 2,
|
||||
"files.insertFinalNewline": true
|
||||
},
|
||||
"[markdown]": {
|
||||
"editor.detectIndentation": false,
|
||||
"editor.tabSize": 2,
|
||||
"files.insertFinalNewline": true
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,8 +15,8 @@ binding:
|
|||
|
||||
# Require minimum versions of modules.
|
||||
requires:
|
||||
PSRule: '@pre >=2.2.0'
|
||||
PSRule.Rules.Azure: '@pre >=1.17.1'
|
||||
PSRule: '@pre >=2.4.0'
|
||||
PSRule.Rules.Azure: '@pre >=1.19.2'
|
||||
|
||||
# Use PSRule for Azure.
|
||||
include:
|
||||
|
|
Загрузка…
Ссылка в новой задаче