Add script/pipeline for manual cpex attestation (#6779)

Co-authored-by: Summer Warren <summerwarren@microsoft.com>
This commit is contained in:
Azure SDK Bot 2025-10-10 11:48:05 -07:00 committed by GitHub
parent 6ad8fa48b9
commit 7f5ab67239
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1114,7 +1114,7 @@ function Get-ReleasePlan-Link($releasePlanWorkItemId)
return $workItem["fields"]
}
function Get-ReleasePlansForCPEXAttestation($releasePlanWorkItemId = $null, $targetServiceTreeId = $null)
function Get-ReleasePlansForCPEXAttestation()
{
$fields = @()
$fields += "Custom.ProductServiceTreeID"
@ -1127,32 +1127,23 @@ function Get-ReleasePlansForCPEXAttestation($releasePlanWorkItemId = $null, $tar
$fieldList = ($fields | ForEach-Object { "[$_]"}) -join ", "
$query = "SELECT ${fieldList} FROM WorkItems WHERE [System.WorkItemType] = 'Release Plan'"
if ($releasePlanWorkItemId){
$query += " AND [System.Id] = '$releasePlanWorkItemId'"
} else {
$query += " AND [System.State] = 'Finished'"
$query += " AND [Custom.AttestationStatus] IN ('', 'Pending')"
$query += " AND [System.Tags] NOT CONTAINS 'Release Planner App Test'"
$query += " AND [System.Tags] NOT CONTAINS 'Release Planner Test App'"
$query += " AND [System.Tags] NOT CONTAINS 'non-APEX tracking'"
$query += " AND [System.Tags] NOT CONTAINS 'out of scope APEX'"
$query += " AND [System.Tags] NOT CONTAINS 'APEX out of scope'"
$query += " AND [System.Tags] NOT CONTAINS 'validate APEX out of scope'"
$query += " AND [Custom.ProductServiceTreeID] <> ''"
$query += " AND [Custom.ProductLifecycle] <> ''"
$query += " AND [Custom.ProductType] IN ('Feature', 'Offering', 'Sku')"
}
if ($targetServiceTreeId){
$query += " AND [Custom.ProductServiceTreeID] = '${targetServiceTreeId}'"
}
$query += " AND [System.State] = 'Finished'"
$query += " AND [Custom.AttestationStatus] IN ('', 'Pending')"
$query += " AND [System.Tags] NOT CONTAINS 'Release Planner App Test'"
$query += " AND [System.Tags] NOT CONTAINS 'Release Planner Test App'"
$query += " AND [System.Tags] NOT CONTAINS 'non-APEX tracking'"
$query += " AND [System.Tags] NOT CONTAINS 'out of scope APEX'"
$query += " AND [System.Tags] NOT CONTAINS 'APEX out of scope'"
$query += " AND [System.Tags] NOT CONTAINS 'validate APEX out of scope'"
$query += " AND [Custom.ProductServiceTreeID] <> ''"
$query += " AND [Custom.ProductLifecycle] <> ''"
$query += " AND [Custom.ProductType] IN ('Feature', 'Offering', 'Sku')"
$workItems = Invoke-Query $fields $query
return $workItems
}
function Get-TriagesForCPEXAttestation($triageWorkItemId = $null, $targetServiceTreeId = $null)
function Get-TriagesForCPEXAttestation()
{
$fields = @()
$fields += "Custom.ProductServiceTreeID"
@ -1167,25 +1158,16 @@ function Get-TriagesForCPEXAttestation($triageWorkItemId = $null, $targetService
$fieldList = ($fields | ForEach-Object { "[$_]"}) -join ", "
$query = "SELECT ${fieldList} FROM WorkItems WHERE [System.WorkItemType] = 'Triage'"
if ($triageWorkItemId){
$query += " AND [System.Id] = '$triageWorkItemId'"
} else {
$query += " AND ([Custom.DataplaneAttestationStatus] IN ('', 'Pending') OR [Custom.ManagementPlaneAttestationStatus] IN ('', 'Pending'))"
$query += " AND [System.Tags] NOT CONTAINS 'Release Planner App Test'"
$query += " AND [System.Tags] NOT CONTAINS 'Release Planner Test App'"
$query += " AND [System.Tags] NOT CONTAINS 'non-APEX tracking'"
$query += " AND [System.Tags] NOT CONTAINS 'out of scope APEX'"
$query += " AND [System.Tags] NOT CONTAINS 'APEX out of scope'"
$query += " AND [System.Tags] NOT CONTAINS 'validate APEX out of scope'"
$query += " AND [Custom.ProductServiceTreeID] <> ''"
$query += " AND [Custom.ProductLifecycle] <> ''"
$query += " AND [Custom.ProductType] IN ('Feature', 'Offering', 'Sku')"
}
if ($targetServiceTreeId){
$query += " AND [Custom.ProductServiceTreeID] = '$targetServiceTreeId'"
}
$query += " AND ([Custom.DataplaneAttestationStatus] IN ('', 'Pending') OR [Custom.ManagementPlaneAttestationStatus] IN ('', 'Pending'))"
$query += " AND [System.Tags] NOT CONTAINS 'Release Planner App Test'"
$query += " AND [System.Tags] NOT CONTAINS 'Release Planner Test App'"
$query += " AND [System.Tags] NOT CONTAINS 'non-APEX tracking'"
$query += " AND [System.Tags] NOT CONTAINS 'out of scope APEX'"
$query += " AND [System.Tags] NOT CONTAINS 'APEX out of scope'"
$query += " AND [System.Tags] NOT CONTAINS 'validate APEX out of scope'"
$query += " AND [Custom.ProductServiceTreeID] <> ''"
$query += " AND [Custom.ProductLifecycle] <> ''"
$query += " AND [Custom.ProductType] IN ('Feature', 'Offering', 'Sku')"
$workItems = Invoke-Query $fields $query
return $workItems