Build pipeline failed by follow official tutorial

 

Hi,I am a newcomer who is learning TeamCity. When I was practicing according to the official build pipeline tutorial, I always failed to build TodoApp. My TeamCity Server and Agent were deployed on my own computer. Besides, JAVA_HOME and GRADLE_HOME are configured locally. Both of them can be used at any location through the command line, but the construction still fails. Please help me,thang you so much.

The screenshots are following:

And my JDK and GRADLE is work fine in my own computer.

Thanks for helping me!

0
3 comments
Hi,

Did you set the environment variables on the OS or user level?
The build agent may be executed from a different user (for example, if you run the build agent as a Windows Service, it will run using a Local System account by default), so it is important to set the environment variables on the OS level.

Best regards,
Anton
0

Hi,

Thanks for helping me, but there're some error still blocking me T_T

I set my environment variables on the system variables, like following:

If I running agent on my own computer, it could find JDK in log and running fine.

I tried another build for .NET 8 console application ,it's fine. But the error happened when following to execute official build pipeline training.

I also added JAVA_HOME and gradle in user environment and run TodoApp again , unfortunately it failed again.

Any other environment wrong here?
Maybe the key issue is this but I don't know how to solve it?

0
Hi,

I see what is happening on your side. The sample project uses the Gradle Wrapper. If the Gradle Wrapper is enabled, 
TeamCity will look for Gradle Wrapper scripts in the checkout directory and launch the appropriate script. In this case, Gradle specified in the Gradle home path and Gradle installed on the agent are ignored. Please refer to the documentation: https://www.jetbrains.com/help/teamcity/gradle.html.

In the sample project's repo, the Gradle Wrapper properties are specified to use the following Gradle distribution: https://services.gradle.org/distributions/gradle-5.2.1-all.zip. However, the download of this distribution fails on your side, possibly due to network restrictions. Please check with your network team regarding the restrictions.

Best regards,
Anton
1

Please sign in to leave a comment.