cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeIDE Headless build in CI/CD

stanley.setiawan
Associate II

I'm trying to perform a headless build for our gitlab's pipeline. However, I encountered some problems with it.

Firstly, I want to mention that the build process went smoothly before, but then as I need to change the name of the project, problem arises with the pipeline.

 

So far, I have managed to change all the required changed in the .cproject, .project and other references to the old project name. Hence, when I tried to perform a build and even a debug session from my PC, it went perfectly fine, without any problems. 

The same goes with building the project via a headless build process manually from a linux machine (the docker image of my pipeline). However, when I tried to run it automatically from Gitlab's runner, it failed saying:

 

 

URI: file:/builds/6tyu7Drk/0/path/projName is not valid in the workspace!

 

 

 

The steps for my successful manual headless build:

 

 

git clone http://address_of_repo/projName.git /builds/6tyu7Drk/0/path/projName
cd /builds/6tyu7Drk/0/path/projName
git checkout BRANCH_NAME
/opt/st/stm32cubeide_1.10.1/headless-build.sh -import .
/opt/st/stm32cubeide_1.10.1/headless-build.sh -cleanBuild ProjName

 

 

 

The YAML file for my unsuccessful build:

 

 

/opt/st/stm32cubeide_1.10.1/headless-build.sh -import . #creates a workspace

 

 

the response from the build server is:

 

 

Running with gitlab-runner 16.7.0 (xxxxxx)
  on build server 6tyu7Drk, system ID: s_dddddddddddd
Preparing the "shell" executor
Using Shell (bash) executor...
Preparing environment
Running on ddddddddd...
Getting source from Git repository
Fetching changes...
Initialized empty Git repository in /builds/6tyu7Drk/0/path/projName/.git/
Created fresh repository.
Checking out af7ab01a as detached HEAD (ref is refs/merge-requests/131/head)...
$ cd $CI_PROJECT_DIR
$ /opt/st/stm32cubeide_1.10.1/headless-build.sh -import .
URI: file:/builds/6tyu7Drk/0/path/projName is not valid in the workspace!
Stm32cubeide:
JVM terminated. Exit code=1
/opt/st/stm32cubeide_1.10.1//plugins/com.st.stm32cube.ide.jre.linux64_2.2.0.202203101208/jre/bin/java
-Dosgi.requiredJavaVersion=1.8
-Dosgi.instance.area.default=@user.home/STM32CubeIDE/workspace_1.10.1
-Declipse.buildId=Version 1.10.1
-DproductMaturityGrade=mm
-XX:+UseG1GC
-XX:+UseStringDeduplication
-Xms256m
-Xmx1024m
-jar /opt/st/stm32cubeide_1.10.1//plugins/org.eclipse.equinox.launcher_1.6.400.v20210924-0641.jar
-os linux
-ws gtk
-arch x86_64
-launcher /opt/st/stm32cubeide_1.10.1/stm32cubeide
-name Stm32cubeide
--launcher.library /opt/st/stm32cubeide_1.10.1//plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.2.400.v20211117-0650/eclipse_11600.so
-startup /opt/st/stm32cubeide_1.10.1//plugins/org.eclipse.equinox.launcher_1.6.400.v20210924-0641.jar
--launcher.overrideVmargs
-exitdata 23
-application org.eclipse.cdt.managedbuilder.core.headlessbuild
-import .
-vm /opt/st/stm32cubeide_1.10.1//plugins/com.st.stm32cube.ide.jre.linux64_2.2.0.202203101208/jre/bin/java
-vmargs
-Dosgi.requiredJavaVersion=1.8
-Dosgi.instance.area.default=@user.home/STM32CubeIDE/workspace_1.10.1
-Declipse.buildId=Version 1.10.1
-DproductMaturityGrade=mm
-XX:+UseG1GC
-XX:+UseStringDeduplication
-Xms256m
-Xmx1024m
-jar /opt/st/stm32cubeide_1.10.1//plugins/org.eclipse.equinox.launcher_1.6.400.v20210924-0641.jar 
ERROR: Job failed: exit status 1

 

 

 

Can anyone help me with this issue? Thanks!

 

BR,

S

1 ACCEPTED SOLUTION

Accepted Solutions
stanley.setiawan
Associate II

Solved by reinstalling the docker image. For some reason, the old built data is somehow still stored there, hence there is a conflict that I couldn't understand. Hence, by reinstalling the docker image, the build was ok.

View solution in original post

1 REPLY 1
stanley.setiawan
Associate II

Solved by reinstalling the docker image. For some reason, the old built data is somehow still stored there, hence there is a conflict that I couldn't understand. Hence, by reinstalling the docker image, the build was ok.