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

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,556,302
Community Members
 
Community Events
184
Community Groups

How to retrieve source code from Bit Bucket repository via Bamboo

Edited

Is it possible to have Bamboo pull Source code from a Repository of my choosing and then place this into a local folder on my host Desktop computer? I need this function to bring on these source files and folders to a specific location on my "C" drive  (i.e. C:\rtc_workspaces\TmlVcmMasterBuildDefBamboo)  Place code here? Does Bamboo work this way?  I tried to add a task called "Source Code Checkout" inside of my Job.  

Thanks,

-Tom

1 answer

0 votes
Daniel Santos
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Dec 11, 2018

Hi Thomas,

The Source Code Checkout task will allow you to checkout your code only to subdirectories of the plan working directory. It is where the plan will run your tasks. By default this location is configured to: <Bamboo_Home>\xml-data\build-dir\ . This location can be set to a different folder as descried in this document: Specifying Bamboo's working directory

If you just want this change for a specific plan I would suggest you using a script task to copy or move your files after the checkout.

Hi Daniel thanks for the reply, In my list of Task within my job I first ran a Source Code Checkout which as you said it placed the Repo contents in the Bamboo_Home\xml-data\build-dir, this was a good step. Next I used another task called Script and added a couple of Inline MSDOS batch file commands to change the directory to a place where I want these repos to go then I issued a Copy. So now the last thing I need is a batch file to run to start the regression process. I initially added a MSDOS command “call TmlVcmMasterBuildScript003.bat” but that did not seem to do any thing. What I do in this circumstance to have Bamboo call an external MS batch file? I just need this last piece and I got it. Thanks again.  

Daniel Santos
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Dec 13, 2018 • edited

Hi Thomas, I'm glad we have some progress here.
What is the content inside the TmlVcmMasterBuildScript003.bat script?
What did you see in the build logs when you try to run that command?
I just tested a simple batch file called from a script task and it worked fine. I used the following config:

  • Interpreter:
    • Shell
    • /bin/sh or cmd.exe)
      (i)Tested with both
  • Script location: Inline 
  • Script body: 
    • c:<path>\script.bath
    • call c:<path>\script.bath
      (i)Tested with both

Please check the build logs and the agent logs in case you run this plan on a remote agent. You should at least see an error in your logs in case there is something failing. You can also try to change the content of your batch file to something that will allow you to easier to check if the script was run or not.

Please keep us posted. =]

Hi Daniel, 

Well I added another Task Script with these setting:

    Interpreter:

  •         Shell

    Script location

  •         inline

Here is the script body:

cd \vcast-buildsystem-orig
for /f "delims=" %%a in ('wmic OS Get localdatetime ^| find "."') do set dt=%%a
set YYYY=%dt:~0,4%
set MM=%dt:~4,2%
set DD=%dt:~6,2%
set HH=%dt:~8,2%
set Min=%dt:~10,2%
set Sec=%dt:~12,2%
set stamp=Regression_%YYYY%-%MM%-%DD%_%HH%-%Min%-%Sec%
md %stamp%
copy Regression-Original-Scripts\*.* %stamp%
@echo ON
cd %stamp%
call StartRegression.bat

I was hoping to call TmlVcmMasterBuildScript003.bat  in which this is the above commands but this inline approach worked. 

This time it went further. I did notice in my previous task Script 

the Interpreter was set as:

  •    Windows PowerShell

in which I also had a couple lines in the Script body.

But Your example I think got me over the hump....So thank you very much   ;-)

 

Kind regards,

-Tom  

Like Daniel Santos likes this
Daniel Santos
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Dec 13, 2018

Hi Tom,
Thank you for sharing those details.
I'm glad to see that you are now good to go! =]

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events