productize / kicad-automation-scripts

A bunch of scripts to automate KiCad processes
Apache License 2.0
88 stars 46 forks source link

X server error using Docker with Gitlab runner #3

Closed damped closed 5 years ago

damped commented 5 years ago

I am having a problem with running the Docker version in a Gitlab CI pipeline

This is how I tried to run it:

image: productize/kicad-automation-scripts

pages:
    script:
        - mkdir public
        - python -m kicad-automation.eeschema.schematic export ./pcb/pcb.sch ./public

>>> needed to add artifacts path here <<<

Unfortunately I get the following error:

$ python -m kicad-automation.eeschema.schematic export ./pcb/pcb.sch ./public

Initial recording window is set to:
X:0   Y:0    Width:800    Height:600
Adjusted recording window is set to:
X:0   Y:4    Width:800    Height:592
Your window manager appears to be Unknown

Initializing...
Output file: /builds/damped/kicadci/public/export_schematic_screencast.ogv
Capturing!
INFO:util.ui_automation:Waiting for Project Rescue Helper window...

(eeschema:19): Gtk-WARNING **: 03:15:43.179: Attempting to store changes into `/root/.local/share/recently-used.xbel', but failed: Failed to create file “/root/.local/share/recently-used.xbel.NYIX9Z”: No such file or directory

(eeschema:19): Gtk-WARNING **: 03:15:43.179: Attempting to set the permissions of `/root/.local/share/recently-used.xbel', but failed: No such file or directory
INFO:util.ui_automation:Found Project Rescue Helper window
DEBUG:util.ui_automation:Window id: 
INFO:__main__:Dismiss eeschema library warning window

(eeschema:19): Gtk-WARNING **: 03:15:43.335: Attempting to store changes into `/root/.local/share/recently-used.xbel', but failed: Failed to create file “/root/.local/share/recently-used.xbel.MSEY9Z”: No such file or directory

(eeschema:19): Gtk-WARNING **: 03:15:43.335: Attempting to set the permissions of `/root/.local/share/recently-used.xbel', but failed: No such file or directory
INFO:util.ui_automation:Waiting for eeschema window...
INFO:util.ui_automation:Found eeschema window
DEBUG:util.ui_automation:Window id: 
INFO:__main__:Focus main eeschema window
INFO:__main__:Open File->Plot
INFO:util.ui_automation:Waiting for plot window...
INFO:util.ui_automation:Found plot window
DEBUG:util.ui_automation:Window id: 
INFO:__main__:Paste output directory
INFO:__main__:Select SVG plot format
INFO:__main__:Plot
DEBUG:util.file_util:[popenfile(path='/root/.cache/kicad/eeschema-root', fd=5, position=3, mode='w', flags=32769), popenfile(path='/root/.cache/kicad/_builds_damped_kicadci_pcb_pcb.sch.lock', fd=7, position=3, mode='w', flags=32769), popenfile(path='/builds/damped/kicadci/public/pcb.svg', fd=10, position=188416, mode='w', flags=32769)]
DEBUG:util.file_util:Waiting for process to close file
DEBUG:util.file_util:[popenfile(path='/root/.cache/kicad/eeschema-root', fd=5, position=3, mode='w', flags=32769), popenfile(path='/root/.cache/kicad/_builds_damped_kicadci_pcb_pcb.sch.lock', fd=7, position=3, mode='w', flags=32769)]
Shutting down....

Done.
Written 287338 bytes
(287338 of which were video data and 0 audio data)

..
Goodbye!
XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":1103689275"
      after 15 requests (13 known processed) with 0 events remaining.

I am assuming that something is going wrong with the dummy X server but I don't know where to start looking.

damped commented 5 years ago

Turns out everything was working fine! I just forgot to add the artifact path...

The cleaned up working version:

image: productize/kicad-automation-scripts

pages:
    script:
        - mkdir public
        - ls
        - python -m kicad-automation.eeschema.schematic export ./pcb/pcb.sch ./public
        - ls public/

    artifacts:
            paths:
                    - public
    only:
            - master

Thanks for making such a great tool!