Replace this template with your information
I have created a release stage in my CI/CD pipeline that uploads binary build files to package registry, per this doc: Release fields | GitLab
I am now trying to have this link to the binary files be included in release evidence, using the artifacts:reports:annotations report type (GitLab CI/CD artifacts reports types | GitLab). Pipeline stage is below:
upload:
stage: upload
image: curlimages/curl:latest
rules:
- if: $CI_COMMIT_TAG
script:
- 'curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file $BUILD_ARTIFACT ${PACKAGE_REGISTRY_URL}/${CI_COMMIT_TAG}/${BUILD_ARTIFACT}'
# Create a json file containing the URL of the uploaded firmware, for inclusion as release evidence
# See: https://docs.gitlab.com/ee/user/project/releases/release_evidence.html#include-report-artifacts-as-release-evidence
- 'echo {\"build_output\":\"${PACKAGE_REGISTRY_URL}/${CI_COMMIT_TAG}/${BUILD_ARTIFACT}\"} > build_output.json'
artifacts:
expire_in: 1 week
paths:
- ./build_output.json
reports:
annotations: ./build_output.json
Pipeline fails with:
WARNING: Uploading artifacts as "annotations" to coordinator... POST https://gitlab.com/api/v4/jobs/5558238158/artifacts: 400 Bad Request (Validation failed: Data must be a valid json schema) id=5558238158 responseStatus=400 Bad Request status=400 token=64_Tfx6U
WARNING: Retrying... context=artifacts-uploader error=invalid argument
WARNING: Uploading artifacts as "annotations" to coordinator... POST https://gitlab.com/api/v4/jobs/5558238158/artifacts: 400 Bad Request (Validation failed: Data must be a valid json schema) id=5558238158 responseStatus=400 Bad Request status=400 token=64_Tfx6U
FATAL: invalid argument
Pipeline editor complains about syntax with Property annotations is not allowed
. Looks like this report type may not actually be available? I am using gitlab.com (GitLab Enterprise Edition 16.7.0-pre).