Generate artifact file

I’m trying to generate the artifact file but the command is not working.

spider@D:~$ sudo mender-artifact write directory -n myartifact -t Debian -o myartifact.mender --directory /home/spider/myartifact --script ArtifactReboot_Enter_033_index-html.sh

output :slight_smile:

Failed to write the rootfs-image.checksum to the artifact: Failed to generate the checksum for the payload

Please give me the relevent solution.

I’m using this command to pack a single binary in my CI/CD.

export APP_NAME=testapp # Is defined in package.json
export APP_VERSION=1.0.1 
export DEVICE_TYPE=RadxaZeroV1.51
export MENDER_ARTIFACT=$APP_NAME-$APP_VERSION.mender
export MENDER_UPDATE_MODULE=install-$APP_NAME
export MENDER_SERVER_URI="https://eu.hosted.mender.io"

mender-artifact write module-image \
        -t $DEVICE_TYPE \
        -o $CI_PROJECT_DIR/bin/$MENDER_ARTIFACT \
        -T $MENDER_UPDATE_MODULE \
        -n $APP_NAME-$APP_VERSION \
        -f $CI_PROJECT_DIR/bin/$APP_NAME

Later it will be pushed to the server

mender-cli artifacts upload \
        --server $MENDER_SERVER_URI \
        --token-value $MENDER_TOKEN \
        --description 'Packaged from GitLab CI/CD' \
        $CI_PROJECT_DIR/bin/$MENDER_ARTIFACT

With that pipeline I can push my nodejs app to my SBC and install it.

Maybe check the file permissions with ls -lah /home/spider/myartifact.