admin管理员组文章数量:1296843
I'm having two issues in the below pipeline.
First, echo Subscription Name is: $(subscriptionName)'
returns the subscriptionName successfully, yet SUBSCRIPTION_ID=$(az account list --query "\[?name=='${subscriptionName}'\].id" -o tsv)
returns blank. If I replace ${subscriptionName}
with a hard coded name of a subscription in my tenant, the subsciptionId returns successfully
Second, even if subscriptionId populates successfully, the pipeline fails at:
az account set --subscription $(subscriptionId)
az deployment sub create --location $(location) --template-file '$(templateFileName)' --parameters $(paramsprd)
The reason for the failure is ERROR: argument --subscription/-s/--name/-n: expected one argument
which suggests the subscriptionId is blank again by that point.
Any help appreciated!
name: Landing Zone Pre-Deployment and Deployment
pool:
vmImage: ubuntu-latest
variables:
# General Settings
vmImageName: 'ubuntu-latest'
location: 'uksouth'
# Service Connection
azureServiceConnectionTenant: 'AzureDevOpsSP'
managementGroupId: 'OCUG-Corp'
# Repository Branch
branchRepo: 'core-landing-zones'
# Hub Resource Group
prdRGhub: 'RG-OCG-VMX-UKS-PROD'
# Template and Parameters
templateFileName: 'main.bicep'
paramsprd: 'params.prd.json'
# Working Directory Root
workingDirectoryRoot: '$(System.DefaultWorkingDirectory)/$(branchRepo)'
# Working Directories
workingDirectorySub: '$(workingDirectoryRoot)/0-core-lz-subscription/'
workingDirectoryRG: '$(workingDirectoryRoot)/1-core-lz-resource-groups/'
workingDirectoryVnet: '$(workingDirectoryRoot)/2-core-lz-vnets-subnets/'
stages:
- stage: SubscriptionDeployment
jobs:
- job: SubscriptionDeploymentJob
displayName: Subscription Deployment
steps:
- task: AzureCLI@2
displayName: 'Deploy New Subscription'
inputs:
azureSubscription: $(azureServiceConnectionTenant) # Service connection with tenant permissions
scriptType: bash
workingDirectory: '$(workingDirectorySub)'
scriptLocation: inlineScript
inlineScript: |
az deployment tenant create --location $(location) --template-file $(templateFileName) --parameters @$(paramsprd)
- script: |
SUBSCRIPTION_NAME=$(jq -r '.parameters.subscriptionName.value' $(workingDirectorySub)/params.prd.json)
echo "Extracted Subscription: $SUBSCRIPTION_NAME"
echo "##vso[task.setvariable variable=subscriptionName]$SUBSCRIPTION_NAME"
displayName: 'Extract Subscription Name'
- task: AzureCLI@2
displayName: 'Extract SubscriptionID'
inputs:
azureSubscription: $(azureServiceConnectionTenant)
scriptType: bash
scriptLocation: inlineScript
inlineScript: |
SUB_NAME="$(subscriptionName)"
echo "Subscription Name is: '$SUB_NAME'"
SUBSCRIPTION_ID=$(az account list --query "[?name=='$SUB_NAME'].id" -o tsv)
echo "Created Subscription ID: $SUBSCRIPTION_ID"
echo "##vso[task.setvariable variable=subscriptionId]$SUBSCRIPTION_ID"
- task: AzureCLI@2
displayName: 'Assign Subscription to Management Group'
inputs:
azureSubscription: $(azureServiceConnectionTenant)
scriptType: bash
scriptLocation: inlineScript
inlineScript: |
echo "Assigning Subscription $(subscriptionName) to Management Group $(managementGroupId)"
az account management-group subscription add --name $(managementGroupId) --subscription $(subscriptionName)
- script: |
SYSTEM=$(jq -r '.parameters.system.value' $(workingDirectoryRG)/params.prd.json)
ENV=$(jq -r '.parameters.env.value' $(workingDirectoryRG)/params.prd.json)
RESOURCE_GROUP="rg-ocu-${SYSTEM}-uks-${ENV}"
echo "Extracted System: $SYSTEM"
echo "Extracted Env: $ENV"
echo "Final Resource Group Name: $RESOURCE_GROUP"
echo "##vso[task.setvariable variable=prdRGvnet]$RESOURCE_GROUP"
displayName: 'Extract and Construct Resource Group Name'
- task: AzureCLI@2
displayName: 'Production Resource Group Deployment'
inputs:
azureSubscription: $(azureServiceConnectionTenant)
scriptType: bash
workingDirectory: '$(workingDirectoryRG)'
scriptLocation: inlineScript
inlineScript: |
az --version
echo "subscriptionId is: $(subscriptionId)"
az account set --subscription $(subscriptionId)
az deployment sub create --location $(location) --template-file '$(templateFileName)' --parameters $(paramsprd)
- task: AzureCLI@2
displayName: 'Production VNet Deployment'
inputs:
azureSubscription: $(azureServiceConnectionTenant)
scriptType: bash
workingDirectory: '$(workingDirectoryVnet)'
scriptLocation: inlineScript
inlineScript: |
az --version
echo "subscriptionId is: $(subscriptionId)"
az account set --subscription $(subscriptionId)
az deployment group create --resource-group $(prdRGvnet) --template-file '$(templateFileName)' --parameters $(paramsprd)
I ran my pipeline, I expected the below to output a subscriptionId, but it output a blank value
echo "Created Subscription ID: $SUBSCRIPTION_ID"
echo "##vso[task.setvariable variable=subscriptionId]$SUBSCRIPTION_ID"
And I expected the below to run successfully, but it failed with ERROR: argument --subscription/-s/--name/-n: expected one argument
az account set --subscription $(subscriptionId)
az deployment sub create --location $(location) --template-file '$(templateFileName)' --parameters $(paramsprd)
Here are the debug logs of the task that I just ran
2025-02-12T10:31:26.5401502Z ##[debug]Evaluating condition for step: 'Production Resource Group Deployment'
2025-02-12T10:31:26.5402377Z ##[debug]Evaluating: SucceededNode()
2025-02-12T10:31:26.5402701Z ##[debug]Evaluating SucceededNode:
2025-02-12T10:31:26.5403206Z ##[debug]=> True
2025-02-12T10:31:26.5403497Z ##[debug]Result: True
2025-02-12T10:31:26.5403943Z ##[section]Starting: Production Resource Group Deployment
2025-02-12T10:31:26.5410464Z ==============================================================================
2025-02-12T10:31:26.5410626Z Task : Azure CLI
2025-02-12T10:31:26.5410702Z Description : Run Azure CLI commands against an Azure subscription in a PowerShell Core/Shell script when running on Linux agent or PowerShell/PowerShell Core/Batch script when running on Windows agent.
2025-02-12T10:31:26.5410936Z Version : 2.251.1
2025-02-12T10:31:26.5411011Z Author : Microsoft Corporation
2025-02-12T10:31:26.5411123Z Help :
2025-02-12T10:31:26.5411295Z ==============================================================================
2025-02-12T10:31:26.6071167Z ##[debug]Using node path: /home/vsts/agents/4.251.0/externals/node20_1/bin/node
2025-02-12T10:31:26.6828836Z ##[debug]system.debug=true
2025-02-12T10:31:26.6830724Z ##[debug]DistributedTask.Tasks.Node.SkipDebugLogsWhenDebugModeOff=True
2025-02-12T10:31:26.6947112Z ##[debug]agent.TempDirectory=/home/vsts/work/_temp
2025-02-12T10:31:26.6971259Z ##[debug]loading inputs and endpoints
2025-02-12T10:31:26.6977370Z ##[debug]loading INPUT_CONNECTEDSERVICENAMEARM
2025-02-12T10:31:26.6996763Z ##[debug]loading INPUT_SCRIPTTYPE
2025-02-12T10:31:26.6998868Z ##[debug]loading INPUT_SCRIPTLOCATION
2025-02-12T10:31:26.7000581Z ##[debug]loading INPUT_SCRIPTPATH
2025-02-12T10:31:26.7002143Z ##[debug]loading INPUT_INLINESCRIPT
2025-02-12T10:31:26.7004069Z ##[debug]loading INPUT_POWERSHELLERRORACTIONPREFERENCE
2025-02-12T10:31:26.7005637Z ##[debug]loading INPUT_ADDSPNTOENVIRONMENT
2025-02-12T10:31:26.7008027Z ##[debug]loading INPUT_USEGLOBALCONFIG
2025-02-12T10:31:26.7009621Z ##[debug]loading INPUT_CWD
2025-02-12T10:31:26.7013042Z ##[debug]loading INPUT_FAILONSTANDARDERROR
2025-02-12T10:31:26.7015674Z ##[debug]loading INPUT_POWERSHELLIGNORELASTEXITCODE
2025-02-12T10:31:26.7019148Z ##[debug]loading INPUT_VISIBLEAZLOGIN
2025-02-12T10:31:26.7021505Z ##[debug]loading INPUT_KEEPAZSESSIONACTIVE
2025-02-12T10:31:26.7024556Z ##[debug]loading ENDPOINT_AUTH_f613ca39-2786-401b-94b9-4598e9a43759
2025-02-12T10:31:26.7027083Z ##[debug]loading ENDPOINT_AUTH_SCHEME_f613ca39-2786-401b-94b9-4598e9a43759
2025-02-12T10:31:26.7028608Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_f613ca39-2786-401b-94b9-4598e9a43759_AUTHENTICATIONTYPE
2025-02-12T10:31:26.7029988Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_f613ca39-2786-401b-94b9-4598e9a43759_SERVICEPRINCIPALID
2025-02-12T10:31:26.7031281Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_f613ca39-2786-401b-94b9-4598e9a43759_TENANTID
2025-02-12T10:31:26.7033792Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_f613ca39-2786-401b-94b9-4598e9a43759_SERVICEPRINCIPALKEY
2025-02-12T10:31:26.7035650Z ##[debug]loading ENDPOINT_AUTH_SYSTEMVSSCONNECTION
2025-02-12T10:31:26.7036818Z ##[debug]loading ENDPOINT_AUTH_SCHEME_SYSTEMVSSCONNECTION
2025-02-12T10:31:26.7038761Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_SYSTEMVSSCONNECTION_ACCESSTOKEN
2025-02-12T10:31:26.7047198Z ##[debug]loading SECRET_SYSTEM_ACCESSTOKEN
2025-02-12T10:31:26.7048603Z ##[debug]loaded 23
2025-02-12T10:31:26.7053976Z ##[debug]Agent.ProxyUrl=undefined
2025-02-12T10:31:26.7055242Z ##[debug]Agent.CAInfo=undefined
2025-02-12T10:31:26.7055669Z ##[debug]Agent.ClientCert=undefined
2025-02-12T10:31:26.7056110Z ##[debug]Agent.SkipCertValidation=undefined
2025-02-12T10:31:26.8310116Z ##[debug]check path : /home/vsts/work/_tasks/AzureCLI_46e4be58-730b-4389-8a2f-ea10b3e5e815/2.251.1/node_modules/azure-pipelines-tasks-artifacts-common/module.json
2025-02-12T10:31:26.8317996Z ##[debug]adding resource file: /home/vsts/work/_tasks/AzureCLI_46e4be58-730b-4389-8a2f-ea10b3e5e815/2.251.1/node_modules/azure-pipelines-tasks-artifacts-common/module.json
2025-02-12T10:31:26.8323039Z ##[debug]system.culture=en-US
2025-02-12T10:31:26.8339757Z ##[debug]Set default DNS lookup order to ipv4 first
2025-02-12T10:31:26.8341358Z ##[debug]Set default auto select family to false
2025-02-12T10:31:26.8342258Z ##[debug]check path : /home/vsts/work/_tasks/AzureCLI_46e4be58-730b-4389-8a2f-ea10b3e5e815/2.251.1/task.json
2025-02-12T10:31:26.8342807Z ##[debug]adding resource file: /home/vsts/work/_tasks/AzureCLI_46e4be58-730b-4389-8a2f-ea10b3e5e815/2.251.1/task.json
2025-02-12T10:31:26.8343379Z ##[debug]system.culture=en-US
2025-02-12T10:31:26.8353304Z ##[debug]which 'az'
2025-02-12T10:31:26.8358873Z ##[debug]found: '/usr/bin/az'
2025-02-12T10:31:26.8363522Z ##[debug]Feature flag AZP_AZURECLIV2_SETUP_PROXY_ENV not found. Returning false as default.
2025-02-12T10:31:26.8369641Z ##[debug]scriptType=bash
2025-02-12T10:31:26.8371140Z ##[debug]scriptLocation=inlineScript
2025-02-12T10:31:26.8371776Z ##[debug]scriptArguments=undefined
2025-02-12T10:31:26.8375667Z ##[debug]Agent.TempDirectory=/home/vsts/work/_temp
2025-02-12T10:31:26.8377843Z ##[debug]inlineScript=az --version
echo "DEBUG: Subscription ID: 064b301e-dc01-403a-a4b2-3f60c75363c9"
az account set --subscription '064b301e-dc01-403a-a4b2-3f60c75363c9'
az deployment sub create --location uksouth --template-file 'main.bicep' --parameters @params.prd.json
2025-02-12T10:31:26.8381495Z ##[debug]which 'bash'
2025-02-12T10:31:26.8384753Z ##[debug]found: '/usr/bin/bash'
2025-02-12T10:31:26.8386352Z ##[debug]which '/usr/bin/bash'
2025-02-12T10:31:26.8387003Z ##[debug]found: '/usr/bin/bash'
2025-02-12T10:31:26.8388192Z ##[debug]/usr/bin/bash arg: /home/vsts/work/_temp/azureclitaskscript1739356286837.sh
2025-02-12T10:31:26.8390633Z ##[debug]cwd=/home/vsts/work/1/s/core-landing-zones/1-core-lz-resource-groups/
2025-02-12T10:31:26.8391942Z ##[debug]scriptLocation=inlineScript
2025-02-12T10:31:26.8393543Z ##[debug]failOnStandardError=false
2025-02-12T10:31:26.8395144Z ##[debug]testing directory '/home/vsts/work/1/s/core-landing-zones/1-core-lz-resource-groups/'
2025-02-12T10:31:26.8421663Z ##[debug]which 'az'
2025-02-12T10:31:26.8424904Z ##[debug]found: '/usr/bin/az'
2025-02-12T10:31:26.8425345Z ##[debug]/usr/bin/az arg: --version
2025-02-12T10:31:26.8425899Z ##[debug]/usr/bin/az arg: --version
2025-02-12T10:31:26.8429224Z ##[debug]exec tool: /usr/bin/az
2025-02-12T10:31:26.8430139Z ##[debug]exec tool: /usr/bin/az
2025-02-12T10:31:26.8430556Z ##[debug]arguments:
2025-02-12T10:31:26.8430952Z ##[debug]arguments:
2025-02-12T10:31:26.8431746Z ##[debug] --version
2025-02-12T10:31:26.8432143Z ##[debug] --version
2025-02-12T10:31:26.8433480Z [command]/usr/bin/az --version
2025-02-12T10:31:27.4935742Z WARNING: You have 2 update(s) available. Consider updating your CLI installation with 'az upgrade'
2025-02-12T10:31:27.4936142Z azure-cli 2.68.0 *
2025-02-12T10:31:27.4936907Z
2025-02-12T10:31:27.4937276Z core 2.68.0 *
2025-02-12T10:31:27.4937636Z telemetry 1.1.0
2025-02-12T10:31:27.4937801Z
2025-02-12T10:31:27.4938101Z Extensions:
2025-02-12T10:31:27.4938459Z azure-devops 1.0.1
2025-02-12T10:31:27.4938618Z
2025-02-12T10:31:27.4938929Z Dependencies:
2025-02-12T10:31:27.4939312Z msal 1.31.1
2025-02-12T10:31:27.4939723Z azure-mgmt-resource 23.1.1
2025-02-12T10:31:27.4939895Z
2025-02-12T10:31:27.4940238Z Python location '/opt/az/bin/python3'
2025-02-12T10:31:27.4940606Z Extensions directory '/opt/az/azcliextensions'
2025-02-12T10:31:27.4940792Z
2025-02-12T10:31:27.4941186Z Python (Linux) 3.12.8 (main, Jan 8 2025, 03:38:17) [GCC 11.4.0]
2025-02-12T10:31:27.4941464Z
2025-02-12T10:31:27.4941805Z Legal docs and information: aka.ms/AzureCliLegal
2025-02-12T10:31:27.4941989Z
2025-02-12T10:31:27.4942188Z
2025-02-12T10:31:27.4958612Z ##[debug]Current Azure CLI version: 2.68.0
2025-02-12T10:31:27.4959357Z ##[debug]useGlobalConfig=false
2025-02-12T10:31:27.4960272Z ##[debug]Agent.TempDirectory=/home/vsts/work/_temp
2025-02-12T10:31:27.4960878Z ##[debug]Agent.TempDirectory=/home/vsts/work/_temp
2025-02-12T10:31:27.4995599Z Setting AZURE_CONFIG_DIR env variable to: /home/vsts/work/_temp/.azclitask
2025-02-12T10:31:27.5003575Z ##[debug]connectedServiceNameARM=f613ca39-2786-401b-94b9-4598e9a43759
2025-02-12T10:31:27.5006611Z ##[debug]f613ca39-2786-401b-94b9-4598e9a43759 data environment = AzureCloud
2025-02-12T10:31:27.5008851Z Setting active cloud to: AzureCloud
2025-02-12T10:31:27.5010768Z ##[debug]which 'az'
2025-02-12T10:31:27.5015919Z ##[debug]found: '/usr/bin/az'
2025-02-12T10:31:27.5017755Z ##[debug]/usr/bin/az arg: cloud set -n AzureCloud
2025-02-12T10:31:27.5019144Z ##[debug]/usr/bin/az arg: cloud set -n AzureCloud
2025-02-12T10:31:27.5020870Z ##[debug]exec tool: /usr/bin/az
2025-02-12T10:31:27.5022398Z ##[debug]exec tool: /usr/bin/az
2025-02-12T10:31:27.5023749Z ##[debug]arguments:
2025-02-12T10:31:27.5024843Z ##[debug]arguments:
2025-02-12T10:31:27.5025919Z ##[debug] cloud
2025-02-12T10:31:27.5027219Z ##[debug] cloud
2025-02-12T10:31:27.5028361Z ##[debug] set
2025-02-12T10:31:27.5029333Z ##[debug] set
2025-02-12T10:31:27.5030427Z ##[debug] -n
2025-02-12T10:31:27.5031527Z ##[debug] -n
2025-02-12T10:31:27.5032535Z ##[debug] AzureCloud
2025-02-12T10:31:27.5033492Z ##[debug] AzureCloud
2025-02-12T10:31:27.5034641Z [command]/usr/bin/az cloud set -n AzureCloud
2025-02-12T10:31:27.8295924Z ##[debug]connectedServiceNameARM=f613ca39-2786-401b-94b9-4598e9a43759
2025-02-12T10:31:27.8297064Z ##[debug]f613ca39-2786-401b-94b9-4598e9a43759 auth scheme = ServicePrincipal
2025-02-12T10:31:27.8298038Z ##[debug]f613ca39-2786-401b-94b9-4598e9a43759 auth scheme = ServicePrincipal
2025-02-12T10:31:27.8299558Z ##[debug]f613ca39-2786-401b-94b9-4598e9a43759 data SubscriptionID = undefined
2025-02-12T10:31:27.8300153Z ##[debug]visibleAzLogin=true
2025-02-12T10:31:27.8329791Z ##[debug]f613ca39-2786-401b-94b9-4598e9a43759 auth param authenticationType = spnKey
2025-02-12T10:31:27.8331025Z ##[debug]f613ca39-2786-401b-94b9-4598e9a43759 auth param serviceprincipalid = ***
2025-02-12T10:31:27.8331926Z ##[debug]f613ca39-2786-401b-94b9-4598e9a43759 auth param tenantid = x
2025-02-12T10:31:27.8332935Z ##[debug]key based endpoint
2025-02-12T10:31:27.8333813Z ##[debug]f613ca39-2786-401b-94b9-4598e9a43759 auth param serviceprincipalkey = ***
2025-02-12T10:31:27.8335570Z ##[debug]Processed: ##vso[task.setsecret]***
2025-02-12T10:31:27.8336065Z ##[debug]which 'az'
2025-02-12T10:31:27.8336534Z ##[debug]found: '/usr/bin/az'
2025-02-12T10:31:27.8337365Z ##[debug]/usr/bin/az arg: login --service-principal -u "***" --password=*** --tenant "69231e14-8d68-46b8-8bb3-b4916ffd8ada" --allow-no-subscriptions
2025-02-12T10:31:27.8338130Z ##[debug]/usr/bin/az arg: login --service-principal -u "***" --password=*** --tenant "69231e14-8d68-46b8-8bb3-b4916ffd8ada" --allow-no-subscriptions
2025-02-12T10:31:27.8338708Z ##[debug]exec tool: /usr/bin/az
2025-02-12T10:31:27.8339206Z ##[debug]exec tool: /usr/bin/az
2025-02-12T10:31:27.8339752Z ##[debug]arguments:
2025-02-12T10:31:27.8340207Z ##[debug]arguments:
2025-02-12T10:31:27.8340659Z ##[debug] login
2025-02-12T10:31:27.8341095Z ##[debug] login
2025-02-12T10:31:27.8341628Z ##[debug] --service-principal
2025-02-12T10:31:27.8342104Z ##[debug] --service-principal
2025-02-12T10:31:27.8342576Z ##[debug] -u
2025-02-12T10:31:27.8342988Z ##[debug] -u
2025-02-12T10:31:27.8343553Z ##[debug] ***
2025-02-12T10:31:27.8344032Z ##[debug] ***
2025-02-12T10:31:27.8344559Z ##[debug] --password=***
2025-02-12T10:31:27.8345191Z ##[debug] --password=***
2025-02-12T10:31:27.8345671Z ##[debug] --tenant
2025-02-12T10:31:27.8346132Z ##[debug] --tenant
2025-02-12T10:31:27.8346885Z ##[debug] 69231e14-8d68-46b8-8bb3-b4916ffd8ada
2025-02-12T10:31:27.8347435Z ##[debug] 69231e14-8d68-46b8-8bb3-b4916ffd8ada
2025-02-12T10:31:27.8347949Z ##[debug] --allow-no-subscriptions
2025-02-12T10:31:27.8348451Z ##[debug] --allow-no-subscriptions
2025-02-12T10:31:27.8349132Z [command]/usr/bin/az login --service-principal -u *** --password=*** --tenant 69231e14-8d68-46b8-8bb3-b4916ffd8ada --allow-no-subscriptions
2025-02-12T10:31:28.7424330Z ##[debug]keepAzSessionActive=false
2025-02-12T10:31:28.7425017Z ##[debug]addSpnToEnvironment=false
2025-02-12T10:31:28.7425479Z ##[debug]exec tool: /usr/bin/bash
2025-02-12T10:31:28.7425888Z ##[debug]arguments:
2025-02-12T10:31:28.7426329Z ##[debug] /home/vsts/work/_temp/azureclitaskscript1739356286837.sh
2025-02-12T10:31:28.7426703Z [command]/usr/bin/bash /home/vsts/work/_temp/azureclitaskscript1739356286837.sh
2025-02-12T10:31:29.2573006Z WARNING: You have 2 update(s) available. Consider updating your CLI installation with 'az upgrade'
2025-02-12T10:31:29.3488636Z azure-cli 2.68.0 *
2025-02-12T10:31:29.3489103Z
2025-02-12T10:31:29.3489442Z core 2.68.0 *
2025-02-12T10:31:29.3490298Z telemetry 1.1.0
2025-02-12T10:31:29.3490485Z
2025-02-12T10:31:29.3490658Z Extensions:
2025-02-12T10:31:29.3490853Z azure-devops 1.0.1
2025-02-12T10:31:29.3490966Z
2025-02-12T10:31:29.3491129Z Dependencies:
2025-02-12T10:31:29.3491308Z msal 1.31.1
2025-02-12T10:31:29.3491497Z azure-mgmt-resource 23.1.1
2025-02-12T10:31:29.3491577Z
2025-02-12T10:31:29.3491757Z Python location '/opt/az/bin/python3'
2025-02-12T10:31:29.3491982Z Extensions directory '/opt/az/azcliextensions'
2025-02-12T10:31:29.3492081Z
2025-02-12T10:31:29.3492321Z Python (Linux) 3.12.8 (main, Jan 8 2025, 03:38:17) [GCC 11.4.0]
2025-02-12T10:31:29.3492462Z
2025-02-12T10:31:29.3492659Z Legal docs and information: aka.ms/AzureCliLegal
2025-02-12T10:31:29.3492759Z
2025-02-12T10:31:29.3492812Z
2025-02-12T10:31:29.4159412Z DEBUG: Subscription ID: 064b301e-dc01-403a-a4b2-3f60c75363c9
2025-02-12T10:31:32.4887142Z ##[debug]Agent environment resources - Disk: / Available 21000.20 MB out of 74244.74 MB, Memory: Used 1002.00 MB out of 6921.00 MB, CPU: Usage 64.40%
2025-02-12T10:31:34.3557733Z ERROR: Missing input parameters: subscriptionId
2025-02-12T10:31:34.5566941Z
2025-02-12T10:31:34.5568463Z ##[debug]Process exited with code 1 and signal null for tool '/usr/bin/bash'
2025-02-12T10:31:34.5569147Z ##[debug]STDIO streams have closed and received exit code 1 and signal null for tool '/usr/bin/bash'
2025-02-12T10:31:34.5570229Z ##[debug]task result: Failed
2025-02-12T10:31:34.5593860Z ##[error]Script failed with exit code: 1
2025-02-12T10:31:34.5600613Z ##[debug]Processed: ##vso[task.issue type=error;source=TaskInternal;correlationId=ab87afd1-574d-45d2-9580-d77218ded32d;]Script failed with exit code: 1
2025-02-12T10:31:34.5601996Z ##[debug]Processed: ##vso[taskplete result=Failed;]Script failed with exit code: 1
2025-02-12T10:31:34.5602453Z ##[debug]which 'az'
2025-02-12T10:31:34.5603097Z ##[debug]found: '/usr/bin/az'
2025-02-12T10:31:34.5603490Z ##[debug]/usr/bin/az arg: account clear
2025-02-12T10:31:34.5603888Z ##[debug]/usr/bin/az arg: account clear
2025-02-12T10:31:34.5604283Z ##[debug]exec tool: /usr/bin/az
2025-02-12T10:31:34.5604669Z ##[debug]exec tool: /usr/bin/az
2025-02-12T10:31:34.5605144Z ##[debug]arguments:
2025-02-12T10:31:34.5605509Z ##[debug]arguments:
2025-02-12T10:31:34.5605874Z ##[debug] account
2025-02-12T10:31:34.5606235Z ##[debug] account
2025-02-12T10:31:34.5606592Z ##[debug] clear
2025-02-12T10:31:34.5606949Z ##[debug] clear
2025-02-12T10:31:34.5607205Z [command]/usr/bin/az account clear
2025-02-12T10:31:35.1580652Z ##[section]Finishing: Production Resource Group Deployment
本文标签: bashMy YAML Pipeline won39t retain the subscriptionId variable between tasksStack Overflow
版权声明:本文标题:bash - My YAML Pipeline won't retain the $subscriptionId variable between tasks - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741633127a2389483.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论