This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# A pipeline to update a specific field in a work items that meeting a specific WIQL filter | |
# Do not trigger on a commit to the repo, but allow a manual run | |
trigger: none | |
# Run the pipeline at 1am every day | |
schedules: | |
- cron: '1 0 * * *' | |
displayName: Daily midnight build | |
always: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[CmdletBinding()] | |
param ( | |
[Parameter(Mandatory=$true, HelpMessage="The URL of the Azure DevOps organisation e.g. https://dev.azure.com/myorg")] | |
$org, | |
[Parameter(Mandatory=$true, HelpMessage="The name of the project e.g 'My Project' ")] | |
$project, | |
[Parameter(Mandatory=$false, HelpMessage="The name of the field to update, defaults to 'Custom.PBIAge'")] | |
$fieldName = "Custom.PBIAge", | |
[Parameter(Mandatory=$false, HelpMessage="The WIQL query to find the work items to update. This is used if --sharedWiQueryId is not specified")] | |
$query = "SELECT [System.Id] FROM workitems WHERE ([System.WorkItemType] = 'Bug' OR [System.WorkItemType] = 'Product Backlog Item' ) AND [System.State] IN ('Active', 'Committed')", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is the pipeline that runs any scheduled maintainance jobs | |
# we wish to run in addition to the built in Azure DevOps Maintainance jobs | |
# The parameters to target each pool and agent | |
parameters: | |
- name: pool | |
- name: agent | |
- name: nvdapikey | |
# We cannot use to the parameters directly else we get a 'A template expression is not allowed in this context' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[CmdletBinding()] | |
<# | |
.SYNOPSIS | |
Reverts work items to their previous state in Azure DevOps based on the specified criteria. | |
.DESCRIPTION | |
Reverts work items to their previous state in Azure DevOps based on the specified criteria. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
.SYNOPSIS | |
Copies GitLab repositories to Azure DevOps. | |
.DESCRIPTION | |
This script retrieves GitLab repositories using the provided GitLab token and copies them to an Azure DevOps project. | |
.PARAMETER gitlabtoken | |
Specifies the GitLab token to authenticate with the GitLab API. | |
Create a personal access token in GitLab by navigating to Profile > Edit Profile > Access Tokens. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
param ( | |
[string]$blog = "rfennell", | |
[string]$destination = "C:\projects\bm-source\BMBlogs-Hugo" | |
) | |
write-host "Copying last blog commit" | |
$commandOutput = Invoke-Expression "git diff-tree --no-commit-id --name-only -r HEAD" | |
foreach ($sourceFile in $commandOutput) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
param | |
( | |
$logfile = "TPC\_ApplyPatch.log", | |
$outfile = "out.csv" | |
) | |
# A function to covert the start and end times to a number of minutes | |
# Can't use simple timespan as we only have the time portion not the whole datetime | |
# Hence the hacky added a day-1 second |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3" | |
services: | |
snipe-it: | |
image: snipe/snipe-it:latest | |
volumes: | |
- snipeit:/var/lib/snipeit | |
- snipeit-logs:/var/www/html/storage/logs | |
volumes: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#r "Newtonsoft.Json" | |
using System.Text; | |
using System.Net; | |
using Microsoft.AspNetCore.Mvc; | |
using Microsoft.Extensions.Primitives; | |
using Newtonsoft.Json; | |
using OAuth; | |
public static async Task<IActionResult> Run(HttpRequest req, ILogger log) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
param( | |
$package, | |
$version, | |
$azdoOrg, | |
$feedname, | |
# provide a, Azure DevOps PAT if it a private feed | |
$pat, | |
$DestinationPath = "$package-$version.zip" | |
) |
NewerOlder