Skip to content

Commit

Permalink
Update to use template files (#398)
Browse files Browse the repository at this point in the history
-  Changes to xWebAdministration
  - Update appveyor.yml to use the default template.
  - Added default template file .gitattributes, and added default settings for
    Visual Studio Code.
  • Loading branch information
johlju committed Sep 27, 2018
1 parent 7c3efd3 commit 19c5244
Show file tree
Hide file tree
Showing 5 changed files with 75 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
@@ -0,0 +1,2 @@
# Needed for publishing of examples, build worker defaults to core.autocrlf=input.
* text eol=crlf
53 changes: 53 additions & 0 deletions .vscode/analyzersettings.psd1
@@ -0,0 +1,53 @@
@{
<#
For the custom rules to work, the DscResource.Tests repo must be
cloned. It is automatically clone as soon as any unit or
integration tests are run.
#>
CustomRulePath = '.\DSCResource.Tests\DscResource.AnalyzerRules'

IncludeRules = @(
# DSC Resource Kit style guideline rules.
'PSAvoidDefaultValueForMandatoryParameter',
'PSAvoidDefaultValueSwitchParameter',
'PSAvoidInvokingEmptyMembers',
'PSAvoidNullOrEmptyHelpMessageAttribute',
'PSAvoidUsingCmdletAliases',
'PSAvoidUsingComputerNameHardcoded',
'PSAvoidUsingDeprecatedManifestFields',
'PSAvoidUsingEmptyCatchBlock',
'PSAvoidUsingInvokeExpression',
'PSAvoidUsingPositionalParameters',
'PSAvoidShouldContinueWithoutForce',
'PSAvoidUsingWMICmdlet',
'PSAvoidUsingWriteHost',
'PSDSCReturnCorrectTypesForDSCFunctions',
'PSDSCStandardDSCFunctionsInResource',
'PSDSCUseIdenticalMandatoryParametersForDSC',
'PSDSCUseIdenticalParametersForDSC',
'PSMisleadingBacktick',
'PSMissingModuleManifestField',
'PSPossibleIncorrectComparisonWithNull',
'PSProvideCommentHelp',
'PSReservedCmdletChar',
'PSReservedParams',
'PSUseApprovedVerbs',
'PSUseCmdletCorrectly',
'PSUseOutputTypeCorrectly',
'PSAvoidGlobalVars',
'PSAvoidUsingConvertToSecureStringWithPlainText',
'PSAvoidUsingPlainTextForPassword',
'PSAvoidUsingUsernameAndPasswordParams',
'PSDSCUseVerboseMessageInDSCResource',
'PSShouldProcess',
'PSUseDeclaredVarsMoreThanAssignments',
'PSUsePSCredentialType',

<#
This is to test all the DSC Resource Kit custom rules.
The name of the function-blocks of each custom rule start
with 'Measure*'.
#>
'Measure-*'
)
}
3 changes: 2 additions & 1 deletion .vscode/settings.json
Expand Up @@ -9,5 +9,6 @@
"powershell.codeFormatting.ignoreOneLineBlock": false,
"powershell.codeFormatting.preset": "Custom",
"files.trimTrailingWhitespace": true,
"files.insertFinalNewline": true
"files.insertFinalNewline": true,
"powershell.scriptAnalysis.settingsPath": ".vscode\\analyzersettings.psd1"
}
4 changes: 4 additions & 0 deletions README.md
Expand Up @@ -317,6 +317,10 @@ This resource manages the IIS configuration section locking (overrideMode) to co

### Unreleased

* Update appveyor.yml to use the default template.
* Added default template file .gitattributes, and added default settings for
Visual Studio Code.

### 2.2.0.0

* Added new parameter 'Location' to **WebApplcationHandler** extending functionality to address [392]
Expand Down
19 changes: 14 additions & 5 deletions appveyor.yml
Expand Up @@ -3,10 +3,14 @@
#---------------------------------#

version: 1.17.{build}.0
environment:
gallery_api:
secure: 9ekJzfsPCDBkyLrfmov83XbbhZ6E2N3z+B/Io8NbDetbHc6hWS19zsDmy7t0Vvxv

install:
- git clone https://github.com/PowerShell/DscResource.Tests
- ps: Write-Verbose -Message "PowerShell version $($PSVersionTable.PSVersion)" -Verbose
- ps: Import-Module "$env:APPVEYOR_BUILD_FOLDER\DscResource.Tests\AppVeyor.psm1"
- ps: Import-Module -Name "$env:APPVEYOR_BUILD_FOLDER\DscResource.Tests\AppVeyor.psm1"
- ps: Invoke-AppveyorInstallTask
- ps: Install-WindowsFeature -IncludeAllSubFeature -IncludeManagementTools -Name 'Web-Server'

Expand All @@ -22,13 +26,18 @@ build: false

test_script:
- ps: |
Invoke-AppveyorTestScriptTask -CodeCoverage -CodeCovIo -ExcludeTag @()
Invoke-AppveyorTestScriptTask -CodeCoverage -CodeCovIo
# scripts to run before deployment
after_test:
- ps: |
Import-Module -Name "$env:APPVEYOR_BUILD_FOLDER\DscResource.Tests\AppVeyor.psm1"
Invoke-AppveyorAfterTestTask
#---------------------------------#
# deployment configuration #
#---------------------------------#

# scripts to run before deployment
deploy_script:
- ps: |
Invoke-AppveyorAfterTestTask
- ps: |
Invoke-AppVeyorDeployTask

0 comments on commit 19c5244

Please sign in to comment.