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

Bamboo Gradle build fails with “fatal: No names found, cannot describe anything"

Brian Mansfield January 17, 2019

I've inherited a Bamboo build that runs deploys on a remote agent. When I run it, the build in Bamboo is marked as "successful," but the deploy task is eventually skipped due to a fatal exception - here's a snippet of the logs:

build   17-Jan-2019 10:25:33    Starting a Gradle Daemon (subsequent builds will be faster)
build   17-Jan-2019 10:25:39    :cleanPackage UP-TO-DATE
build   17-Jan-2019 10:25:39    :copyFiles
build   17-Jan-2019 10:25:39    diffTarget: SIT
error   17-Jan-2019 10:25:39    fatal: No names found, cannot describe anything.
build   17-Jan-2019 10:25:39    build.gradle
build   17-Jan-2019 10:25:39    :deploy SKIPPED
build   17-Jan-2019 10:25:39    
build   17-Jan-2019 10:25:39    BUILD SUCCESSFUL

 

The Bamboo build is setup to check out a repository, then run a task called deploy:

Capture.PNG

 

 

It looks like the issue may be happening when checking out the repository (I am completely new to Gradle, so would be happy to even have this validated/refuted). One other thing to note is that in the build.gradle file, I have Bitbucket creds, but I intentionally switched bewteen invalid credentials and working credentials, and the output was the same - so I'm thinking it's not something specific to this repository itself.

Does anyone have any suggestions/where I should look to troubleshoot? Anything is helpful, even if it's validating that this is likely a Git config issue, and not something else. Let me know if there's any other information I should include - like I said, I'm a total novice with this :)

2 answers

1 accepted

0 votes
Answer accepted
Brian Mansfield January 23, 2019

To anyone that stumbles across this, the issue had nothing to do with Bamboo itself - the Gradle script was making a `git describe --tags` call, but the repository had no tags defined.

(I failed to include the necessary Gradle snippet in the original question, here it is for reference):


result = exec{
commandLine "git", "describe", "--tags", "--match", "$diffTarget-*", "--abbrev=0"
standardOutput = stdout
ignoreExitValue = true
}
0 votes
Daniel Santos
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 18, 2019

Hi @Brian Mansfield,

I was searching for that error

No names found, cannot describe anything.

and found that could be related to a shallow clone configuration in repository configuration. Do you mind checking the repository configuration for this plan and making sure you have the option [ ]Use shallow clones unchecked?

Other question:

Have you tried to run the same gradle build from outside Bamboo (on server terminal) to make sure this problem is only happening when you run within Bamboo?

Brian Mansfield January 23, 2019

I really appreciate you answering - "use shallow clones" was unchecked, yes. It wasn't a problem with Bamboo - the build script was making a `git describe --tags` call, but the repository had no tags defined.

Like Daniel Santos likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events