Based on Realising the Feedback Loop, once the package has been promoted to it’s last stage, it is then pushed to the artefact store
In this example Azure DevOps (ADO) using the az artifacts extension, see the example push.tsk
.
Write-Host "[$TASK_NAME] Verify deployable artefact is available`n"
$package_name = (Get-Item "$(PWD)\release.ps1" -ErrorAction SilentlyContinue).FullName
if ( ! ( $package_name )) { ERRMSG "[PACKAGE_NOT_FOUND] $(PWD)\release.ps1 not found!" 9994 }
Write-Host "[$TASK_NAME] Verify Azure DevOps PAT is set correctly`n"
VARCHK push.varchk
PROPLD manifest.txt
$version = ${artifactPrefix} + '.' + ${BUILDNUMBER}
Write-Host "[$TASK_NAME] Push $SOLUTION release package:"
Write-Host "[$TASK_NAME] `$ado_org = $ado_org"
Write-Host "[$TASK_NAME] `$ado_project = $ado_project"
Write-Host "[$TASK_NAME] `$ado_feed = $ado_feed"
Write-Host "[$TASK_NAME] `$SOLUTION = $SOLUTION"
Write-Host "[$TASK_NAME] `$version = $version"
Write-Host "[$TASK_NAME] `$package_name = $package_name"
Write-Host "Verify deployable artefact is available`n"
az artifacts universal publish --organization $ado_org --project $ado_project --scope project --feed $ado_feed --name "$SOLUTION" --version $version --path $package_name
Write-Host "Verify wrapper is available`n"
$package_name = (Get-Item "$(PWD)\userenv.ps1" -ErrorAction SilentlyContinue).FullName
if ( ! ( $package_name )) { ERRMSG "[PACKAGE_NOT_FOUND] $(PWD)\userenv.ps1 not found!" 9995 }
az artifacts universal publish --organization "https://cdaf.visualstudio.com" --project $ado_project --scope project --feed $ado_feed --name "userenv" --version $version --path $package_name
The package can be retrieved using the semantic version, or latest
(current production).
Operational tasks can be performed using the production (latest
) or specific release. In this example, a production-like development environment can be created and destroyed on demand.