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

Building C++ projects with gradle (pipeline)

pvittali April 18, 2018

I am building C++ gradle multiprojects. This is my config:

image: gcc:6.1

pipelines:
  default:
    - step:
        caches:
          - gradle
        script:
          - ./gradlew clean check

I am getting an error:

ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.Please set the JAVA_HOME variable in your environment to match thelocation of your Java installation.

JAVA_HOME isn't set on my build system either.

Is there a way to do this ?

Regards

Peter

 

1 answer

1 accepted

0 votes
Answer accepted
davina
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 19, 2018

Hi @pvittali

The image you are using gcc:6.1 does not have java installed.

You can either use an image that has gcc AND java like atlassian/default-image:2 (more details about this image can be found here)

or you can download a Java JDK in your bitbucket-pipelines.yml and set the JAVA_HOME environment variable.

Hope this helps!

pvittali April 19, 2018

Yes that helped , thanks, simply omitting image ( default ) worked. I simply added  the gradle wrapper to the repo.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events