It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Custom script not executed with azure-vm-linux-script-deploy Edited

My repo is structured like this:

Repo header

  | - src/

  |-bitbucket-pipelines.yml

  |- my script.sh

 

I am trying to copy artifacts generated in my target/ folder to azure vm using azure-vm-linux-script-deploy.

myscript.sh looks like this.

#!/bin/bash
while getopts p option
do
case "${option}"
in
p) ARTIFACT=${OPTARG};;
esac
done
cd $HOME
sudo mkdir folder1
sudo mkdir folder1/folder2
cp ${ARTIFACT} folder1/folder2

 

bitbucket-pipelines.yml

image: maven:3.3.9

pipelines:
custom:
default:
- step:
caches:
- maven
name: build
script: # Modify the commands below to build your repository.
- mvn package
- pipe: microsoft/azure-vm-linux-script-deploy:1.0.1
variables:
AZURE_APP_ID: $AZURE_APP_ID
AZURE_PASSWORD: $AZURE_PASSWORD
AZURE_TENANT_ID: $AZURE_TENANT_ID
AZURE_RESOURCE_GROUP: $AZURE_RESOURCE_GROUP
AZURE_VM_NAME: $AZURE_VM_NAME
AZURE_EXTENSION_COMMAND: './myscript.sh -p target/myjar-1.0.jar'
AZURE_EXTENSION_FILES: 'myscript.sh,target/myjar-1.0.jar'
AZURE_FORCE_UPDATE: 'true'
AZURE_NO_WAIT: 'true'
AZURE_CLEANUP: 'true'
DEBUG: 'true'

 

There are no errors in pipelines log. New folders are not created in $HOME dir. 

Any pointers to mistake will be helpful.

Edit: In the pipeline logs I saw following error:

"extensions": [
{
"name": "CustomScript",
"type": "Microsoft.Azure.Extensions.CustomScript",
"typeHandlerVersion": "2.0.7",
"statuses": [
{
"code": "ProvisioningState/failed/0",
"level": "Error",
"displayStatus": "Provisioning failed",
"message": "Enable failed: processing file downloads failed: failed to download file[0]: failed to download file: http request failed: Get [REDACTED] dial tcp: lookup bbpipe1dsome_number.blob.core.windows.net: no such host"
}
]
},

 

 

1 answer

0 votes

Hi @nikesh ,

please follow recommendations from the Microsoft Team:


If you’d like help with this pipe, or you have an issue or feature request, please contact us:

Option 1 - Azure portal: https://portal.azure.com

  • Go to Help+Support (at the left navigation)
  • Click “+New support request”
  • Choose Issue Type “Technical”
  • Choose Services “All Services”
  • Under “Developer Tools” choose “Azure DevOps Services”
  • Problem Type, choose “Pipelines”

Option 2 - Azure DevOps: https://azure.microsoft.com/en-us/support/create-ticket/

  • Choose Azure DevOps Support ticket ticket
  • Choose the “Create an incident” button
  • The screen will be pre populated with “Developer Tools” “Azure DevOps”.
  • Choose Pipelines as the category and follow the wizard.

If you’re reporting an issue, please include:

  • the version of the pipe
  • relevant logs and error messages
  • steps to reproduce

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket Pipelines

What We Learned When We Researched Open Source Vulnerabilities in 7 Popular Coding Languages

...hey are a part of us, shaping how we interact with the world around us. The same holds true for programming languages when we think about how different kinds of vulnerabilities raise their heads in t...

1,038 views 0 3
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you