User Profile
tanulbhasin
Brass Contributor
Joined 5 years ago
User Widgets
Recent Discussions
Get CIDR range for Azure devops?
My organization only allows us to set this networking option for all resources like key vault, storage account etc. And, in pipelines we are not allowed to make curl commands to any website, like http://ipinfo.io/ip, which gives us Ip address then add into azure resources etc.. That is considered as a workaround and we can't rely on such websites. If they are down then our Devops pipelines will stop working. So please suggest how to get the exact ip ranges of azure devops which we can add in key vault or any other resource to enable permanent connectivity of Azure resources with Azure devops. Kind Regards, Tanul777Views0likes0CommentsCan we create PAT for service accounts?
Hello, We are facing lot of problems while using Personal access token of normal users. Consider if the token is expired and user is not in office or s/he left the job then all the resources working using this PAT becomes unstable. We have created service accounts in our organization AD which are synced with Azure Active directory as well. Now how to user that account to generate the PAT. Any suggestions please Thank you.Solved2.9KViews1like3CommentsUsing expression in Azure key vault task?
Hello, This is giving invalid key vault name. Does Azure key vault task accepts expression. If not then how to pass the value to azure key vault in such scenario variables: - group: env_map - name: qaNamespace value: $[coalesce(variables[variables['Build.SourceBranch']], '')] - task: AzureKeyVault@2 displayName: Download Secrets from Key Vault inputs: azureSubscription: ${{parameters.azureSubscription}} KeyVaultName: replace(replace(replace(variables['qaNamespace'], 'a', 'vault1'), 'b', 'vault2'), 'c', 'vault3') SecretsFilter: 'PASSWORD,UserID' RunAsPreJob: false620Views0likes0CommentsDocker images are unavailable between jobs?
Team, My pipeline structure is like this stages: stage: job1: build docker image job2: Read docker image Docker image in job2 is unavailable. Is this the expected behavior? If its correct then Azure devops team must add the feature of accessing a docker image within a stage. I can understand that sharing between stages could be difficult but at least make it available between jobs of same stage. It is seriously a difficult to manage this.875Views0likes0CommentsPass variable value to a job in a template from previous job
Hello, This is my yaml pipeline stages: - stage: 'build' displayName: 'Build' jobs: - job: steps: - task: CmdLine@2 name: 'calculateAppVersion' displayName: 'Calculate Chart Versions' inputs: script: | chartVersion="abcd1234" echo "##vso[task.setvariable variable=chartVersion;isOutput=true]$chartVersion" - template: ./template-scan.yaml This is my template-scan jobs: - job: 'scan' variables: containerTag: $[ dependencies.${{parameters.dependentJob}}.outputs['setVariable.chartVersion'] ] steps: . . . I am unable to access the container Tag value. Its always blank in template. Does this approach of dynamically creating the variable and then reading it in another job within template works.. If not, can anyone suggest some solution. Thank you. Kind Regards, TanulSolved1.8KViews0likes1CommentAzure devops unable to access azure storage account?
Hello, We are using only Microsoft hosted agents in azure pipeline, and I need to enable the connectivity between them and azure storage account. We don't want to access storage account from any Azure VM or Kubernetes or self-hosted agent hence, selected this configuration: Error: The request may be blocked by network rules of storage account. Please check network rule set using 'az storage account show -n accountname --query networkRuleSet'. Can anyone guide us to enable connectivity from Microsoft hosted agent. It starts working the moment I select enabled form all networks. The region of Azure devops and storage account is also same. Pipeline:- pool: vmImage: ubuntu-latest . . . - task: AzureCLI@2 displayName: 'Download file' inputs: azureSubscription: Production scriptLocation: inlineScript scriptType: bash inlineScript: | az storage blob download -c test -n file.zip -f ./file.zip --account-name testaccount Please help. Thank you. Kind Regards, TanulSolved4.7KViews0likes3CommentsCan we pause a job and run depending upon completion of another job?
Team, I have 2 jobs in a stage each having 4 tasks. Is it possible if first 2 tasks of Job 1 executes and then this jobs shall pause. After this, Job 2 will execute and complete all of its tasks. Then other 2 tasks of Job 1 will execute. Can we do it by any chance. Please suggest. Kind Regards, Tanul909Views0likes1CommentComplete pipeline execution with warning?
Hello, While running pipeline, it either completes as Success(Green color), Error(Red color) or Cancelled(White circle with borders) as shown below Is it possible complete this with warning(Yellow color) on the basis of some condition inside pipeline. Please help. Thank you. Kind Regards, TanulSolved14KViews1like3CommentsHow to download file from other repostiory?
Hello, We have a separate repository where we keep a exe file to scan our code for vulnerabilities. How to download that specific exe file from different repositories while running the code pipelines in different repositories. Do we have any task for that in ado pipeline which can manages authentication etc. as well internally while downloading that file.. Kindly suggest. Regards, Tanul1.5KViews0likes2CommentsValidate jira user story status before approving pull request?
Hello, Is there anything available to integrate jira with azure devops which can specifically block the merging in master if user story in jira is not accepted yet. I know that this possible with Rally and github. But any chance with jira and azure devops. Any suggestions please? Thank you.2.3KViews0likes6CommentsDetermine which service connection is mapped to which service account int AKS?
Team, In past years, we have created multiple service connections in Azure devops with Azure kubernetes. Now, every service connection in ADO creates a separate service account in AKS. Is there any way to segregate that which kubernetes service account is mapped to which service connection in ADO. Thanks TanulSolved889Views0likes1CommentUnable to remove new line character in pipeline?
Team, I have created this task - task: AzureCLI@1 displayName: 'Tag Prod Containers' inputs: azureSubscription: Production scriptLocation: inlineScript inlineScript: | readarray -t images <<< $(grep -E 'repository|tag' $(Pipeline.Workspace)/values/higher-values.yaml|awk '{print $2}') registry=$(awk -F. '{print $1}' <<< ${images[0]}|tr -d '\n') kongingress=$(awk -F/ '{print $2}' <<< ${images[0]}|tr -d '\n') kong=$(awk -F/ '{print $2}' <<< ${images[2]}|tr -d '\n') echo "------------------" sed -z 's/\n/ /g' <<< $(tr -d '\n' <<< ${images[2]})@${{ parameters.Digest_Id }} sed -z 's/\\n/ /g' <<< $(tr -d '\n' <<< ${images[2]})@${{ parameters.Digest_Id }} echo "------------------" But output is always coming like this. A new line after kong word. registry.azurecr.io/kong SHA256:12345678ccf100aafdda330e50f54b7514ab4d929cf123456789 Due to this always getting the error in az acr import command: ERROR: (InvalidImportImageParameter) Invalid value Any suggestions please.. Thanks. Regards, Tanul1.4KViews0likes0CommentsAzure devops takes hours to show a new resource created in azure portal?
Team, After creating any resource in azure portal, Azure devops takes hours to highlight it in Service connection section. Due to this we are unable to create connection with the resources. For eg. I have created Azure container registry 2 hours back and still it is showing as no registries found while creating a new service connection Is there any way to speed up this process as it is disastrously impacting the productivity. Regards, Tanul2KViews0likes7CommentsAzure devops pipeline stages are unable to find the artifacts?
Team, We have 3 stages 1. Build 2. DevTest 3. Production DevTest is able to found the objects but Production stage is unable to found them. Download artifacts works fine in production stage but after that helm task runs and returns `no objects visited` error. Build start like this - stage: 'build' displayName: 'Kong Custom Images Build' jobs: - job: 'build' displayName: 'Kong Custom Images Build' steps: - task: - task DevTest stage starts like this - stage: 'DevTest' displayName: 'Deploy to Dev/Test' dependsOn: 'build' jobs: - job: 'DevTest' displayName: 'Deploy to Dev/Test' steps: - download: current artifact: values - task: Production stage starts like this - stage: 'Production' displayName: 'Deploy to Production' dependsOn: 'DevTest' jobs: - deployment: 'Production' displayName: 'Deploy to Production' pool: vmImage: ubuntu-latest environment: 'Production Cluster' strategy: runOnce: deploy: steps: - download: current artifact: values - task: Can anyone suggest something. Thank you. Regards, Tanul1.2KViews0likes0CommentsRe: Can we create PAT for service accounts?
So, in an organization we generally 2 types of accounts 1. User account 2. Service account User account is like normal people. Through which we login into our office laptop. If user leaves the company then account will terminate. On the contrary, service accounts are like used in technical domains like making service to service call. These accounts are not like of normal people and their passwords can be shared across the teams. These are just part of AD but do not have any connection with real living human being. You can check with your company identity team. They will explain you the things in more detail.2.8KViews0likes0CommentsCarriage return is working properly in powershell
Hello, How to parse this string properly in powershell. Replace("\r\n","`r`n") is not working properly. "\r\n ___ ______ _ _ _\r\n / _ \\ | ___ (_) | (_)\r\n/ /_\\ \\_____ _ _ __ ___ | |_/ /_ _ __ ___| |_ _ __ ___ ___\r\n| _ |_ / | | | '__/ _ \\ | __/| | '_ \\ / _ \\ | | '_ \\ / _ \\/ __|\r\n| | | |/ /| |_| | | | __/ | | | | |_) | __/ | | | | | __/\\__ \\\r\n\\_| |_/___|\\__,_|_| \\___| \\_| |_| .__/ \\___|_|_|_| |_|\\___||___/\r\n | |\r\n agent 3.10 |_| (commit 3.20)\r\n"Solved1.9KViews0likes1Comment
Groups
Recent Blog Articles
No content to show