Hi i am using bitbucket pipelines to deploy code to my website running in an azure linux vm. i have been through this link and its related all sources
https://bitbucket.org/microsoft/azure-vm-linux-script-deploy/src/master/what i found and is confusing a bit is that it says it downloads and run a script in azure vm connected by secure principal.
My concern is that i have a script present the on linux server i want to run that script by logging in to my linux VM. is it possible that i can do that.Any little help in this regard will be highly appreciated it a bit confusing point.THANKS
Your pipeline file will look like this:
image: maven:3.3.9pipelines:custom:default: - step:name: trigger scriptscript: # Modify the commands below to build your repository. - pipe: microsoft/azure-vm-linux-script-deploy:1.0.1variables:AZURE_APP_ID: $AZURE_APP_IDAZURE_PASSWORD: $AZURE_PASSWORDAZURE_TENANT_ID: $AZURE_TENANT_IDAZURE_RESOURCE_GROUP: $AZURE_RESOURCE_GROUPAZURE_VM_NAME: $AZURE_VM_NAMEAZURE_EXTENSION_COMMAND: './reposcript.sh' AZURE_EXTENSION_FILES: 'reposcript.sh' AZURE_FORCE_UPDATE: 'true' AZURE_NO_WAIT: 'true' AZURE_CLEANUP: 'true' DEBUG: 'true'
You can call your script on machine from reposcript.sh
#!/bin/bashcd /home/mydir./myscript.shecho 'my script is called on vm'
thanks nikesh it seem pretty clear, will try this
Do let me know if it works for you.
one small thing which is a concern is it necessary to use the image mentioned? or i can use my working image.
Referring to this line
image: maven:3.3.9
It looks like you're new here. Sign in or register to get started.