Missed Team ’24? Catch up on announcements here.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

mount a disk to the image in the pipeline

Stan van den Broek May 7, 2024

Hello,

 

I'm trying to mount a disk to the image in the pipeline. 

I was able to mount the disk from the host to the runner. Now I want to mount it on the image that is started/build in the pipeline.

How to do this if it is even possible?

 

Maybe there is another solution. The thing I want to achieve is the following:

1. One disk with all the software we want to install. 

2. Disk is not available for all servers (customers) 

3. Upload the file to the remote server (Linux(SSH) & Windows(WinRM) systems)

 

For linux systems we now use the following workaround:

We first delegate the an Ansible task to upload from the Docker host to the Pipeline image to the remote system. We can't get it working for Windows because of the Ansible login methode.  

 

Any help would be great!

 

image:
    name: ******.dkr.ecr.eu-west-1.amazonaws.com/ansible:***

pipelines:
default:
- parallel:
- step:
name: Syntax check
runs-on: self.hosted
script:
  - chmod o-w .
  - ansible-playbook customers/playbooks/*.yml --syntax-check

1 answer

1 vote
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 9, 2024

Hello @Stan van den Broek ,

thank you for reaching out to Community.

I'm afraid it's not currently possible to mount directories inside the runner's build containers. We do have a feature request with our development team to implement this functionality : 

If you would be interested in that feature, feel free to add your vote and also mark yourself as a watcher to be notified of any future updates.

While that feature is not available, I can think of the following workaround that may help : 

  • Use rsync of scp tools to copy the files from the host during runtime
  • Use Linux shell runners: Different than Linux docker runners, the Linux shell runners run directly in a shell session on the host machine (no containers involved). This means it will have access to the full resources of the host, and you can essentially execute any command as you would normally do in a shell session on the machine where the runner is being executed.

Hope that information helps! Should you have any questions, feel free to ask.

Thank you, @Stan van den Broek !

Patrik S

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events