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

Send File to my Remote Server IP

M Rizky Barokah March 18, 2024

Hello,

I am new to Bamboo and Bitbucket, and new to programming world. I have already created my code in Bitbucket and linked it to my Bamboo project in the linked repository section. I would like to run this code using a script task in Bamboo, but I am unsure about the linked repository path in Bamboo. How can I locate the linked repository path?

Screenshot (701).png

Alternatively, I am also interested in learning how to send a simple "Hello, World!" file, push or deploy to a remote desktop server or server using Bamboo.

Thank you.

1 answer

2 votes
Anik Sengupta
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 18, 2024


Hello Rizky,

Welcome to Atlassian Community.  Glad that you have started using Bambooa nd are finding it helpful :)

The path for the script should be either relative to the repository root of the plan, or absolute.

https://confluence.atlassian.com/bamboo/script-289277046.html


This location is known as the working directory. This is where Bamboo temporarily puts the checked-out files it's building.
For Bamboo8 and above - <BAMBOO_HOME>/local-working-dir/<JOB_KEY>

Regarding your second query "how to send a simple "Hello, World!" file to a remote desktop server using Bamboo."

You can use the Bamboo SCP task to upload files from Bamboo directly to a remote server as part of a Bamboo job. The SCP task is able to copy multiple files and preserves the directory structure for the copied files.

More details of the task here :- https://confluence.atlassian.com/bamboo/using-the-scp-task-in-bamboo-305759795.html

Regards,

Anik Sengupta

**please don't forget to Accept the answer if your query was answered**

M Rizky Barokah March 18, 2024

Thanks Mr.Anik. For example, if my linked repository name is "TestHelloWorld," and I want to run my helloworld.py or helloworld.java code file in the repository. where should I put it in that path?

Anik Sengupta
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 18, 2024

 

1. If you are using BITBUCKET make sure you first create an Application link between Bamboo and Bitbucket

https://confluence.atlassian.com/bitbucketserver/link-bitbucket-with-bamboo-1032258002.html

2. Next if you are looking to add your source code repository you need to Link a source code repository for all Bamboo plans

-> From the Bamboo header select > Build resources > Linked repositories.
-> Select Add repository.
-> Select your repository type from the available menu options. For configuration details for a particular repository type, please refer to one of the following pages:
Bitbucket Cloud
Bitbucket Data Center
Git
GitHub (for GitHub and GitHub Enterprise)
Subversion
Perforce

OR you can Configure a repository for a plan

1. Navigate to the plan. See Configuring plans for instructions.
2. Select Actions > Configure plan.
3. Select the Repositories tab to see all the repositories that have been added to the plan.
4. Select a repository name in the list to edit its configuration details.
5. Select Add repository to configure a repository to be used by the plan.
For configuration details for a particular repository type, please refer to one of the following pages:
Bitbucket Cloud
Bitbucket Data Center
Git
GitHub (for GitHub and GitHub Enterprise)
Subversion
Perforce


https://confluence.atlassian.com/bamboo/linking-to-source-code-repositories-671089223.html

3. Finally you can make use of the "Source code checkout task" to checkout the code from the repository. Script task is not a viable option here.

https://confluence.atlassian.com/bamboo/checking-out-code-289277060.html

Let me know if you have any further queries.

Like Jyothi Charupalli likes this
M Rizky Barokah March 18, 2024

1. I'm trying to use the SCP Task. For example, if my linked bitbucket repository name is TestHelloWorld, and I want to send my helloworld.txt or any file in the repository, how should I specify it in the local path or remote path?

2. I'm using Bamboo web. As I'm browsing the internet, it seems that the SCP Task requires artifacts to send. How do I produce artifacts, and which Bamboo task can produce them?

Screenshot (702).png

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events