简体   繁体   中英

Azure DevOps SSH Linux VM Created with ARM

I'm creating an Ubuntu Azure VM using an ARM template, this all works perfectly, but as part of my deployment process I need to copy Bash scripts to the VM and then execute them, this is turning out to be a pain.

The Azure File Copy task only works on Windows VM's so thats out.

The Copy files with SSH task only works with Service Connections, I cannot create a service connection when it's the pipeline that creates the VM so before it's run it doesn't exist to connect.

I'm sure I can't be the first person with this problem. I have the IP address and user credentials to SSH, but no way of doing it as far as I can see. Anybody know how this can be done?

If I got your question right, then you can upload your shell scripts to some Azure storage and You can put CLI for download those Bash scripts in Custom data. So when your VMs would boot up, it will download Bash scripts and would execute.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM