Watch out that Azure DevOps Server 2022.2 drops support for SQL2017

Azure DevOps Server 2022.2 has recently been released. Unexpectedly this minor 2022.2 release includes a change in supported versions of SQL, SQL2017 support has been dropped. So, if someone attempted an upgrade from 2022.1 to 2022.2 they will get the error “TF255146: The SQL Server instance you specified (nnnnn) is version ‘SQL Server 2017 RTM’, which is not supported by this version of Azure DevOps Server. For more information about supported versions of SQL Server, visit https://www....

July 26, 2024 · 2 min · Richard Fennell

Yet more Azure DevOps pipeline variable expansion strangeness

The Issue Yesterday I posted about converting ARM output variables to Azure DevOps pipeline variables Whilst using the pattern I discussed we hit an interesting problem. On my test pipeline I had the following YAML and it was working as expected. - task: PowerShell@2 displayName: Obtain Azure Deployment outputs inputs: targetType: 'inline' script: | if (![string]::IsNullOrEmpty( $env:deploymentOutputs )) { $DeploymentOutputs = convertfrom-json $env:deploymentOutputs $DeploymentOutputs.PSObject.Properties | ForEach-Object { $keyname = $_.Name $value = $_....

July 23, 2024 · 2 min · Richard Fennell

Getting parameters out of ARM/BICEP Deployments

The Issue Historically, we have used Kees Schollaart’s ARM Outputs Azure DevOps task to convert the output from an ARM template deployment into a variable that can be used in a subsequent Azure DevOps pipeline task, using the general form - task: AzureResourceManagerTemplateDeployment@3 displayName: Deploy the main template inputs: deploymentScope: 'Resource Group' azureResourceManagerConnection: 'ARMConnEndpoint' subscriptionId: '$(SubscriptionId)' action: 'Create Or Update Resource Group' resourceGroupName: '$(ResourceGroup)' location: '$(AzureRegion)' templateLocation: 'Linked artifact' csmFile: '$(Pipeline....

July 22, 2024 · 4 min · Richard Fennell

More on when Azure DevOps variables are available in pipeline runs

Introduction I have previously blogged a good deal on Azure DevOps variable evaluation, see here and here, but the saga continues… When variables exist Today I realised, something I guess should have been obvious, that when you manually queue a run, pre-defined variables such as $(Build.SourceBranchName) are not available until the pipeline is compiled and starts running. This is because though there is a value in UI branch combo but this value is not in $(Build....

July 11, 2024 · 4 min · Richard Fennell

Checking out Git submodules when Azure DevOps Protected Access to repos is enabled

The Issue Whilst working on an Azure DevOps YAML pipeline for a solution that used Git Submodules we hit a problem with the checkout of the repo and submodule using the YAML jobs: - job: 'Build' steps: - checkout: self submodules: true It got the main Git repo, but failed with the following error git submodule sync git --config-env=http.https://myorg@dev.azure.com.extraheader=env_var_http.https://myorg@dev.azure.com.extraheader submodule update --init --force Submodule 'Library' (https://myorg@dev.azure.com/myorg/myproject/_git/Library) registered for path 'Library' Cloning into 'D:/a/1/s/Library'....

July 10, 2024 · 2 min · Richard Fennell