I have an upload gitlab-ci.yaml routine which I got from a gist.. but getting an error.. anyone have some idea how to upload a .zip to generic? do I need to change token types ? I am on gitlab.com with their provided runners
# Refer to: https://gitlab.com/gitlab-org/release-cli/-/tree/master/docs/examples/release-assets-as-generic-package/
upload:
stage: upload
image: curlimages/curl:latest
script:
- ls -la
- |
PACKAGE_VERSION=$(cat package.json | grep version | head -1 | awk -F: '{ print $2 }' | sed 's/[",]//g')
PACKAGE_REGISTRY_URL="https://gitlab.com/api/v4/projects/${CI_PROJECT_ID}/packages/generic/${CI_PROJECT_NAME}/${PACKAGE_VERSION}"
curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file ${CI_PROJECT_NAME}.zip ${PACKAGE_REGISTRY_URL}/${CI_PROJECT_NAME}.zip
echo 'Package uploaded!'
here's the erroring run
$ PACKAGE_VERSION=$(cat package.json | grep version | head -1 | awk -F: '{ print $2 }' | sed 's/[",]//g') # collapsed multi-line command
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1861k 100 27 100 1861k 44 3100k -{"error":"file is missing"}-:--:-- --:--:-- --:--:-- 3102k
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (7) Failed to connect to 0.0.0.0 port 80 after 1 ms: Connection refused
Cleaning up project directory and file based variables 00:00
ERROR: Job failed: exit code 7