Bamboo build stuck on "Waiting to be built..." and Cloning into 'Common'
Asked Answered
S

3

8

For some reason my bamboo build which uses MSBuild is stuck for past 4 hours with message below:

"Waiting to be built...".

I tried stopping the build but stuck on 'Cancelling....'. Can't even disable the Agent. Weird thing is there are 2 build agents in IDLE.

Before I stopped build, the build was running over 5 hours and did not stop. The log said:

simple  04-Mar-2015 21:23:42   Submodule 'web-common' (http://bitbucket.org/abc/web-common) registered for path 'Common'
simple  04-Mar-2015 21:23:43   Cloning into 'Common'...

Rebooted build server. Works for a few hours and same issue starts again. Sick of restarting a build server without knowing the ROOT CAUSE.

I'm quiet new to Bamboo and GIT. If you could help with advise on troubleshooting and fixing this issue will be good.

UPDATE:

I passed the build but getting error below for web deploy: C:\bamboo-home\artifacts\XXX\shared\build-xxxx\package is not a directory

Settee answered 4/3, 2015 at 9:36 Comment(0)
M
5

It was password issue for submodule which is fixed.
Now I'm getting this error

Failure in artifact preparation phase during processing of: 
Subscription for Shared artifact: 
[bla, pattern: [**] anchored at: [deploy_artifact], destination: [] –  

Log message

"C:\bamboo-home\artifacts\XXX\shared\build-xxxx\package is not a directory" 

You can look at this thread:

Did you created a new deployment release after building your plan?
Single release always relates to specific build.
If you want to use updated artifact you need to create a new release.

You can also check copy pattern, as suggested here.


(Original answer)

Bamboo supports submodules since 3.4 and BAM 8106

If that support is somehow faulty, you can try a workaround, adding a builder task like a custom command executable as a script with:

#!/bin/bash
BUILDDIR=${bamboo.build.working.directory}
cd $BUILDDIR
git submodule update --init

(unselect the "Use Submodule" option in the Advanced Option)

https://static.mcmap.net/file/mcmap/ZG-Ab5ovKR_AaF_xbRlhai21bFyQXRlQXS2QX7-kamEtWR-QKmMva3/wp-content/uploads/bamboo-shared-repository-600x401.jpg

That would allow you to check if submodules are actually the issue here.

Molten answered 6/3, 2015 at 11:46 Comment(5)
It was password issue for sub-module which is fixed. Not I'm getting this error "Failure in artifact preparation phase during processing of: Subscription for Shared artifact: [bla, pattern: [**] anchored at: [deploy_artifact], destination: []Settee
Log message "C:\bamboo-home\artifacts\XXX\shared\build-xxxx\package is not a directory"Settee
@Myagdi the Shared path is part of one of the submodule paths? Or your current issue has nothing to do anymore with submodules?Molten
Yes its new issue. Happens for all the builds for DEV, UAT, PROD etc.Settee
What was the password issue with the submodule?Skijoring
S
1

Are you sure you have a running elastic instances ? I had a similar message and my build was queued for long time because I hadn't any running instances which Bamboo can use for building.

Specialty answered 4/3, 2015 at 14:0 Comment(1)
I've no idea what you mean running elastic instances. I'm quiet new to GIT world. I tried to stop but stuck on 'cancelling'Settee
R
1

I was getting this error on Bamboo "Failure in artifact preparation phase during processing of: Subscription for Shared artifact: [bla, pattern: [**] anchored at: [deploy_artifact], destination: [] – "

I use git submodules and this error is owing to a combination of few things that bamboo does that seem to culminate into "shared artifacts" not being found in later phases

I fixed the problem as follows

  1. I unchecked the checkbox "Use submodules" in the Bamboo repository that lets Bamboo deal with checking out git submodules

  2. I introduced a task that checks out git submodules explicitly from my git repository ( from bitbucket) using the bamboo variable bamboo.repository.git.repositoryUrl as follows

    #do NOT use bamboo local git cache /usr/bin/git remote remove origin

    #point your git client to the actual git repository /usr/bin/git remote add origin ${bamboo.repository.git.repositoryUrl} /usr/bin/git remote set-url origin ${bamboo.repository.git.repositoryUrl} /usr/bin/git remote -v

    #Make sure you first de init and then do a submodule init followed by update /usr/bin/git submodule deinit --all --force . /usr/bin/git submodule update --init --recursive

    #after this you may do your next build tasks

In my case ensuring that the submodules were checked out correctly ensured that bamboo was able to create artifacts and share the, and then those were found when later tasks dependent on those shared artifacts executed .

Rajab answered 29/12, 2020 at 15:52 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.