Skip to content

ZanattaMichael/AzureDevOpsDsc

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

638 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AzureDevOpsDsc

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

Build Status Azure DevOps coverage (branch) Azure DevOps tests codecov PowerShell Gallery (with prereleases) PowerShell Gallery

Code of Conduct

This project has adopted this Code of Conduct.

Usage

Please review the following Usage Documentation

Releases

For each merge to the branch main a preview release will be deployed to PowerShell Gallery. Periodically a release version tag will be pushed which will deploy a full release to PowerShell Gallery.

Contributing

Please check out common DSC Community contributing guidelines.

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

Testing

This module is tested with Pester 5. Tests live under tests/ and are split into:

  • Unit tests (tests/Unit) — fast, no external dependencies.
  • Integration tests (tests/Integration) — run against a live Azure DevOps organization and require authentication.

Test tags

Every Describe block is tagged with a type tag and a service tag:

  • Type tagUnit or Integration.
  • Service tag — the resource/service the test covers (for example ArtifactFeed, Project, GitPermission). The same service tag is applied to a service's unit and integration tests, so one tag selects both.

Some unit tests also keep an additional category tag (API, Cache, ACL, Helper, Authentication).

Invoke-Pester -Tag Unit            # all unit tests
Invoke-Pester -Tag Integration     # all integration tests
Invoke-Pester -Tag ArtifactFeed    # unit + integration for one service
Invoke-Pester -Tag Unit, API       # unit tests for the private API functions

Running the unit tests

# Build the module first so the compiled module and classes are available.
./build.ps1 -Tasks build

Invoke-Pester -Path ./tests/Unit -Tag Unit

Running the integration tests

Integration tests create and tear down real Azure DevOps resources, so they run through a test framework that handles authentication, setup and teardown. Set the cache directory, then invoke the framework:

$env:AZDODSC_CACHE_DIRECTORY = '<path-to-a-writable-cache-folder>'

Set-Location ./tests/Integration
. ./Invoke-Tests.ps1 -TestFrameworkConfigurationPath ./TestFrameworkConfiguration.json

To iterate on a subset (specific files and/or Context blocks) without running the whole suite, use the targeted runner:

. ./Invoke-TargetedTests.ps1 `
    -TestFrameworkConfigurationPath ./TestFrameworkConfiguration.json `
    -TestFile AzDoArtifactFeed `
    -FullName '*Creating*'

See tests/README.md for the full tag taxonomy and more detail.

Change log

A full list of changes in each version can be found in the change log.

Resources

Each resource links to its example/usage documentation.

Projects, organization, groups and teams

Resource Description
AzDoProject Creates and manages Azure DevOps projects.
AzDoProjectServices Enables or disables services (Repos, Boards, Pipelines, Test Plans, Artifacts) within a project.
AzDoOrganizationSettings Manages organization-level settings.
AzDoProjectGroup Creates and manages groups within a project.
AzDoOrganizationGroup Creates and manages groups at the organization level.
AzDoGroupMember Manages membership of users, groups and service principals in a group.
AzDoTeam Creates and manages teams within a project.
AzDoTeamMember Manages membership of a team.
AzDoTeamSettings Configures a team's iteration/area paths, working days and bug behaviour.
AzDoUserEntitlement Adds/removes organization users and manages their access level (license).

Repositories and policies

Resource Description
AzDoGitRepository Creates and manages Git repositories within a project.
AzDoRepositorySettings Manages Git repository settings.
AzDoBranchPolicy Manages branch policies (e.g. minimum reviewer count) on a repository.

Permissions

Resource Description
AzDoProjectPermission Manages project-level permissions for identities.
AzDoGitPermission Manages fine-grained Git repository permissions for identities.
AzDoAreaPermission Manages area path (classification node) permissions.
AzDoIterationPermission Manages iteration path (classification node) permissions.
AzDoAgentPoolPermission Manages agent pool permissions.
AzDoEnvironmentPermission Manages pipeline environment permissions.
AzDoPipelinePermission Manages build/pipeline permissions.
AzDoServiceConnectionPermission Manages service connection (endpoint) permissions.
AzDoVariableGroupPermission Manages variable group (library) permissions.
AzDoArtifactFeedPermission Manages artifact feed permissions.
AzDoSecurityNamespacePermission Manages permissions for an arbitrary security namespace and token.
AzDoProcessPermission Manages Process security namespace permissions, e.g. who can create inherited (child) processes.
AzDoGroupPermission (Not currently supported) Manages group-level identity permissions.

Pipelines, environments and agents

Resource Description
AzDoPipeline Creates and manages YAML pipeline definitions.
AzDoPipelineEnvironment Creates and manages pipeline environments.
AzDoEnvironmentApproval Manages approval checks on a pipeline environment.
AzDoCheckConfiguration Manages pipeline checks (e.g. Approval) on a protected resource.
AzDoDeploymentGroup Creates and manages deployment groups.
AzDoAgentPool Creates and manages organization agent pools.
AzDoAgentQueue Creates and manages project agent queues.
AzDoTaskGroup Creates and manages task groups.
AzDoVariableGroup Creates and manages variable groups (library).
AzDoServiceConnection Creates and manages service connections (service endpoints).
AzDoPipelineSettings Manages a project's pipeline general settings (job auth scope, settable variables, etc.).

Boards and work items

Resource Description
AzDoAreaNodes Manages area path classification nodes.
AzDoIterationNodes Manages iteration path classification nodes.
AzDoWIPTags Manages work item tags.
AzDoProcess Creates and manages inherited processes (process templates).
AzDoNotificationSubscription Manages notification subscriptions.

Artifacts, wiki, extensions and auditing

Resource Description
AzDoArtifactFeed Creates and manages artifact feeds.
AzDoArtifactFeedSettings Configures feed upstream sources, deleted-version hiding and retention policy.
AzDoArtifactFeedView Creates and manages feed views (e.g. @Release).
AzDoWiki Creates and manages project and code wikis.
AzDoExtension Installs and uninstalls organization extensions.
AzDoAuditStream Manages audit log streaming.
AzDoServiceHook Creates and manages service hook subscriptions (e.g. webhooks).

Documentation

The documentation can be found in the AzureDevOpsDsc Wiki. The DSC Resource`s schema files are used to automatically update the documentation on each PR merge.

Examples

You can review the 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 AzureDevOpsDsc Wiki.

About

This module contains DSC resources for deployment and configuration of initially Azure DevOps Services and later Azure DevOps Server.

Resources

License

Code of conduct

Contributing

Stars

1 star

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • PowerShell 100.0%