Headless build of armory project

Hi all!

Is there some simple way to build all Armory project headless?
i.e. I set up Jenkins job, it pulls all project from git, runs something
and uploads build result? This might be good for testing and building
in solid environment. I think some python script which pushes “Build” button after selecting
appropriate preset would be great. So something like blender root.blend -P build.py

Hey,

I was doing some experiments with this a few weeks ago. Here is what I did on my linux webserver:
Create a file named armbuilder.py:

armbuilder.py:
import bpy;
bpy.ops.arm_exporterlist.new_item();
bpy.data.worlds["Arm"].arm_exporterlist_index=0;
bpy.ops.arm.publish_project();

Create a shell script that is called whenever the build files update (I called it armbuilder):

armbuilder
#!/bin/bash
~/Armory/armory-linux/blender ~/Armory/mygame.blend --background --python ~/Armory/armbuilder.py

Calling the armbuilder script will build the game, using whichever preset you have currently selected in the exporter settings.

1 Like

Thanks a lot! Need to experiment on this to do some advanced solution…