Skip to content

Commit

Permalink
Updated pipeline files to support change of master to main (#1663)
Browse files Browse the repository at this point in the history
  • Loading branch information
johlju authored Jan 8, 2021
1 parent be1f7ce commit cb1917a
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 17 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed

- SqlServerDsc
- Renamed `master` branch to `main` ([issue #1660](https://github.com/dsccommunity/SqlServerDsc/issues/1660)).
- The module manifest property `DscResourcesToExport` now updates automatically
using the pipeline.
- Removed `Export-ModuleMember` from DSC resource that still had it.
Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ Read more about this in the [localization style guideline](https://dsccommunity.
Helper functions or wrapper functions that are used only by the resource can
preferably be placed in the resource module file. If the functions are of a
type that could be used by more than one resource, then the functions can also
be placed in the common module [SqlServerDsc.Common](https://github.com/dsccommunity/SqlServerDsc/blob/master/source/Modules/SqlServerDsc.Common)
be placed in the common module [SqlServerDsc.Common](https://github.com/dsccommunity/SqlServerDsc/blob/main/source/Modules/SqlServerDsc.Common)
module file.

If a helper function can be used by more than one DSC module it is preferably
Expand All @@ -220,7 +220,7 @@ If want to know how to run this module's tests you can look at the [Testing Guid

#### Using SMO stub classes

There are [stub classes](https://github.com/PowerShell/SqlServerDsc/blob/master/Tests/Unit/Stubs/SMO.cs)
There are [stub classes](https://github.com/PowerShell/SqlServerDsc/blob/main/Tests/Unit/Stubs/SMO.cs)
for the SMO classes which can be used and improved on when creating tests where
SMO classes are used in the code being tested.

Expand All @@ -231,7 +231,7 @@ the CI.

There are also configuration made by existing integration tests that can be reused
to write integration tests for other resources. This is documented in
[Integration tests for SqlServerDsc](https://github.com/PowerShell/SqlServerDsc/blob/master/Tests/Integration/README.md).
[Integration tests for SqlServerDsc](https://github.com/PowerShell/SqlServerDsc/blob/main/Tests/Integration/README.md).

Since integration tests must run in order because they are dependent on each
other to some degree. Most resource are dependent on that integration tests
Expand Down
5 changes: 3 additions & 2 deletions GitVersion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,19 @@ assembly-informational-format: '{NuGetVersionV2}+Sha.{Sha}.Date.{CommitDate}'
branches:
master:
tag: preview
regex: ^main$
pull-request:
tag: PR
feature:
tag: useBranchName
increment: Minor
regex: f(eature(s)?)?[\/-]
source-branches: ['master']
source-branches: ['main']
hotfix:
tag: fix
increment: Patch
regex: (hot)?fix(es)?[\/-]
source-branches: ['master']
source-branches: ['main']

ignore:
sha: []
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
The **SqlServerDsc** module contains DSC resources for deployment and
configuration of Microsoft SQL Server.

[![Build Status](https://dev.azure.com/dsccommunity/SqlServerDsc/_apis/build/status/dsccommunity.SqlServerDsc?branchName=master)](https://dev.azure.com/dsccommunity/SqlServerDsc/_build/latest?definitionId=11&branchName=master)
![Azure DevOps coverage (branch)](https://img.shields.io/azure-devops/coverage/dsccommunity/SqlServerDsc/11/master)
[![Azure DevOps tests](https://img.shields.io/azure-devops/tests/dsccommunity/SqlServerDsc/11/master)](https://dsccommunity.visualstudio.com/SqlServerDsc/_test/analytics?definitionId=11&contextType=build)
[![Build Status](https://dev.azure.com/dsccommunity/SqlServerDsc/_apis/build/status/dsccommunity.SqlServerDsc?branchName=main)](https://dev.azure.com/dsccommunity/SqlServerDsc/_build/latest?definitionId=11&branchName=main)
![Azure DevOps coverage (branch)](https://img.shields.io/azure-devops/coverage/dsccommunity/SqlServerDsc/11/main)
[![Azure DevOps tests](https://img.shields.io/azure-devops/tests/dsccommunity/SqlServerDsc/11/main)](https://dsccommunity.visualstudio.com/SqlServerDsc/_test/analytics?definitionId=11&contextType=build)
[![PowerShell Gallery (with prereleases)](https://img.shields.io/powershellgallery/vpre/SqlServerDsc?label=SqlServerDsc%20Preview)](https://www.powershellgallery.com/packages/SqlServerDsc/)
[![PowerShell Gallery](https://img.shields.io/powershellgallery/v/SqlServerDsc?label=SqlServerDsc)](https://www.powershellgallery.com/packages/SqlServerDsc/)

Expand All @@ -15,15 +15,15 @@ This project has adopted this [Code of Conduct](CODE_OF_CONDUCT.md).

## Releases

For each merge to the branch `master` a preview release will be
For each merge to the branch `main` a preview release will be
deployed to [PowerShell Gallery](https://www.powershellgallery.com/).
Periodically a release version tag will be pushed which will deploy a
full release to [PowerShell Gallery](https://www.powershellgallery.com/).

## Contributing

Please check out common DSC Community [contributing guidelines](https://dsccommunity.org/guidelines/contributing)
and the specific [Contributing to SqlServerDsc](https://github.com/dsccommunity/SqlServerDsc/blob/master/CONTRIBUTING.md)
and the specific [Contributing to SqlServerDsc](https://github.com/dsccommunity/SqlServerDsc/blob/main/CONTRIBUTING.md)
guidelines.

## Change log
Expand Down
8 changes: 6 additions & 2 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
trigger:
branches:
include:
- master
- main
paths:
include:
- source/*
Expand Down Expand Up @@ -293,7 +293,7 @@ stages:
and(
succeeded(),
or(
eq(variables['Build.SourceBranch'], 'refs/heads/master'),
eq(variables['Build.SourceBranch'], 'refs/heads/main'),
startsWith(variables['Build.SourceBranch'], 'refs/tags/')
),
contains(variables['System.TeamFoundationCollectionUri'], 'dsccommunity')
Expand Down Expand Up @@ -321,6 +321,8 @@ stages:
env:
GitHubToken: $(GitHubToken)
GalleryApiToken: $(GalleryApiToken)
ReleaseBranch: main
MainGitBranch: main
- task: PowerShell@2
name: sendChangelogPR
displayName: 'Send Changelog PR'
Expand All @@ -330,3 +332,5 @@ stages:
pwsh: true
env:
GitHubToken: $(GitHubToken)
ReleaseBranch: main
MainGitBranch: main
1 change: 1 addition & 0 deletions build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ DscTest:
- DSCResources/MSFT_SqlDatabaseOwner
- DSCResources/MSFT_SqlDatabaseRecoveryModel
- DSCResources/MSFT_SqlServerEndpointState
MainGitBranch: main

####################################################
# PSDepend Configuration #
Expand Down
4 changes: 2 additions & 2 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
codecov:
require_ci_to_pass: no
# master should be the baseline for reporting
branch: master
# main should be the baseline for reporting
branch: main

comment:
layout: "reach, diff, flags, files"
Expand Down
2 changes: 1 addition & 1 deletion source/SqlServerDsc.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
Tags = @('DesiredStateConfiguration', 'DSC', 'DSCResourceKit', 'DSCResource')

# A URL to the license for this module.
LicenseUri = 'https://github.com/dsccommunity/SqlServerDsc/blob/master/LICENSE'
LicenseUri = 'https://github.com/dsccommunity/SqlServerDsc/blob/main/LICENSE'

# A URL to the main website for this project.
ProjectUri = 'https://github.com/dsccommunity/SqlServerDsc'
Expand Down
2 changes: 1 addition & 1 deletion source/WikiSource/CredentialOverview.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ please submit a [new issue](https://github.com/dsccommunity/SqlServerDsc/issues/
Then the community can work together to support (g)MSAs for that DSC resource
too.

For designing a resource for (g)MSAs see the section [Group Managed Service Account](https://github.com/dsccommunity/SqlServerDsc/blob/master/CONTRIBUTING.md#group-managed-service-account)
For designing a resource for (g)MSAs see the section [Group Managed Service Account](https://github.com/dsccommunity/SqlServerDsc/blob/main/CONTRIBUTING.md#group-managed-service-account)
in the contribution guidelines.

<sup>_This was discussed in [issue #738](https://github.com/dsccommunity/SqlServerDsc/issues/738)_.</sup>
Expand Down
2 changes: 1 addition & 1 deletion source/WikiSource/Home.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,4 @@ _SQLPS_ that is installed with SQL Server.

## Change log

A full list of changes in each version can be found in the [change log](https://github.com/dsccommunity/SqlServerDsc/blob/master/CHANGELOG.md).
A full list of changes in each version can be found in the [change log](https://github.com/dsccommunity/SqlServerDsc/blob/main/CHANGELOG.md).

0 comments on commit cb1917a

Please sign in to comment.