Skip to content

Commit

Permalink
update module and readme to conform with recent changes to master
Browse files Browse the repository at this point in the history
  • Loading branch information
mgreenegit committed Feb 27, 2019
2 parents ca2ee8c + 021392a commit 1bb3f40
Show file tree
Hide file tree
Showing 3 changed files with 133 additions and 81 deletions.
127 changes: 88 additions & 39 deletions ReadMe.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,100 @@
# UpdateServicesDsc

[![Build status](https://ci.appveyor.com/api/projects/status/wncsr23e1fqbv4nt?svg=true)](https://ci.appveyor.com/project/mgreenegit/UpdateServicesDsc)
The **UpdateServicesDsc** module contains DSC resources
for deployment and configuration of Windows Server Update Services.

This project has adopted [this code of conduct](CODE_OF_CONDUCT.md).

## Support

This module is community maintained as a best-effort open source project
and has no expressed support from any individual or organization.

## Branches

The **UpdateServicesDsc** module is a part of the Windows PowerShell Desired State Configuration (DSC) Resource Kit, which is a collection of DSC Resources.
### master

This module contains the **UpdateServicesApprovalRule, UpdateServicesCleanup, and UpdateServicesServer** resources.
[![Build status](https://ci.appveyor.com/api/projects/status/wncsr23e1fqbv4nt?svg=true)](https://ci.appveyor.com/project/mgreenegit/UpdateServicesDsc)
[![codecov](https://codecov.io/gh/mgreenegit/UpdateServicesDsc/branch/master/graph/badge.svg)](https://codecov.io/gh/mgreenegit/UpdateServicesDsc/branch/master)

This is the branch containing the latest release -
no contributions should be made directly to this branch.

**All of the resources in the DSC Resource Kit are provided AS IS, and are not supported through any Microsoft standard support program or service. The "x" in xStorage stands for experimental**, which means that these resources will be **fix forward** and monitored by the module owner(s).
### dev
[![Build status](https://ci.appveyor.com/api/projects/status/wncsr23e1fqbv4nt/branch/dev??svg=true)](https://ci.appveyor.com/project/mgreenegit/UpdateServicesDsc/branch/dev)
[![codecov](https://codecov.io/gh/mgreenegit/UpdateServicesDsc/branch/dev/graph/badge.svg)](https://codecov.io/gh/mgreenegit/UpdateServicesDsc/branch/dev)

Please leave comments, feature requests, and bug reports in the Q & A tab for this module.
This is the development branch
to which contributions should be proposed by contributors as pull requests.
This development branch will periodically be merged to the master branch,
and be released to [PowerShell Gallery](https://www.powershellgallery.com/).

If you would like to modify this module, feel free.
When modifying, please update the module name, resource friendly name, and MOF class name (instructions below).
As specified in the license, you may copy or modify this resource as long as they are used on the Windows Platform.
## Contributing

For more information about Windows PowerShell Desired State Configuration, check out the blog posts on the [PowerShell Blog](http://blogs.msdn.com/b/powershell/) ([this](http://blogs.msdn.com/b/powershell/archive/2013/11/01/configuration-in-a-devops-world-windows-powershell-desired-state-configuration.aspx) is a good starting point).
There are also great community resources, such as [PowerShell.org](http://powershell.org/wp/tag/dsc/), or [PowerShell Magazine](http://www.powershellmagazine.com/tag/dsc/).
For more information on the DSC Resource Kit, checkout [this blog post](http://go.microsoft.com/fwlink/?LinkID=389546).
Regardless of the way you want to contribute
we are tremendously happy to have you here.

There are several ways you can contribute.
You can submit an issue to report a bug.
You can submit an issue to request an improvement.
You can take part in discussions for issues.
You can review pull requests and comment on other contributors changes.
You can also improve the resources and tests,
or even create new resources,
by sending in pull requests yourself.

* If you want to submit an issue or take part in discussions,
please browse the list of [issues](https://github.com/mgreenegit/UpdateServicesDsc/issues).
Please check out [Contributing to the DSC Resource Kit](https://github.com/PowerShell/DscResources/blob/master/CONTRIBUTING.md)
on how to work with issues.
* If you want to review pull requests,
please first check out the [Review Pull Request guidelines](https://github.com/PowerShell/DscResources/blob/master/CONTRIBUTING.md#reviewing-pull-requests),
and the browse the list of [pull requests](https://github.com/mgreenegit/UpdateServicesDsc/pulls)
and look for those pull requests with label 'needs review'.
* If you want to improve this resource module,
then please check out the following guidelines.
* The specific [Contributing to SqlServerDsc](https://github.com/mgreenegit/UpdateServicesDsc/blob/dev/CONTRIBUTING.md)
guidelines.
* The common [Style Guidelines & Best Practices](https://github.com/PowerShell/DscResources/blob/master/StyleGuidelines.md).
* The common [Testing Guidelines](https://github.com/PowerShell/DscResources/blob/master/TestsGuidelines.md).
* If you are new to GitHub (and git),
then please check out [Getting Started with GitHub](https://github.com/PowerShell/DscResources/blob/master/GettingStartedWithGitHub.md).
* If you are new to Pester and writing test, then please check out
[Getting started with Pester](https://github.com/PowerShell/DscResources/blob/master/GettingStartedWithPester.md).

If you need any help along the way,
don't be afraid to ask.
We are here for each other.

## Installation

To install **UpdateServicesDsc** module, on a machine with Windows Management Framework version 5 or newer from an elevated PowerShell session run:
### From GitHub source code

To manually install the module, download the source code from GitHub and unzip
the contents to the '$env:ProgramFiles\WindowsPowerShell\Modules' folder.

### From PowerShell Gallery

```PowerShell
Install-Module UpdateServicesDsc
To install from the PowerShell gallery using PowerShellGet (in PowerShell 5.0)
run the following command:

```powershell
Find-Module -Name SqlServerDsc | Install-Module
```

To confirm installation
To confirm installation, run the below command and ensure you see the SQL Server
DSC resources available:

```PowerShell
Get-DSCResource UpdateServicesDsc
```powershell
Get-DscResource -Module SqlServerDsc
```

## Requirements

This module requires a minimum version of PowerShell v5.0.
The minimum Windows Management Framework (PowerShell) version required is 5.0
or higher, which ships with Windows 10 or Windows Server 2016,
but can also be installed on Windows 7 SP1, Windows 8.1,
Windows Server 2008 R2 SP1, Windows Server 2012 and Windows Server 2012 R2.

## Details

Expand Down Expand Up @@ -86,28 +146,12 @@ This module requires a minimum version of PowerShell v5.0.
* **RunRuleNow**: Run Approval Rule on existing content.
* **ClientTargetingMode**: An enumerated value that describes if how the Target Groups are populated.

## Renaming Requirements

When making changes to these resources, we suggest the following practice

1. Update the following names by replacing MSFT with your company/community name or another prefix of your choice.

* Module name (ex: xModule becomes cModule)
* Resource folder (ex: MSFT\_xResource becomes Contoso\_xResource)
* Resource Name (ex: MSFT\_xResource becomes Contoso\_cResource)
* Resource Friendly Name (ex: xResource becomes cResource)
* MOF class name (ex: MSFT\_xResource becomes Contoso\_cResource)
* Filename for the <resource\>.schema.mof (ex: MSFT\_xResource.schema.mof becomes Contoso\_cResource.schema.mof)

1. Update module and metadata information in the module manifest
1. Update any configuration that use these resources

We reserve resource and module names without prefixes for future use (e.g. "MSFT_Resource").
## Versions

This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [[email protected]](mailto:[email protected]) with any additional questions or comments.
### 1.1.0

## Versions
* Resolve feedback for HQRM
* Accept PR for client side targeting

### 1.0.76.0

Expand All @@ -134,7 +178,7 @@ For more information see the [Code of Conduct FAQ](https://opensource.microsoft.
* Add Integration tests
* Fix typo in ReadMe
* Add RunRuleNow param to WSUSApprovalRule resource
* Fix error in WSUSServer resource causing Get-to fail
* Fix error in WSUSServer resource causing Get- to fail

### 1.0.0.0

Expand All @@ -146,3 +190,8 @@ For more information see the [Code of Conduct FAQ](https://opensource.microsoft.
## Contributing

Please check out common DSC Resources [contributing guidelines](https://github.com/PowerShell/DscResource.Kit/blob/master/CONTRIBUTING.md).

Thank you
[SqlServerDsc](https://github.com/PowerShell/SqlServerDsc/blob/dev/README.md)
maintainers for your awesome work on style and structure for DSC README files,
which is copied here.
2 changes: 1 addition & 1 deletion UpdateServicesDsc.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# RootModule = ''

# Version number of this module.
ModuleVersion = '1.0.76.0'
ModuleVersion = '1.1.0.0'

# Supported PSEditions
# CompatiblePSEditions = @()
Expand Down
85 changes: 44 additions & 41 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,34 @@
################################################################################
# This is the template for appveyor.yml which uses the "default model" of the
# test framework in https://github.com/PowerShell/DscResource.Tests.
#
# This template assumes you have connected your repository to AppVeyor
# (https://ci.appveyor.com).
#
# Before using it in your repository, modify places marked with 'TODO:', and
# then remove this comment block.
################################################################################

#---------------------------------#
# environment configuration #
#---------------------------------#
version: 1.0.75.{build}

version: 1.1.{build}.0 # TODO: Modify version so it fits your versioning.
environment:
gallery_api:
# TODO: Change to the correct API key if using PowerShell Gallery deploy task.
# If you wish to use this to publish your own module you'd need to set your
# own API key (encrypted by https://ci.appveyor.com/tools/encrypt).
#
# This API key can only be decrypted by the PowerShell Team's AppVeyor account,
# and can only be used for resource modules under the DSC Resource Kit.
secure: 9ekJzfsPCDBkyLrfmov83XbbhZ6E2N3z+B/Io8NbDetbHc6hWS19zsDmy7t0Vvxv

install:
- git clone https://github.com/PowerShell/DscResource.Tests
- ps: |
Import-Module .\DscResource.Tests\TestHelper.psm1 -force
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.205 -Force
Install-Module -Name Pester -Repository PSGallery -Force
- git clone https://github.com/PowerShell/DscResource.Tests
- ps: Write-Verbose -Message "PowerShell version $($PSVersionTable.PSVersion)" -Verbose
- ps: Import-Module -Name "$env:APPVEYOR_BUILD_FOLDER\DscResource.Tests\AppVeyor.psm1"
- ps: Invoke-AppveyorInstallTask

#---------------------------------#
# build configuration #
Expand All @@ -21,39 +42,21 @@ build: false

test_script:
- ps: |
$testResultsFile = ".\TestsResults.xml"
$res = Invoke-Pester -OutputFormat NUnitXml -OutputFile $testResultsFile -PassThru
(New-Object 'System.Net.WebClient').UploadFile("https://ci.appveyor.com/api/testresults/nunit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path $testResultsFile))
if ($res.FailedCount -gt 0) {
throw "$($res.FailedCount) tests failed."
}
#---------------------------------#
# deployment configuration #
#---------------------------------#

# scripts to run before deployment
deploy_script:
# TODO:
# To use -CodeCovIo parameter, the repository need to connected
# to Codecov (see https://codecov.io/).
Invoke-AppveyorTestScriptTask -CodeCoverage -CodeCovIo
# scripts to run before deployment
after_test:
- ps: |
Import-Module -Name "$env:APPVEYOR_BUILD_FOLDER\DscResource.Tests\AppVeyor.psm1"
Invoke-AppveyorAfterTestTask
#---------------------------------#
# deployment configuration #
#---------------------------------#

deploy_script:
- ps: |
# Creating project artifact
$stagingDirectory = (Resolve-Path ..).Path
#$manifest = Join-Path $pwd "UpdateServicesDSC.psd1"
#(Get-Content $manifest -Raw).Replace("1.0.x.0", $env:APPVEYOR_BUILD_VERSION) | Out-File $manifest
$zipFilePath = Join-Path $stagingDirectory "$(Split-Path $pwd -Leaf).zip"
Add-Type -assemblyname System.IO.Compression.FileSystem
[System.IO.Compression.ZipFile]::CreateFromDirectory($pwd, $zipFilePath)
# Creating NuGet package artifact
New-Nuspec -packageName $env:APPVEYOR_PROJECT_NAME -version $env:APPVEYOR_BUILD_VERSION -author "Microsoft" -owners "Microsoft" -licenseUrl "https://github.com/PowerShell/DscResources/blob/master/LICENSE" -projectUrl "https://github.com/$($env:APPVEYOR_REPO_NAME)" -packageDescription $env:APPVEYOR_PROJECT_NAME -tags "DesiredStateConfiguration DSC DSCResourceKit" -destinationPath .
nuget pack ".\$($env:APPVEYOR_PROJECT_NAME).nuspec" -outputdirectory .
$nuGetPackageName = $env:APPVEYOR_PROJECT_NAME + "." + $env:APPVEYOR_BUILD_VERSION + ".nupkg"
$nuGetPackagePath = (Get-ChildItem $nuGetPackageName).FullName
@(
# You can add other artifacts here
$zipFilePath,
$nuGetPackagePath
) | % {
Write-Host "Pushing package $_ as Appveyor artifact"
Push-AppveyorArtifact $_
}
Invoke-AppVeyorDeployTask

0 comments on commit 1bb3f40

Please sign in to comment.