Issue with west build command, when called from the Gitlab runner

Hi, 

I am facing the following issue when i am calling west build from gitlab runner. 

                              west: unknown command "build"; workspace C:\ncs\v2.5.0 does not define this extension command -- try "west help"

But locally in the server PC, with the same commands I can generate the build.

I am setting the environment path in the terminal as follows before calling the build command,

PATH=C:\ncs\toolchains\c57af46cb7;C:\ncs\toolchains\c57af46cb7\mingw64\bin;C:\ncs\toolchains\c57af46cb7\bin;C:\ncs\toolchains\c57af46cb7\opt\bin;C:\ncs\toolchains\c57af46cb7\opt\bin\Scripts;C:\ncs\toolchains\c57af46cb7\opt\nanopb\generator-bin;C:\ncs\toolchains\c57af46cb7\opt\zephyr-sdk\aarch64-zephyr-elf\bin;C:\ncs\toolchains\c57af46cb7\opt\zephyr-sdk\x86_64-zephyr-elf\bin;C:\ncs\toolchains\c57af46cb7\opt\zephyr-sdk\arm-zephyr-eabi\bin;%PATH%
SET PYTHONPATH=C:\ncs\toolchains\c57af46cb7\opt\bin;C:\ncs\toolchains\c57af46cb7\opt\bin\Lib;C:\ncs\toolchains\c57af46cb7\opt\bin\Lib\site-packages
SET ZEPHYR_TOOLCHAIN_VARIANT=zephyr
SET ZEPHYR_SDK_INSTALL_DIR=C:\ncs\toolchains\c57af46cb7\opt\zephyr-sdk
SET ZEPHYR_BASE=C:\ncs\v2.5.0\zephyr

This is the same ncs folder used for my local build.

Also, i am not getting any access issue errors when called from gitlab runner.

Could anyone help me on this issue?

Thanks in advance

Parents Reply Children
  • Hi, 

    Can you provide details about your setup and your build configuration?

    How do you include west? What is your configuration on the runner side?

    Best regards,
    Dejan

  • I have downloaded sdk and toolchain using nrf connect extension in VS Code

    I am using nRF connect sdk version v2.5.0 and toolchain nRF v2.5.0


    I am using the following commands to build from git

    SET PATH=C:\ncs\toolchains\b620d30767;C:\ncs\toolchains\b620d30767\mingw64\bin;C:\ncs\toolchains\b620d30767\bin;C:\ncs\toolchains\b620d30767\opt\bin;C:\ncs\toolchains\b620d30767\opt\bin\Scripts;C:\ncs\toolchains\b620d30767\opt\nanopb\generator-bin;C:\ncs\toolchains\b620d30767\opt\zephyr-sdk\aarch64-zephyr-elf\bin;C:\ncs\toolchains\b620d30767\opt\zephyr-sdk\x86_64-zephyr-elf\bin;C:\ncs\toolchains\b620d30767\opt\zephyr-sdk\arm-zephyr-eabi\bin;%PATH%
    SET PYTHONPATH=C:\ncs\toolchains\b620d30767\opt\bin;C:\ncs\toolchains\b620d30767\opt\bin\Lib;C:\ncs\toolchains\b620d30767\opt\bin\Lib\site-packages
    SET ZEPHYR_TOOLCHAIN_VARIANT=zephyr
    SET ZEPHYR_SDK_INSTALL_DIR=C:\ncs\toolchains\b620d30767\opt\zephyr-sdk
    SET ZEPHYR_BASE=C:\ncs\v2.5.0\zephyr

    echo "env cmd completed successfully"
    dir
    west build -b nrf5340dk_nrf5340_cpuapp_ns -p always project

  • Hi,

    Can you provide additional details about your environment setup and configuration on the runner side?
    Do you use containers?

    Have you tried to start toolchain environment using "nrfutil toolchain-manager launch" command?

    EDIT: You could try to run "west update" in that workspace and see if it completes without errors.

    Best regards,
    Dejan

Related