Skip to content
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

AzDevOpsProject: Azure DevOps, REST API Wrapper and AzDevOpsProject, DSC resource #7

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
613 commits
Select commit Hold shift + click to select a range
aa2a56b
Updated line spacing in 'Get-AzDevOpsApiResourceName' test cases.
SphenicPaul Nov 10, 2020
02207ba
Added placeholder scripts for future, unit tests.
SphenicPaul Nov 10, 2020
1b0cccd
Removed empty, TODO files
SphenicPaul Nov 10, 2020
ce75a7b
Removed empty, test files.
SphenicPaul Nov 10, 2020
be9a9f3
Added empty, test script placeholder files
SphenicPaul Nov 11, 2020
65518df
Added 'Test-AzDevOpsApiHttpRequestHeader' function, unit tests
SphenicPaul Nov 11, 2020
fefdb46
Added unit tests for 'Test-AzDevOpsApiResourceId'
SphenicPaul Nov 11, 2020
50fe5d2
Added unit tests for 'Test-AzDevOpsApiResourceName'
SphenicPaul Nov 11, 2020
986aa71
Added unit tests for 'Test-AzDevOpsApiUri'
SphenicPaul Nov 11, 2020
1347619
Added unit tests for 'Test-AzDevOpsApiVersion'
SphenicPaul Nov 11, 2020
c715b83
Added placeholder script for 'Test-AzDevOpsApiResource' unit tests
SphenicPaul Nov 11, 2020
f416415
Added placeholder script for 'Wait-AzDevOpsApiResource', unit tests
SphenicPaul Nov 11, 2020
dd3c48c
Deleted 'New-AzDevOpsConnection' script/function
SphenicPaul Nov 11, 2020
e9eb9c4
Added 'Test-AzDevOpsPatCredential' function, unit tests
SphenicPaul Nov 11, 2020
06f9b6c
Updated a number of test scripts to include an '-IsValid:$false' para…
SphenicPaul Nov 11, 2020
401ede9
Added unit tests for 'Test-AzDevOpsOperationId', 'Test-AzDevOpsOrgani…
SphenicPaul Nov 11, 2020
eb0f0d9
Added test case name/value into certain 'Should return $true/$false" …
SphenicPaul Nov 11, 2020
03c33cc
Renamed a number of '\Resources\Functions\Public' test files to '...T…
SphenicPaul Nov 11, 2020
0d6e9e0
Deleted, non-required test scripts
SphenicPaul Nov 11, 2020
3e40659
Added placeholder script for 'Wait-AzDevOpsOperation' function, unit …
SphenicPaul Nov 11, 2020
6a94b8c
Renamed unit test scripts for 'Get-AzDevOpsApiResource' and 'Invoke-A…
SphenicPaul Nov 11, 2020
2a3759d
Renamed old, test file for generic, function tests
SphenicPaul Nov 11, 2020
28993c5
Moved useful tests script into 'tests\Unit\Modules' directory.
SphenicPaul Nov 11, 2020
ddb3ae9
Renamed 'Get-AzDevOpsServicesApiUri' and 'Get-AzDevOpsServicesUri' wi…
SphenicPaul Nov 11, 2020
360a796
Added 'JaCoCo_coverage.xml' to .gitignore
SphenicPaul Nov 11, 2020
1065a44
Updated 'Wait-AzDevOpsApiResource' function 'WaitIntervalMilliseconds…
SphenicPaul Nov 11, 2020
4c3ac6d
Updated 'Wait-AzDevOpsOperation' function 'WaitIntervalMilliseconds' …
SphenicPaul Nov 11, 2020
3109337
Added 'Test-AzDevOpsTimeoutExceeded' function.
SphenicPaul Nov 11, 2020
9ca61d5
Added first attempt at 'Wait-AzDevOpsOperation', function, unit tests…
SphenicPaul Nov 11, 2020
29df519
Updated 'AzureDevOpsDsc.Common.TestInitialization' script to find/imp…
SphenicPaul Nov 11, 2020
87677b3
Commented out all 'AzureDevOpsDsc.Common.Tests.Initialization.ps1' sc…
SphenicPaul Nov 11, 2020
6237549
Added placeholder script for 'Test-AzDevOpsTimeoutExceeded', unit tests.
SphenicPaul Nov 11, 2020
14aa894
Updated a number of tests to amend the way that the set is setup and …
SphenicPaul Nov 11, 2020
59eb4f2
Updated 'InModuleScope' name to be hard-coded, 'AzureDevOpsDsc.Common…
SphenicPaul Nov 11, 2020
b26acd1
Updated a number of test scripts to amend 'InModuleScope'. module nam…
SphenicPaul Nov 11, 2020
b8fd0b7
Removed validation of 'IsComplete' and 'IsSuccessful' parameters with…
SphenicPaul Nov 12, 2020
1de0085
Added test to support removal of validation of 'IsComplete' and 'IsSu…
SphenicPaul Nov 12, 2020
2ba23cc
Removed functionality to validate use of 'IsValid' parameter within '…
SphenicPaul Nov 12, 2020
f77fe4a
Updated a number of 'Test-', method bodies to make them less verbose …
SphenicPaul Nov 12, 2020
3c06bab
Added tests for 'Test-AzDevOpsOperationId' and 'Test-AzDevOpsProjectI…
SphenicPaul Nov 12, 2020
a5ce24c
Added unit tests for 'Test-AzDevOpsTimeoutExceeded'
SphenicPaul Nov 12, 2020
87d4918
Moved 'Test-AzDevOpsTimeoutExceeded' function (and unit tests) into '…
SphenicPaul Nov 12, 2020
c0ee066
Renamed/Updated 'Test-AzDevOpsTimeoutExceeded' function to 'Test-AzDe…
SphenicPaul Nov 12, 2020
4b180d0
Added 'ValidateSet' parameter attributes on 'Wait-AzDevOpsOperation',…
SphenicPaul Nov 12, 2020
be0a472
Updated 'Wait-AzDevOpsApiResource' function to add validation to 'IsP…
SphenicPaul Nov 12, 2020
61e3817
Removed, non-relevant tests from 'Wait-AzDevOpsOperation' function, u…
SphenicPaul Nov 12, 2020
096d86b
Added 'Wait-AzDevOpsApiResource' function, unit tests
SphenicPaul Nov 12, 2020
72c29fa
Removed 'Wait-AzDevOpsOperation', unit tests placeholder file.
SphenicPaul Nov 12, 2020
5782465
Removed checks on 'IsPresent' and 'IsAbsent' in 'Wait-AzDevOpsApiReso…
SphenicPaul Nov 12, 2020
12427d1
Added 'HttpRequestHeader' parameter alias to 'Invoke-AzDevOpsApiRestM…
SphenicPaul Nov 12, 2020
6e0bfad
Added 'Invoke-AzDevOpsApiRestMethod' function, unit tests
SphenicPaul Nov 12, 2020
ae83209
Corrected some test cases in 'Wait-AzDevOpsApiResource' function, uni…
SphenicPaul Nov 12, 2020
58abd42
Added additional, unit tests for 'Wait-AzDevOpsApiResource' function …
SphenicPaul Nov 12, 2020
20b77ca
Added code coverage output file into 'build.yaml' file.
SphenicPaul Nov 12, 2020
2bd99b2
Deleted 'Invoke-AzDevOpsApiRestMethod.Tests.Old.ps1'
SphenicPaul Nov 12, 2020
6a12961
Added 'Get-AzDevOpsApiResource' function, unit tests.
SphenicPaul Nov 12, 2020
5df73e6
Corrected 'It' name in 'Invoke-AzDevOpsApiRestMethod' function, unit …
SphenicPaul Nov 12, 2020
f5576d8
Added 'Get-AzDevOpsApiResource' function, unit tests
SphenicPaul Nov 12, 2020
b641646
Simplified 'Get-AzDevOpsApiResource' function
SphenicPaul Nov 12, 2020
d1193b5
Added tests for 'Get-AzDevOpsApiResource' function to ensure executio…
SphenicPaul Nov 12, 2020
c11ef77
Removed '_TODO2.Invoke-AzDevOpsApiRestMethod.Tests.ps1' placeholder file
SphenicPaul Nov 12, 2020
9d41b9c
Renamed '_TODO2.Test-AzDevOpsApiResource.Tests.ps1' to 'Test-AzDevOps…
SphenicPaul Nov 12, 2020
a596593
Added 'First' parameter to calls to 'Get-TestCaseValue' from a couple…
SphenicPaul Nov 12, 2020
209959a
Changed $apiResource variable type within 'Test-AzDevOpsApiResource'
SphenicPaul Nov 12, 2020
9fe8361
Added 'Test-AzDevOpsApiResource' function, unit tests
SphenicPaul Nov 12, 2020
4c226c8
Updated $operation variable data type, and validation on 'IsComplete'…
SphenicPaul Nov 12, 2020
2bdebda
Added unit tests for 'Test-AzDevOpsOperation' function.
SphenicPaul Nov 12, 2020
fe151d9
Simplified 'Test-AzDevOpsOperation' function
SphenicPaul Nov 12, 2020
86079bd
Removed 'Test-AzDevOpsOperation.Tests.Old.ps1'
SphenicPaul Nov 12, 2020
40075a4
Removed non-required unit tests for 'Test-AzDevOpsOperation'
SphenicPaul Nov 12, 2020
1951b3e
Added 'Test-AzDevOpsProject' function, unit tests
SphenicPaul Nov 12, 2020
13bdaef
Tidied up 'Get-AzDevOpsOperation' function
SphenicPaul Nov 13, 2020
e88852b
Corrected 'It' descriptions in 'Test-AzDevOpsProject' function, unit …
SphenicPaul Nov 13, 2020
c8c6d75
Added 'Get-AzDevOpsOperation' function, unit tests
SphenicPaul Nov 13, 2020
7317231
Made minor updates to test case, 'It' descriptions in 'Get-AzDevOpsOp…
SphenicPaul Nov 13, 2020
86f7660
Updated 'Get-AzDevOpsProject' to add comments and simplify function e…
SphenicPaul Nov 13, 2020
0435947
Added 'Get-AzDevOpsProject' function, unit tests
SphenicPaul Nov 13, 2020
e96d2c3
Added 'AllowWildcard' switch to 'Test-AzDevOpsProjectName' function
SphenicPaul Nov 13, 2020
9d0faf7
Updated 'Get-AzDevOpsProject' to make use of 'AllowWildcard' switch o…
SphenicPaul Nov 13, 2020
8a96e78
Added unit tests for 'Get-AzDevOpsApiResource' when invoked with 'Pro…
SphenicPaul Nov 13, 2020
d0637c2
Updated 'Test-AzDevOpsProjectName' function, unit tests to include te…
SphenicPaul Nov 13, 2020
ae22b94
Added 'Get-AzDevOpsProject' function, unit tests for calls using both…
SphenicPaul Nov 13, 2020
cc806dc
Deleted old 'Get-AzDevOpsProject' function, unit tests file.
SphenicPaul Nov 13, 2020
5687d04
Added placeholder scripts for unit tests
SphenicPaul Nov 13, 2020
78520c5
Simplified 'Get-AzDevOpsServicesUri' function body
SphenicPaul Nov 13, 2020
9f2146b
Added 'Get-AzDevOpsServicesUri' function, unit tests (and removed old…
SphenicPaul Nov 13, 2020
0765c1b
Corrected unit test for 'Get-AzDevOpsServicesUri'
SphenicPaul Nov 13, 2020
6c2731c
Simplified 'Get-AzDevOpsServicesApiUri' function
SphenicPaul Nov 13, 2020
3c37c4c
Added unit tests for 'Get-AzDevOpsServicesApiUri' function
SphenicPaul Nov 13, 2020
622bef2
Deleted 'AzureDevOpsDsc.Server' and 'AzureDevOpsDsc.Server' empty, ne…
SphenicPaul Nov 13, 2020
260473e
Removed additional references to 'AzureDevOpsDsc.Server' and 'AzureDe…
SphenicPaul Nov 13, 2020
5b6f63f
Added empty, 'README.md' files in 'DSCClassResources' and 'DSCResourc…
SphenicPaul Nov 13, 2020
f1c3500
Added '_README.md' files into a number of function directories.
SphenicPaul Nov 13, 2020
b50240b
Added use of 'AZUREDEVOPS_INTEGRATION_APIURI' and 'AZUREDEVOPS_INTEGR…
SphenicPaul Nov 13, 2020
ea90da2
Added 'return' into common, function tests to skip these.
SphenicPaul Nov 13, 2020
4c4fee8
Removed 'CodeCoverage' from being performed as part of 'test_windows_…
SphenicPaul Nov 13, 2020
f16b4a0
Added 'tests/Integration' folder into Pester scripts directories (wit…
SphenicPaul Nov 13, 2020
7499085
Updated 'azure-pipelines.yml' to include 'Integration' tests (and tem…
SphenicPaul Nov 13, 2020
1f6d9ad
Updated 'testRunTitle' (within azure-pipelines.yml' to include test t…
SphenicPaul Nov 13, 2020
d50b6a3
Updated 'test_unit_macos' display name to include 'Unit Tests'
SphenicPaul Nov 13, 2020
9642f4a
Updated 'azure-pipelines.yml' so only 'Integration' tests will run.
SphenicPaul Nov 13, 2020
927e68d
Removed/Updated references to 'SQL Server'/'SQL.
SphenicPaul Nov 13, 2020
cdd647f
Updated assignment of 'ApiUri' and 'Pat' within 'DSC_AzDevOpsProject'…
SphenicPaul Nov 13, 2020
f7481d4
Updated environment variable names (for 'ApiUri' and 'Pat' in 'DSC_Az…
SphenicPaul Nov 14, 2020
49313e2
Added 'integrationBuildVariable' step to integration tests job in 'az…
SphenicPaul Nov 14, 2020
4026549
Updated 'azure-pipelines.yml' and integration test configuration to a…
SphenicPaul Nov 14, 2020
cf91965
Corrected typo for $(AzureDevOps.Integration.Pat) in 'azure-pipelines…
SphenicPaul Nov 14, 2020
2cdfdac
Updated build and integration tests to use $env:AZUREDEVOPS_INTEGRATI…
SphenicPaul Nov 14, 2020
1db488d
Removed invalid 'variables' option from 'azure-pipelines.yml'
SphenicPaul Nov 14, 2020
2cf87eb
Updated build configuration for integration tests back to using $env:…
SphenicPaul Nov 14, 2020
04d6afc
Removed code coverage upload for 'Integration' tests in 'azure-pipeli…
SphenicPaul Nov 14, 2020
beaa7ab
Re-enabled build 'jobs' that had previously been disabled within 'azu…
SphenicPaul Nov 14, 2020
3284e46
Removed non-required comments from 'DSC_AzDevOpsProject.config.ps1'
SphenicPaul Nov 14, 2020
bbffe56
Added comments to 'azure-pipelines.yml' about disabling Pester, 'Code…
SphenicPaul Nov 14, 2020
b65fecf
Updated '.markdownlint.json' to update Markdown, 'MD013' configuratio…
SphenicPaul Nov 14, 2020
3723683
Added 'Ensure', enum directory, module and readme.
SphenicPaul Nov 14, 2020
f71fcca
Added 'RequiredAction', enum directory, module and readme.
SphenicPaul Nov 14, 2020
a871b56
Added 'AzDevOpsDscResource', class directory, module and readme.
SphenicPaul Nov 14, 2020
9b94f28
Removed 'Ensure' and 'RequiredAction' enums, and 'AzDevOpsDscResource…
SphenicPaul Nov 14, 2020
860ab8a
Updated 'README.md' for 'Ensure' and 'RequiredAction' enums
SphenicPaul Nov 14, 2020
163b790
Updated casing of 'Resource' in 'DSC Resource' to be consistent/upper…
SphenicPaul Nov 14, 2020
f5f623a
Added 'README.txt' files for 'DSCResources' and 'DSCClassResources' d…
SphenicPaul Nov 14, 2020
2e66359
Added 'Classes' and 'Enums' directories to 'build.yaml', 'CopyPaths' …
SphenicPaul Nov 14, 2020
8bdd505
Added 'README.md'; in 'Enums' directory
SphenicPaul Nov 14, 2020
1decab1
Updated 'DSCResources', 'README.txt' to add directory name.
SphenicPaul Nov 14, 2020
dcee37f
Moved 'AzDevOpsApiDscResource' class from 'AzureDevOpsDsc.psm1' file …
SphenicPaul Nov 14, 2020
185aaad
Renamed 'AzDevOpsDscResource' class to 'DscResourceBase' class.
SphenicPaul Nov 14, 2020
404b5c9
Renamed 'AzDevOpsApiDscResource' class to 'AzDevOpsApiDscResourceBase…
SphenicPaul Nov 14, 2020
3048bec
Renamed 'DSC_AzDevOpsApiResource' class to 'AzDevOpsDscResourceBase'
SphenicPaul Nov 14, 2020
b3391c8
Moved 'AzDevOpsDscResourceBase' class out of 'AzureDevOpsDsc.psm1' file.
SphenicPaul Nov 14, 2020
9755fc0
Removed 'using' statements for 'Ensure.psm1' and 'RequiredAction.psm1…
SphenicPaul Nov 14, 2020
122e79a
Added 'RequiredAction' enum into 'AzDevOpsApiDscResourceBase.psm1' di…
SphenicPaul Nov 14, 2020
3d07dd9
Removed 'Enums' from 'using' statements in 'AzureDevOpsDsc.psm1'
SphenicPaul Nov 14, 2020
f7c00f4
Removed enums from 'using' statements and added in directly into 'AzD…
SphenicPaul Nov 14, 2020
8938dc0
Updated 'AzDevOpsApiDscResourceBase' to obtain 'RequiredAction' enum …
SphenicPaul Nov 14, 2020
b2a5a91
Updated 'AzDevOpsDscResourceBase.psm1' file to obtain 'RequiredAction…
SphenicPaul Nov 14, 2020
281f31c
Updated 'using' and comment for 'Ensure' enum within 'AzDevOpsDscReso…
SphenicPaul Nov 14, 2020
dcc58de
Removed Get() and Set() methods from 'DSC_AzDevOpsProject', DSC resou…
SphenicPaul Nov 14, 2020
d192b80
Renamed 'DSC_AzDevOpsProject', DSC Resource to 'AzDevOpsProject'
SphenicPaul Nov 14, 2020
7266092
Updated to cater for removal of 'DSC_' prefix on DSCClassResources.
SphenicPaul Nov 14, 2020
9dcffdd
Moved 'AzDevOpsProject', DSC Resource into it's own file/module and o…
SphenicPaul Nov 14, 2020
e29f008
Added 'AzDevOpsProject.psm1' to 'NestedModules' property in 'AzureDev…
SphenicPaul Nov 14, 2020
7e56c89
Added 'README.md' for 'AzDevOpsProject', DSC resource.
SphenicPaul Nov 14, 2020
2782238
Renamed 'DSC_AzDevOpsProject', example directory to 'AzDevOpsProject'.
SphenicPaul Nov 14, 2020
de24bed
Added 'DscResourceBase' class, 'GetDscResourceKey()' method, unit tests
SphenicPaul Nov 14, 2020
6485509
Added additional condition into 'GetDscResourceKey()' method in 'DscR…
SphenicPaul Nov 14, 2020
01e5f06
Updated 'DscResourceBase' class, unit tests to include test for multi…
SphenicPaul Nov 14, 2020
ecdea45
Added unit tests for 'GetDscResourceKeyPropertyName()' method in 'Dsc…
SphenicPaul Nov 14, 2020
9f0df6d
Added unit tests for 'DscResourceBase' class, 'GetDscResourceProperty…
SphenicPaul Nov 14, 2020
b622fcd
Added unit tests for 'DscResourceBase' class, 'GetDscResourceProperty…
SphenicPaul Nov 14, 2020
62eb344
Removed comments in ''AzureDevOpsDsc.psm1'
SphenicPaul Nov 14, 2020
92e4133
Removed 'AzureDevOps.Common' module import from 'AzDevOpsApiDscResour…
SphenicPaul Nov 14, 2020
5ee5268
Removed import of 'AzureDevOps.Common' module from 'DscResourceBase.p…
SphenicPaul Nov 14, 2020
e95b140
Added import of 'AzureDevOpsDsc.Common' module into 'AzDevOpsProject.…
SphenicPaul Nov 14, 2020
88bb3c7
Added 'Classes.TestInitialization.ps1'
SphenicPaul Nov 14, 2020
fef3521
Added 'using' reference to 'AzDevOpsProject.psm1' and call to 'Classe…
SphenicPaul Nov 14, 2020
f36d4ef
Updated functionality in 'AzureDevOpsDsc.Common.Tests.Initialization.…
SphenicPaul Nov 14, 2020
de5fe66
Added import of 'AzureDevOpsDsc.Common' module into 'AzDevOpsProject'…
SphenicPaul Nov 14, 2020
4ee42cf
Updated 'CodeCoverageOutputFile' file path in 'build.yaml'
SphenicPaul Nov 14, 2020
667d1b2
Updated test-initialization scripts to be identical
SphenicPaul Nov 14, 2020
d660a25
Deleted old, 'AzureDevOpsDsv.TestInitialization.ps1' script.
SphenicPaul Nov 14, 2020
ac69ab1
Updated test initialization scripts to invoke 'Remove-Module' without…
SphenicPaul Nov 14, 2020
03dc7bc
Updated 'DscResourceBase' class, GetDscResourceKey() method unit test…
SphenicPaul Nov 14, 2020
c731204
Updated 'DscResourceBase' class, GetDscResourceKeyPropertyName() meth…
SphenicPaul Nov 14, 2020
522fc36
Updated 'DscResourceBase' class, GetDscResourcePropertyNames() method…
SphenicPaul Nov 14, 2020
8906d73
Updated 'DscResourceBase' class, GetDscResourcePropertyNamesWithNoSet…
SphenicPaul Nov 14, 2020
12d670d
Updated test initialization script
SphenicPaul Nov 14, 2020
f67200c
Added 'using' of AzDevOpsApiDscResourceBase.psm1 in 'GetDscResourceKe…
SphenicPaul Nov 14, 2020
2f5364f
Updated 'GetDscResourceKeyPropertyName.Tests.ps1' file to use 'AzDevO…
SphenicPaul Nov 15, 2020
f08a3f3
Added 'using' statement to 'GetDscResourceKeyPropertyName.Tests.ps1' …
SphenicPaul Nov 15, 2020
f424385
Updated 'DscResourceBase' class, GetDscResourceKeyPropertyName() meth…
SphenicPaul Nov 15, 2020
d906a36
Updated 'DscResourceBase' class, function, unit tests to use 'DscReso…
SphenicPaul Nov 15, 2020
1281f07
Added 'DscResourceBase', unit test initialization script
SphenicPaul Nov 15, 2020
25ad562
Added 'DscResourceBase.Initialization.Tests.ps1' (to replace 'Aaa.Dsc…
SphenicPaul Nov 15, 2020
871ce37
Renamed 'AzDevOpsProject.Tests.ps1' and content in line with 'DSC_AzD…
SphenicPaul Nov 15, 2020
dd47791
Removed/Suppressed module/generic, 'DscClassResource' tests
SphenicPaul Nov 15, 2020
0abb54a
Added 'AzDevOpsApiDscResourceBase' class, unit tests, initialization …
SphenicPaul Nov 15, 2020
d4196a1
Added 'AzDevOpsApiDscResourceBase' class, GetResourceName() method, u…
SphenicPaul Nov 15, 2020
4478bbd
Added unit tests for GetResourceId() and GetResourceIdPropertyName() …
SphenicPaul Nov 15, 2020
40fbef5
Added unit tests for GetResourceKey() and GetResourceKeyPropertyName(…
SphenicPaul Nov 15, 2020
7c4a388
Added unit tests for 'AzDevOpsApiDscResourceBase' class, GetResourceF…
SphenicPaul Nov 15, 2020
5e0cbab
Removed 'AzureDevOpsDsc.Common' module import from 'AzDevOpsDscResour…
SphenicPaul Nov 15, 2020
0202507
Added import of 'AzureDevOpsDsc.Common', nested module back into 'AzD…
SphenicPaul Nov 15, 2020
2072007
Added initial, 'AzDevOpsProject', unit tests for Get() method.
SphenicPaul Nov 15, 2020
9fb42f3
Moved module import in 'AzDevOpsDscResourceBase' class into 'using' s…
SphenicPaul Nov 15, 2020
d9280e3
Added initial scripts for 'AzDevOpsDscResourceBase' class, unit tests.
SphenicPaul Nov 15, 2020
89cbb78
Added unit tests for 'AzDevOpsProject', DSC Resource, GetDscResourceP…
SphenicPaul Nov 15, 2020
effcd17
Added unit tests for 'AzDevOpsProject' class, GetDscCurrentStatePrope…
SphenicPaul Nov 15, 2020
9a322d1
Updated 'AzureDevOpsProject.Tests.ps1' to add additional unit tests a…
SphenicPaul Nov 15, 2020
297ba7c
Added 'using' statements into a number of test scripts to import clas…
SphenicPaul Nov 15, 2020
01428ad
Renamed 'CodeCoverageOutputFile' configuration value to remove subdir…
SphenicPaul Nov 15, 2020
6c28fef
Updated 'GetResourceFunctionName.Tests.ps1' to add 'AzDevOpsApiDscRes…
SphenicPaul Nov 15, 2020
ab6e560
Updated .gitignore to exclude 'CodeCoverage.JaCoCo.xml'
SphenicPaul Nov 15, 2020
03071f9
Added GetResourceName() function onto 'AzDevOpsApiDscResourceBaseExam…
SphenicPaul Nov 15, 2020
8727fea
Added 'AzDevOpsApiDscResourceBaseExample' class to 'GetResourceId.Tes…
SphenicPaul Nov 15, 2020
300812b
Added 'DscKey' property into 'DscResourceWithWrongPrefix' class in 'G…
SphenicPaul Nov 15, 2020
3fd75bd
Added 'AzDevOpsApiDscResourceBaseExample' class into 'GetResourceIdPr…
SphenicPaul Nov 15, 2020
10b8d64
Added 'DscResourceBase.psm1', 'using' reference in 'GetDscResourceKey…
SphenicPaul Nov 15, 2020
3548626
Updated 'Describe' block name in an number of 'AzDevOpsApiDscResource…
SphenicPaul Nov 15, 2020
cb29c55
Added 'AzDevOpsApiDscResourceBaseExample' class into 'GetResourceName…
SphenicPaul Nov 15, 2020
2508434
Moved 'AzDevOpsApiDscResourceBaseExample' class declaration in 'GetRe…
SphenicPaul Nov 15, 2020
7a3c11f
Added 'using' reference to 'AzDevOpsApiDscResourceBase.psm1' in 'GetR…
SphenicPaul Nov 15, 2020
48c3637
Updated 'DscResourceBase' to throw exceptions within GetDscResourceKe…
SphenicPaul Nov 15, 2020
3f8b744
Updated 'GetResourceName.Tests.ps1' to update/correct test assertions.
SphenicPaul Nov 15, 2020
f9bd296
Corrected GetResourceName() method assertion in 'GetResourceName.Test…
SphenicPaul Nov 15, 2020
e4c04ba
Added additional tests in 'GetDscResourceKey.Test.ps1' to cover addit…
SphenicPaul Nov 15, 2020
bcd6568
Removed content from 'GetDscCurrentSateObject.Tests.ps1'
SphenicPaul Nov 15, 2020
f6ff297
Replaced use of 'Invoke-RestMethod' with 'Invoke-AzDevOpsApiRestMetho…
SphenicPaul Nov 16, 2020
8ab8d98
Updated 'Invoke-AzDevOpsApiRestMethod' to remove 'ApiUri' validation,…
SphenicPaul Nov 16, 2020
43f9a9c
Added GetDscCurrentStateObjectGetParameters() method and GetDscCurren…
SphenicPaul Nov 16, 2020
71f46b0
Added unit tests for GetDscCurrentStateObject() and GetDscCurrentStat…
SphenicPaul Nov 16, 2020
42c178a
Added unit tests for Set(), Test() and TestDesiredState() methods in …
SphenicPaul Nov 17, 2020
f549ca3
Added unit tests for SetToDesiredState() and GetPostSetWaitTimeMs() m…
SphenicPaul Nov 17, 2020
82f689f
Added GetPostSetWaitTimeMs() method to 'AzDevOpsDscResourceBase' class
SphenicPaul Nov 17, 2020
aa8b405
Corrected test names in 'TestDesiredState.Tests.ps1'
SphenicPaul Nov 17, 2020
bf26340
Added 'GetDscCurrentStateResourceObject()' tests for 'AzDevOpsDscReso…
SphenicPaul Nov 17, 2020
fdb4515
Added 'hqrmtest' back into 'build.yaml'
SphenicPaul Nov 17, 2020
aece9fc
Updated 'CONTRIBUTING.md' with 'Understanding the Module' information
SphenicPaul Nov 17, 2020
e432c82
Made further updates to 'CONTRIBUTING.md to include information on In…
SphenicPaul Nov 17, 2020
9f2908a
Corrected typo in 'Contributing.md'
SphenicPaul Nov 17, 2020
a4c3d2e
Added link to CONTRIBUTING.md in README.md
SphenicPaul Nov 17, 2020
8069f70
Updated/Corrected examples to reflect current functionality.
SphenicPaul Nov 18, 2020
7bb9060
Updated 'CHANGELOG.md' to include recent changes.
SphenicPaul Nov 18, 2020
0ef1d3f
Added 'RequiredAction' module reference to a few 'AzDevOpsDscResource…
SphenicPaul Nov 18, 2020
abcf13d
Added 'prefix.ps1' and 'suffix.ps1'
SphenicPaul Nov 19, 2020
cde80b8
Moved 'AzureDevOpsDsc.psm1' contents into 'prefix.ps1'
SphenicPaul Nov 19, 2020
30cde60
Moved declaration of 'Ensure' and 'RequiredAction' enums into 'prefix…
SphenicPaul Nov 19, 2020
afd9b72
Removed 'DSCResources' and 'DSCClassResources' directories and amende…
SphenicPaul Nov 19, 2020
1d242b5
Updated all test scripts for classes within the module to use the 'Az…
SphenicPaul Nov 19, 2020
3ed89dc
Minor reformatting of 'prefix.ps1' and 'suffix.ps1'
SphenicPaul Nov 19, 2020
a0fcbbf
Repointed broken link in 'AzDevOpsProject', 'README.md' file
SphenicPaul Nov 19, 2020
e987de1
Removed 'suffix.ps1'
SphenicPaul Nov 19, 2020
6478091
Updated casing in 'ForEach' and 'ForEach-Object' statements
SphenicPaul Nov 19, 2020
d70562e
Added 'AzureDevOpsDsc.strings.psd1'
SphenicPaul Nov 19, 2020
c413099
Removed non-required, '_README.md' file
SphenicPaul Nov 19, 2020
c224ead
Deleted more non-required, '(_)README.md' files.
SphenicPaul Nov 19, 2020
c9319e8
Removed import/export of 'AzureDevOpsDsc.Common', module functions fr…
SphenicPaul Nov 20, 2020
cd52eda
Moved 'AzureDevOpsDsc.strings.psd1'
SphenicPaul Nov 20, 2020
de1a56e
Added comment into 'AzureDevOpsDsc.psm1'
SphenicPaul Nov 20, 2020
68ad060
Updated 'moduleVersion' to '0.0.0'
SphenicPaul Nov 20, 2020
a7f5e27
Updated 'CHANGELOG.md' to update 'Unreleased' section
SphenicPaul Nov 20, 2020
713ff6c
Deleted 'Other' directory contents/readmes
SphenicPaul Nov 25, 2020
2a99960
Merge branch 'main' into feature-pjw-api-wrapper-and-project-resource
johlju Jan 24, 2021
6f57b46
Fix coverage threshold
johlju Jan 24, 2021
470676c
Updated 'CodeCoverageThreshold' to 40 in 'build.yml'
SphenicPaul Jan 24, 2021
85651d3
Merge branch 'feature-pjw-api-wrapper-and-project-resource' of https:…
SphenicPaul Jan 24, 2021
30a6a6a
Fix typo in build.ps1
johlju Jan 24, 2021
5774a41
Update CHANGELOG.md
johlju Jan 24, 2021
37d4d1d
Disable integraiton test
johlju Jan 24, 2021
c54137b
Add separate job for HQRM test
johlju Jan 24, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ output/
markdownissues.txt
node_modules
package-lock.json

CodeCoverage.JaCoCo.xml
7 changes: 6 additions & 1 deletion .markdownlint.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@
"MD029": {
"style": "one"
},
"MD013": true,
"MD013": {
"line_length": 80,
"headers": false,
"code_blocks":false,
"tables": false
},
"MD024": false,
"MD034": false,
"no-hard-tabs": true
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- AzureDevOpsDsc
- Updated pipeline files to support change of default branch to main.
- Added GitHub issue templates and pull request template ([issue #1](https://github.com/dsccommunity/AzureDevOpsDsc/issues/1))
- Added the `AzDevOpsProject`, DSC Resource
- AzureDevOpsDsc.Common
- Added 'wrapper' functionality around the [Azure DevOps REST API](https://docs.microsoft.com/en-us/rest/api/azure/devops/)
93 changes: 93 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,100 @@
# Contributing

## Getting Started

Please check out common DSC Community [contributing guidelines](https://dsccommunity.org/guidelines/contributing).

---

## Understanding the Module

The `AzureDevOpsDsc` module consists of a few key components:

* The Desired State Configuration (DSC) resources (to be used within DSC configurations).

* The nested, `AzureDevOpsDsc.Common` module, which itself, consists of the following
sets of functions/commands:

* `Api` - These are used as generic wrappers around the
Azure DevOps REST API), aimed to minimise duplication of functionality and
code across all `Resources`.

* `Connection` - These support connection to the Azure DevOps REST API.

* `Resources` - These invoke the `Api` functions/commands to
manage specific, Azure DevOps REST API resources (e.g. `Projects`).

* `Server` - These are specific to Azure DevOps
**Server** - the self-hosted, typically on-premise, edition of Azure DevOps.

* `Services` - These are specific to Azure DevOps
**Services** - the Microsoft, cloud-hosted, 'Software-as-a-Service' (SaaS)
solution.

The layout/structure of the module and it's resources/components is designed to:

* Rely on the consistency and structure of the Azure DevOps REST API
* Clearly scope and separate, distinct functionality and components
* Allow heavy re-use of generic, Azure DevOps REST API wrapper functionality
* Minimise the complexity of the DSC Resources themselves, in turn, aiming to:
* Reduce the amount of new functionality and effort required to add new, DSC Resources
* Increase the reliability and robustness of the DSC Resources
* Allow all the DSC Resources to be able to use independent, Personal Access Tokens
(PATs) to allow distinct PATs, with distinct privileges, to perform distinct
operations (as opposed to requiring a single PAT with excess privileges).

---

## Running the Tests

If want to know how to run this module's tests you can look at the [Testing Guidelines](https://dsccommunity.org/guidelines/testing-guidelines/#running-tests)

### Setup of **Remote**, Integration Tests

The Integration tests for this module, run as part of this build, require a
disposable instance of Azure DevOps Services that can be used for creating,
updating and deleting `Projects`, `Teams` and other resources within Azure DevOps.

>**IMPORTANT**: The build pipeline itself can run in a non-disposable Azure
>DevOps organization/collection, but ensure you **DO NOT** setup the following
>variables to point at that non-disposable organization/collection. Doing this
>could result in **loss of code/data/service** because the Integration Tests are
>creating and dropping resources within the organization/collection.

Two variables will need setting up in your Azure DevOps, pipeline:

* **`AzureDevOps.Integration.ApiUri`** - Which needs to contain the URI of your disposable,
AzureDevOps, organization API. For example, `https://dev.azure.com/yourDisposableOrganizationNameHere/_apis/`

* **`AzureDevOps.Integration.Pat`** - Which needs to contain the Personal Access
Token (PAT) to be used to connect to the disposable, Azure DevOps instance.

>**IMPORTANT**: Do not use a live/production/working, Azure DevOps Services/Server
>organization/collection in these variables - **This will likely result in data loss.**

### Setup of **Local**, Integration Tests

If you want to run the Integration Tests locally (i.e. on a workstation used for
development), the following actions need to be performed:

* Access/Use of the Local Configuration Manager (LCM) on the local workstation
requires Administrator permissions on the workstation. As a result, the session/
tool executing the Integration tests must be running with Administrator
privileges. Failure to do this will result in an error when the tests are
initiated.

* You need to set the following environment variables so the build will determine
it needs to execute the Integration tests, and it has the Personal Access Token
(PAT) and API URI

```Powershell
$env:CI = $true
$env:AZUREDEVOPSINTEGRATIONAPIURI = 'YourApiUriHere'
$env:AZUREDEVOPSINTEGRATIONPAT = 'YourPatHere'
```

>**Important**: It is not recommended to store any Personal Access Token (PAT)
>in plain text within a text file or script. Ensure no PAT token is added to
source control commits as part of changes made. These PATs would likely be
available within the public, commit history and could/would pose a security risk
to your Azure DevOps instance.
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# AzureDevOpsDsc

The **AzureDevOpsDsc** module contains DSC resources for deployment and configuration
of Azure DevOps and Azure DevOps Server.
The **AzureDevOpsDsc** module contains DSC Resources for deployment and
configuration of Azure DevOps and Azure DevOps Server.

[![Build Status](https://dev.azure.com/dsccommunity/AzureDevOpsDsc/_apis/build/status/dsccommunity.AzureDevOpsDsc?branchName=main)](https://dev.azure.com/dsccommunity/AzureDevOpsDsc/_build/latest?definitionId=41&branchName=main)
![Azure DevOps coverage (branch)](https://img.shields.io/azure-devops/coverage/dsccommunity/AzureDevOpsDsc/41/main)
Expand All @@ -24,19 +24,23 @@ full release to [PowerShell Gallery](https://www.powershellgallery.com/).

Please check out common DSC Community [contributing guidelines](https://dsccommunity.org/guidelines/contributing).

Additionally, please [`AzureDevOpsDsc` contribution guidelines](CONTRIBUTING.md)
for more information about contributing to this module (including an overview of
module structure, design and setup of Integration tests).

## Change log

A full list of changes in each version can be found in the [change log](CHANGELOG.md).

## Documentation

The documentation can be found in the [AzureDevOpsDsc Wiki](https://github.com/dsccommunity/AzureDevOpsDsc/wiki).
The DSC resources schema files is used to automatically update the
The DSC Resource`s schema files are used to automatically update the
documentation on each PR merge.

### Examples

You can review the [Examples](/source/Examples) directory in the AzureDevOpsDsc module
for some general use scenarios for all of the resources that are in the module.

The resource examples are also available in the [SqlServeDsc Wiki](https://github.com/dsccommunity/AzureDevOpsDsc/wiki).
The resource examples are also available in the [AzureDevOpsDsc Wiki](https://github.com/dsccommunity/AzureDevOpsDsc/wiki).
6 changes: 5 additions & 1 deletion RequiredModules.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

InvokeBuild = 'latest'
PSScriptAnalyzer = 'latest'
Pester = 'latest'
Pester = '4.10.1'
Plaster = 'latest'
ModuleBuilder = 'latest'
ChangelogManagement = 'latest'
Expand All @@ -20,4 +20,8 @@
'DscResource.AnalyzerRules' = 'latest'
xDscResourceDesigner = 'latest'
'DscResource.DocGenerator' = 'latest'
'DscResource.Common' = 'latest'

# Prerequisites modules needed for examples or integration tests
PSDscResources = '2.12.0.0'
}
137 changes: 113 additions & 24 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,36 @@ stages:
- stage: Test
dependsOn: Build
jobs:
- job: test_linux
displayName: 'Linux'
- job: Test_HQRM
displayName: 'HQRM'
pool:
vmImage: 'windows-2019'
timeoutInMinutes: 0
steps:
- task: DownloadBuildArtifacts@0
displayName: 'Download Build Artifact'
inputs:
buildType: 'current'
downloadType: 'single'
artifactName: 'output'
downloadPath: '$(Build.SourcesDirectory)'
- task: PowerShell@2
name: test
displayName: 'Run HQRM Test'
inputs:
filePath: './build.ps1'
arguments: '-Tasks hqrmtest'
pwsh: false
- task: PublishTestResults@2
displayName: 'Publish Test Results'
condition: succeededOrFailed()
inputs:
testResultsFormat: 'NUnit'
testResultsFiles: 'output/testResults/NUnit*.xml'
testRunTitle: 'HQRM'
- job: test_unit_linux
condition: succeededOrFailed()
displayName: 'Linux - Unit Tests'
timeoutInMinutes: 0
pool:
vmImage: 'ubuntu 16.04'
Expand All @@ -69,7 +97,7 @@ stages:

- task: PowerShell@2
name: test
displayName: 'Run Tests'
displayName: 'Run Unit Tests'
inputs:
filePath: './build.ps1'
arguments: '-tasks test'
Expand All @@ -80,7 +108,7 @@ stages:
inputs:
testResultsFormat: 'NUnit'
testResultsFiles: 'output/testResults/NUnit*.xml'
testRunTitle: 'Linux'
testRunTitle: 'Linux - Unit'

- task: PublishCodeCoverageResults@1
displayName: 'Publish Code Coverage'
Expand All @@ -90,8 +118,9 @@ stages:
summaryFileLocation: 'output/testResults/CodeCov*.xml'
pathToSources: '$(Build.SourcesDirectory)/output/$(dscBuildVariable.RepositoryName)'

- job: test_windows_core
displayName: 'Windows (PowerShell Core)'
- job: test_unit_windows_core
condition: succeededOrFailed()
displayName: 'Windows (PowerShell Core) - Unit Tests'
timeoutInMinutes: 0
pool:
vmImage: 'windows-2019'
Expand All @@ -113,7 +142,7 @@ stages:

- task: PowerShell@2
name: test
displayName: 'Run Tests'
displayName: 'Run Unit Tests'
inputs:
filePath: './build.ps1'
arguments: '-tasks test'
Expand All @@ -125,7 +154,7 @@ stages:
inputs:
testResultsFormat: 'NUnit'
testResultsFiles: 'output/testResults/NUnit*.xml'
testRunTitle: 'Windows Server Core (PowerShell Core)'
testRunTitle: 'Windows Server Core (PowerShell Core) - Unit'

- task: PublishCodeCoverageResults@1
displayName: 'Publish Code Coverage'
Expand All @@ -135,8 +164,65 @@ stages:
summaryFileLocation: 'output/testResults/CodeCov*.xml'
pathToSources: '$(Build.SourcesDirectory)/output/$(dscBuildVariable.RepositoryName)'

- job: test_windows_ps
displayName: 'Windows (Windows PowerShell)'
- job: test_integration_windows_core
displayName: 'Windows (PowerShell Core) - Integration Tests'
timeoutInMinutes: 0
variables:
# This sets environment variable $env:CI.
CI: true
# This sets environment variable $env:CONFIGURATION.
configuration: Integration
pool:
vmImage: 'windows-2019'
steps:
- task: DownloadBuildArtifacts@0
displayName: 'Download Build Artifact'
inputs:
buildType: 'current'
downloadType: 'single'
artifactName: 'output'
downloadPath: '$(Build.SourcesDirectory)'

- task: PowerShell@2
name: configureWinRM
displayName: 'Configure WinRM'
inputs:
targetType: 'inline'
script: 'winrm quickconfig -quiet'
pwsh: false

# TODO: Current disabled due to integration tests throws the exception:
# "Cannot validate argument on parameter 'Pat'. The " Test-AzDevOpsPat -Pat $_ -IsValid " validation script for the argument with value "$(AzureDevOps.Integration.Pat)" did not return a result of True. Determine why the validation script failed, and then try the command again."

# - powershell: |
# ./build.ps1 -Tasks test -CodeCoverageThreshold 0 -PesterScript @(
# 'tests/Integration/'
# )
# name: test
# displayName: 'Run Integration Tests'
# env:
# azureDevOpsIntegrationApiUri: $(AzureDevOps.Integration.ApiUri)
# azureDevOpsIntegrationPat: $(AzureDevOps.Integration.Pat)

# - task: PublishTestResults@2
# displayName: 'Publish Test Results'
# condition: succeededOrFailed()
# inputs:
# testResultsFormat: 'NUnit'
# testResultsFiles: 'output/testResults/NUnit*.xml'
# testRunTitle: 'Windows Server Core (PowerShell Core) - Integration'

# - task: PublishCodeCoverageResults@1
# displayName: 'Publish Code Coverage'
# condition: succeededOrFailed()
# inputs:
# codeCoverageTool: 'JaCoCo'
# summaryFileLocation: 'output/testResults/CodeCov*.xml'
# pathToSources: '$(Build.SourcesDirectory)/output/$(dscBuildVariable.RepositoryName)'

- job: test_unit_windows_ps
condition: succeededOrFailed()
displayName: 'Windows (Windows PowerShell) - Unit Tests'
timeoutInMinutes: 0
pool:
vmImage: 'windows-2019'
Expand All @@ -158,10 +244,10 @@ stages:

- task: PowerShell@2
name: test
displayName: 'Run Tests'
displayName: 'Run Unit Tests'
inputs:
filePath: './build.ps1'
arguments: '-tasks test'
arguments: '-tasks test -CodeCoverageThreshold 0' # See note below regarding 'CoderCoverage'
pwsh: false

- task: PublishTestResults@2
Expand All @@ -170,18 +256,21 @@ stages:
inputs:
testResultsFormat: 'NUnit'
testResultsFiles: 'output/testResults/NUnit*.xml'
testRunTitle: 'Windows Server Core (Windows PowerShell)'
testRunTitle: 'Windows Server Core (Windows PowerShell) - Unit'

- task: PublishCodeCoverageResults@1
displayName: 'Publish Code Coverage'
condition: succeededOrFailed()
inputs:
codeCoverageTool: 'JaCoCo'
summaryFileLocation: 'output/testResults/CodeCov*.xml'
pathToSources: '$(Build.SourcesDirectory)/output/$(dscBuildVariable.RepositoryName)'
# NOTE: CodeCoverage disabled on this, specific job due to poor performance. Still runs on other jobs within build.
# See: https://github.com/pester/Pester/issues/1318
#- task: PublishCodeCoverageResults@1
# displayName: 'Publish Code Coverage'
# condition: succeededOrFailed()
# inputs:
# codeCoverageTool: 'JaCoCo'
# summaryFileLocation: 'output/testResults/CodeCov*.xml'
# pathToSources: '$(Build.SourcesDirectory)/output/$(dscBuildVariable.RepositoryName)'

- job: test_macos
displayName: 'macOS'
- job: test_unit_macos
condition: succeededOrFailed()
displayName: 'macOS - Unit Tests'
timeoutInMinutes: 0
pool:
vmImage: 'macos-latest'
Expand All @@ -203,7 +292,7 @@ stages:

- task: PowerShell@2
name: test
displayName: 'Run Tests'
displayName: 'Run Unit Tests'
inputs:
filePath: './build.ps1'
arguments: '-tasks test'
Expand All @@ -215,7 +304,7 @@ stages:
inputs:
testResultsFormat: 'NUnit'
testResultsFiles: 'output/testResults/NUnit*.xml'
testRunTitle: 'MacOS'
testRunTitle: 'MacOS - Unit'

- task: PublishCodeCoverageResults@1
displayName: 'Publish Code Coverage'
Expand Down
Loading