Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 6d8d30b3 authored by PETIT Manuel's avatar PETIT Manuel
Browse files

Add Content-Type header to file upload in CI pipeline

The "Content-Type: application/zip" header was added to the curl command in the GitLab CI pipeline.
parent 3adcb907
No related branches found
No related tags found
No related merge requests found
Pipeline #1097458 failed
...@@ -115,7 +115,7 @@ create_release: ...@@ -115,7 +115,7 @@ create_release:
script: script:
- echo "Creating release and attaching tutorials.zip..." - echo "Creating release and attaching tutorials.zip..."
- echo "Using tag $CI_COMMIT_REF_NAME" - echo "Using tag $CI_COMMIT_REF_NAME"
- 'curl --header "PRIVATE-TOKEN: $CI_JOB_TOKEN" --upload-file tutorials.zip "$CI_API_V4_URL/projects/$CI_PROJECT_ID/uploads" > upload_response.json' - 'curl --header "PRIVATE-TOKEN: $CI_JOB_TOKEN" -header "Content-Type: application/zip" --upload-file tutorials.zip "$CI_API_V4_URL/projects/$CI_PROJECT_ID/uploads" > upload_response.json'
- cat upload_response.json - cat upload_response.json
- 'UPLOAD_URL=$(jq -r ".url" upload_response.json)' - 'UPLOAD_URL=$(jq -r ".url" upload_response.json)'
- 'if [ -z "$UPLOAD_URL" ] || [ "$UPLOAD_URL" = "null" ]; then echo "Error: Unable to extract upload URL!" && cat upload_response.json && exit 1; fi' - 'if [ -z "$UPLOAD_URL" ] || [ "$UPLOAD_URL" = "null" ]; then echo "Error: Unable to extract upload URL!" && cat upload_response.json && exit 1; fi'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment