I'm new on Azure DevOps, so I'm struggling to solve a basic problem about variables. Hope anyone can give me a hand with it.
Basically, my release pipeline has a job called "Job 1". It has 2 tasks:
Task 1: Deploy a container in an AKS cluster and expose it via an internal LoadBalancer.
steps:
- task: Kubernetes@1
displayName: Deployment
inputs:
connectionType: 'Azure Resource Manager'
azureSubscriptionEndpoint: 'MY-SUBSCRIPTION'
azureResourceGroup: 'MY-RESOURCEGROUP
kubernetesCluster: 'MY-AKS-CLUSTER'
namespace: 'MY-NAMESPACE'
command: apply
useConfigurationFile: true
configuration: '$(System.DefaultWorkingDirectory)/_TEST/deployment.yaml'
Note: I checked the option to enable the Output Variables functionality Output Box.
Task 2: Create and configure an API in an API Management, setting that internal LoadBalancer as a backend.
The task 1 gives me the internal LoadBalancer's ipaddress via its output json file. Output json file
I would like to get that ipaddress and use it at Task 2, which runs the following command:
az apim api create --service-name $(apimanagement) -g $(apim-resourcegroup) --api-id $(apiname) --path $(apiname) --display-name $(apiname) --service-url http://_LBIPADDRESS_/openapi.json --subscription-key-required false
My question: How do I make this reference at --service-url parameter?
Any suggestion will be appreciated. Thank you!
Best regards, David