Hi Folks,
I’m trying to setup a CI pipeline for my device OTA updates using hosted Mender and I’m having some difficulty getting artifact uploads working from a GitHub Actions workflow.
The TLDR is that running mender-cli artifacts upload
from a GitHub Actions workflow always ends with the following error:
FAILURE: POST /artifacts request failed: Post "https://hosted.mender.io/api/management/v1/deployments/artifacts": EOF
The artifact is 2.1 GiB and uploading from my dev machine or through the browser UI works fine. The issue only occurs when uploading from a GitHub Actions workflow.
I have a script wrapping the invocation of mender-cli
but the commands that get run are as follows:
mender-cli login --username '***' --password '***'
mender-cli artifacts upload --description "Company Device box-v0_8_057" "/home/runner/work/company/device/app/mender-convert/deploy/box-v0_8_057-x86_64-mender.mender"
The .mender
file is generated using the dockerized version of mender-convert
:
./docker-mender-convert --disk-image input/box-v0_8_057.img --config configs/box-config-for-mender-convert --overlay box_rootfs_overlay
And the base image is generated using mkosi
.
Running the same set of commands on my dev machine results in the artifact getting uploaded to hosted Mender without any issues so the error is somehow related to the fact that the upload is happening from a GitHub Actions workflow.
The major differences between the GHA workflow and my dev machine as far as I can tell are:
- My home upload speed maxes out at
4 MiB
while the GHA workflow uploads the artifact at26.68 MiB
- The CI mender user has the
Releases Manager, Deployments Manager
roles while my mender account has theAdmin
role
The GHA workflow runs in a ubuntu-20.04
VM with mender-cli
version 1.7.0 installed from https://downloads.mender.io/mender-cli/1.7.0/linux/mender-cli
I looked at some of the topics on mender hub mentioning similar issues but none of them seem to offer a solution to my problem.
I’ve attached the full output of the mender-cli artifacts upload
invocation from the GHA workflow:
mender-artifact-upload-gha-error-log.yaml (666.0 KB)
Any input or suggestions on how to get this working are very welcome.
Thank you.