Logging Artifacts

To register an artifact in Merkely, you use the Log Artifact command. To get the sha256 for your artifact, you have three options:

  • Provide the docker image and access to the docker daemon - the command will use the docker daemon to query the repoDigest of the docker image. This requires the image to be pushed to a registry first.

  • Provide the full path of the file and access to the file - the command will calculate the sha digest.

  • Explicitly provide the sha256 of the binary and the name of the binary to the command.

Here is an example using a docker image:

docker run \
    --env MERKELY_COMMAND=log_artifact \
    --env MERKELY_FINGERPRINT=docker://acme/road-runner:2.3 \
    --env MERKELY_IS_COMPLIANT="${MERKELY_IS_COMPLIANT}" \
    --env MERKELY_ARTIFACT_GIT_COMMIT="${MERKELY_ARTIFACT_GIT_COMMIT}" \
    --env MERKELY_ARTIFACT_GIT_URL="${MERKELY_ARTIFACT_GIT_URL}" \
    --env MERKELY_CI_BUILD_NUMBER="${MERKELY_CI_BUILD_NUMBER}" \
    --env MERKELY_CI_BUILD_URL="${MERKELY_CI_BUILD_URL}" \
    --env MERKELY_USER_DATA="${MERKELY_USER_DATA}" \
    --env MERKELY_OWNER="${MERKELY_OWNER}" \
    --env MERKELY_PIPELINE="${MERKELY_PIPELINE}" \
    --env MERKELY_API_TOKEN="${MERKELY_API_TOKEN}" \
    --env MERKELY_DRY_RUN="${MERKELY_DRY_RUN}" \
    --rm \
    --volume /var/run/docker.sock:/var/run/docker.sock \
    merkely/change:latest