Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
8a198e5
Huge PR for Sampler, Pester and some best practices
SQLDBAWithABeard May 20, 2025
82a3551
so that we can deploy preview versions to the powershell gallery
SQLDBAWithABeard May 22, 2025
35a4118
to see if we can deploy
SQLDBAWithABeard May 22, 2025
e0f93e9
so that we can deploy except when the files in root are changed
SQLDBAWithABeard May 22, 2025
3445327
so that we can deploy except when the files in root are changed and u…
SQLDBAWithABeard May 22, 2025
04ff9bf
so that the module manifest has the correct details
SQLDBAWithABeard May 22, 2025
78a0fb7
so that we build with the required az.accounts version
SQLDBAWithABeard May 22, 2025
3040ca7
so that the other required modules are at the versions as well!
SQLDBAWithABeard May 22, 2025
1bcf1de
so that it will run the publish for the develop branch
SQLDBAWithABeard May 22, 2025
cfc214c
so that we can deploy from the develop branch
SQLDBAWithABeard May 22, 2025
3bb895d
because we no longer need verbose output here
SQLDBAWithABeard May 22, 2025
d771488
because we dont need to publish wiki content
SQLDBAWithABeard May 22, 2025
a17ad47
Fix ResourceUrl for Token Retrieval in Connect-FabricAccount (#51)
Jojobit May 23, 2025
cedf3c0
Because YAML is hard and indentations hate me
SQLDBAWithABeard May 23, 2025
b877479
fix capital letters to test automation (#53)
jpomfret May 23, 2025
2036b29
Update New-WorkspaceName Modified the validation pattern for the Work…
Jojobit May 23, 2025
4c6c0e2
Remove WorkspaceName validation pattern.This change simplifies the va…
Jojobit May 26, 2025
bc9b596
Merge pull request #58 from dataplat/bugworkspacename
jpomfret May 26, 2025
5d6d866
Update Changelog for New Features and Improvements
SQLDBAWithABeard May 26, 2025
f66fd88
Update CONTRIBUTING.md to enhance changelog guidance
SQLDBAWithABeard May 26, 2025
bce4bef
Remove sampler branch from pull request workflow for Pester Help Tests
SQLDBAWithABeard May 26, 2025
dfd3f78
Update Pull Request Template for Clarity and Consistency closes #52
SQLDBAWithABeard May 26, 2025
0ac280c
Remove duplicate Unreleased section from Changelog
SQLDBAWithABeard May 26, 2025
3f0fb33
Add GitHub Actions workflow for module deployment
SQLDBAWithABeard May 26, 2025
3e5a051
Merge pull request #62 from dataplat/feature/changelog
jpomfret May 26, 2025
e806c15
Add ReleaseBranch and MainGitBranch to workflow
SQLDBAWithABeard May 26, 2025
a3a3a52
Merge pull request #63 from dataplat/feature/changelog
jpomfret May 26, 2025
84d1c80
Update module manifest author and generation date
SQLDBAWithABeard May 26, 2025
30a4f99
Update module manifest author and generation date (#65)
SQLDBAWithABeard May 26, 2025
4236724
Update comment for RequiredAssemblies section
SQLDBAWithABeard May 26, 2025
3cb37f2
Add permissions for GitHub Actions workflow
SQLDBAWithABeard May 26, 2025
4d95898
Merge pull request #67 from dataplat/feature/changelog
jpomfret May 26, 2025
29e12ea
Today Rob will mainly be creating PRs for deployments so that Jess ca…
SQLDBAWithABeard May 26, 2025
e103f2f
we wont tag (#69)
SQLDBAWithABeard May 26, 2025
137f301
we wont create change release branch (#70)
SQLDBAWithABeard May 26, 2025
8987eac
Merge branch 'main' into develop
SQLDBAWithABeard May 26, 2025
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
16 changes: 8 additions & 8 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,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]
### Changed
Expand Down Expand Up @@ -51,13 +53,11 @@

- [ ] 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).
ed 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).

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
77 changes: 77 additions & 0 deletions .github/workflows/deploy-preview-module.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
on:
push:
branches:
- develop
paths-ignore:
- CHANGELOG.md
- .vscode/**
- .github/**
- images/**
- tests/**
- '**.md'
- '**.yml'
tags:
- '**'
- '!*preview*'
env:
buildFolderName: output
buildArtifactName: output
testResultFolderName: testResults

name: Deploy Preview Module

# This workflow is triggered on push to the develop branch and deploys the module to the PowerShell Gallery as a preview version.
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.NuGetVersionV2 }}
- 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 }}
ReleaseBranch: develop
MainGitBranch: develop
31 changes: 0 additions & 31 deletions .github/workflows/gallery.yml

This file was deleted.

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
43 changes: 37 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,54 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- For new features.
- 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

- For changes in existing functionality.
- 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

- For soon-to-be removed features.
- None.

### Removed

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

### Fixed
### Security

- For any bug fix.
- 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

### Security

Expand Down
19 changes: 17 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,23 @@ The workflow for using this and developing the code is shown below.
```PowerShell
./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
6 changes: 3 additions & 3 deletions RequiredModules.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
'Sampler.GitHubTasks' = 'latest'
MarkdownLinkCheck = 'latest'
PSFramework = 'latest'
'Az.Accounts' = 'latest'
'Az.Resources' = 'latest'
'MicrosoftPowerBIMgmt' = 'latest'
'Az.Accounts' = '4.2.0'
'Az.Resources' = '6.15.1'
'MicrosoftPowerBIMgmt' = '1.2.1111'
}
30 changes: 18 additions & 12 deletions build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,10 @@ BuildWorkflow:

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

# - Publish_GitHub_Wiki_Content
- publish_module_to_gallery
# - Create_Changelog_Branch


####################################################
# PESTER Configuration #
Expand Down Expand Up @@ -120,16 +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
# prefix and or suffix. The module contain the task must be added as a required
Expand All @@ -152,3 +143,18 @@ 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

Loading
Loading