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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

How to execute script on a self hosted server

Hi.

I'am running a self hosted runner.

I want to execute script in a host server, not container.

 

docker volumes - <host-server ssh-key Path>:/mnt

when i run command in a host server, docker gateway = "172.17.0.1"

docker inspect --format='{{json .NetworkSettings.Networks.bitbucket_new_default.Gateway}}' runner-name | jq

 

How can i execute command in a host server using pipelines script?

 

```

image: atlassian/default-image:4
pipelines:
  default:
    name: deploy
    runs-on: 
      - self.hosted
      - linux
      - test
    script:
      - ssh -i /mnt/id_ed25519 ubuntu@172.17.0.1 "echo test"
```

1 answer

1 accepted

0 votes
Answer accepted
Syahrul
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Oct 24, 2023

G'day, @김주희 

Welcome to the community!

I assume you are using Linux docker based on the Yaml above. If yes, a limitation in Linux docker prevents the runner from accessing the host file system.

If you wish to, the options would be via SCP or Rsync if necessary.

For more information on limitations, please check our documentation:

Runner limitation 

Regards,
Syahrul

I solved.

docker volumes mount !

Suggest an answer

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

Atlassian Community Events