Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
14 changes: 6 additions & 8 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@

After the description, please concisely list the changes as per keepachangelog.com
This **should** duplicate what you've updated in the changelog file.

for example:

### Added
- for new features [closes #15]
Expand Down Expand Up @@ -51,13 +53,9 @@

- [ ] The PR represents a single logical change. i.e. Cosmetic updates should go in different PRs.
- [ ] Added an entry under the Unreleased section of in the CHANGELOG.md as per [format](https://keepachangelog.com/en/1.0.0/).
- [ ] Local clean build passes without issue or fail tests (`build.ps1 -ResolveDependency`).
- [ ] Resource documentation added/updated in README.md.
- [ ] Resource parameter descriptions added/updated in README.md, schema.mof
and comment-based help.
- [ ] Local clean build passes without issue or fail tests (`build.ps1 -ResolveDependency -Tasks build, test`).
- [ ] Comment-based help added/updated.
- [ ] Localization strings added/updated in all localization files as appropriate.
- [ ] Examples appropriately added/updated.
- [ ] Unit tests added/updated. See [DSC Resource Testing Guidelines](https://github.com/PowerShell/DscResources/blob/master/TestsGuidelines.md).
- [ ] Integration tests added/updated (where possible). See [DSC Resource Testing Guidelines](https://github.com/PowerShell/DscResources/blob/master/TestsGuidelines.md).
- [ ] New/changed code adheres to [DSC Resource Style Guidelines](https://github.com/PowerShell/DscResources/blob/master/StyleGuidelines.md) and [Best Practices](https://github.com/PowerShell/DscResources/blob/master/BestPractices.md).
- [ ] Unit tests added/updated..
- [ ] Integration tests added/updated (where possible).
- [ ] Documentation added/updated (where applicable).
82 changes: 82 additions & 0 deletions .github/workflows/deploy-module.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
on:
push:
branches:
- main
paths-ignore:
- CHANGELOG.md
- .vscode/**
- .github/**
- images/**
- tests/**
- '**.md'
- '**.yml'
tags:
- '**'
- '!*preview*'
env:
buildFolderName: output
buildArtifactName: output


name: Deploy Module
# This workflow is triggered on push to the main branch and deploys the module to the PowerShell Gallery and creates a GitHub Release.
jobs:
Build_Stage_Package_Module:
name: Package Module
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }} # checkout the correct branch name
fetch-depth: 0
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v0.9.15
with:
versionSpec: 5.x
- name: Evaluate Next Version
uses: gittools/actions/gitversion/execute@v0.9.15
with:
configFilePath: GitVersion.yml
- name: Build & Package Module
shell: pwsh
run: ./build.ps1 -ResolveDependency -tasks pack
env:
ModuleVersion: ${{ env.gitVersion.MajorMinorPatch }}
- name: Publish Build Artifact
uses: actions/upload-artifact@v4
with:
name: ${{ env.buildArtifactName }}
path: ${{ env.buildFolderName }}/

Deploy_Stage_Deploy_Module:
name: Deploy Module
runs-on: ubuntu-latest
needs:
- Build_Stage_Package_Module
if: ${{ success() && (github.ref == 'refs/heads/develop' || startsWith(github.ref, 'refs/tags/')) }}
steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }} # checkout the correct branch name
fetch-depth: 0
- name: Download Build Artifact
uses: actions/download-artifact@v4
with:
name: ${{ env.buildArtifactName }}
path: ${{ env.buildFolderName }}
- name: Publish Release
shell: pwsh
run: ./build.ps1 -tasks publish
env:
GitHubToken: ${{ secrets.GitHubToken }}
GalleryApiToken: ${{ secrets.GalleryApiToken }}
- name: Send Changelog PR
shell: pwsh
run: ./build.ps1 -tasks Create_ChangeLog_GitHub_PR
env:
GitHubToken: ${{ secrets.GitHubToken }}
GalleryApiToken: ${{ secrets.GalleryApiToken }}
ReleaseBranch: main
MainGitBranch: main
2 changes: 1 addition & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ on:
pull_request:
branches:
- main
- sampler # temporary branch for testing
- develop
paths-ignore:
- CHANGELOG.md
name: Build and Test Module for Pull Request
env:
buildFolderName: output
buildArtifactName: output
Expand Down
50 changes: 49 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,55 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- Introduced new PowerShell functions for managing Fabric workspaces, recovery points, configurations, tenant settings, and workspace identities.
- Added unit tests for key functions, including `Get-FabricAPIclusterURI` and `Get-FabricCapacityTenantOverrides`.
- Added standard tests for each function and enhanced Help tests to filter by exported commands.
- Added OutputType attributes to several functions for improved type safety.
- Added support for WhatIf and Confirm parameters to update and revoke functions.
- Added Contributor Covenant Code of Conduct and enhanced contributing guidelines.
- Added commit message guidelines for contributors using GitHub Copilot.

### Changed

- Refactored `Get-FabricAPIClusterURI` to use `Invoke-FabricRestApi` for improved consistency.
- Updated validation pattern for `WorkspaceName` to allow additional special characters, then removed the pattern for greater flexibility.
- Improved documentation for many functions, especially around parameters like `WorkspaceId`.
- Refactored multiple functions for clarity, consistency, and maintainability.
- Enhanced error handling and confirmation prompts (ShouldProcess) for potentially destructive actions.
- Updated module manifest and build/test workflows for better automation and deployment.
- Improved code formatting using the dbatools formatter.

### Fixed

- Fixed issues with `New-FabricDataPipeline` and its call to `Invoke-FabricAPIRequest`.
- Fixed capital letter handling in test automation.
- Fixed ResourceUrl for token retrieval in `Connect-FabricAccount`.
- Fixed bugs in `New-FabricEventhouse` and improved ShouldProcess logic.
- Fixed parameter naming and example formatting in several functions.

### Deprecated

- None.

### Removed

- Removed unnecessary or duplicate functions (e.g., `Get-AllFabricDatasetRefreshes`, `Get-AllFabricCapacities`).
- Removed obsolete scripts and commented-out configuration paths.

### Security

- None.

---

**Contributors:**
Rob Sewell, Jess Pomfret, Ioana Bouariu, Frank Geisler, Kamil Nowinski, and others.

**Note:**
For a full list of changes and details, please see the commit history.

### Added

- For new features.

### Changed
Expand All @@ -28,4 +77,3 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Security

- In case of vulnerabilities.

18 changes: 17 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,23 @@ The workflow for using this and developing the code is shown below.
./build.ps1 -Tasks build,test
```

8. Once you are happy with your code, push your branch to GitHub and create a PR against the repo.
8. Once you are ready to submit your changes for review please ensure that you update the `CHANGELOG.md` file with a summary of your changes. This is important as it helps us keep track of what has changed in the module and makes it easier for users to see what has been added or changed.

You can use the [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) format for this.

Please add your changes under the `Unreleased` section and then create a new section for the next release. PLease use human readable titles for the changes, such as `Added`, `Changed`, `Fixed`, `Deprecated`, `Removed`, and `Security`.
For example:

```markdown
## [Unreleased]
### Added
- Added new function to manage Fabric workspaces.
### Changed
- Updated documentation for `Get-FabricAPIClusterURI`.
### Fixed
- Fixed issue with `New-FabricDataPipeline` not working correctly.
```
9. Once you are happy with your code and you have updated the changelog, push your branch to GitHub and create a PR against the repo.

## Thanks!

Expand Down
26 changes: 16 additions & 10 deletions build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,11 @@ BuildWorkflow:
#- Merge_CodeCoverage_Files

publish:
- Create_Release_Git_Tag
- Publish_Release_To_GitHub # Runs first, if token is expired it will fail early
# - Publish_GitHub_Wiki_Content

- publish_module_to_gallery
- Create_Changelog_Branch

####################################################
# PESTER Configuration #
Expand Down Expand Up @@ -120,15 +121,6 @@ Pester:
#CodeCoverageFilePattern: JaCoCo_Merge.xml # the pattern used to search all pipeline test job artifacts
#CodeCoverageMergedOutputFile: JaCoCo_coverage.xml # the file that is created for the merged code coverage

DscTest:
ExcludeTag:
- "Common Tests - New Error-Level Script Analyzer Rules"
Tag:
ExcludeSourceFile:
- output
ExcludeModuleFile:
- Modules/DscResource.Common
# - Templates

# Import ModuleBuilder tasks from a specific PowerShell module using the build
# task's alias. Wildcard * can be used to specify all tasks that has a similar
Expand All @@ -152,3 +144,17 @@ TaskHeader: |
Write-Build DarkGray " $Path"
Write-Build DarkGray " $($Task.InvocationInfo.ScriptName):$($Task.InvocationInfo.ScriptLineNumber)"
""
####################################################
# Changelog Configuration #
####################################################
ChangelogConfig:
FilesToAdd:
- 'CHANGELOG.md'
UpdateChangelogOnPrerelease: false

####################################################
# Git Configuration #
####################################################
GitConfig:
UserName: Automation Bot
UserEmail: automation_bot@fabrictools.io