Commit 498f1f49 authored by Nick Gaskill's avatar Nick Gaskill

Merge branch 'asmaa.hassan-master-patch-60532' into 'master'

Add an example for publishing a package using a Windows runner

See merge request gitlab-org/gitlab!66315
parents 98bd252a 7684db83
......@@ -131,6 +131,18 @@ download:
- 'wget --header="JOB-TOKEN: $CI_JOB_TOKEN" ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/my_package/0.0.1/file.txt'
```
When using a Windows runner with PowerShell, you must use `Invoke-WebRequest` or `Invoke-RestMethod`
instead of `curl` in the `upload` and `download` stages.
For example:
```yaml
upload:
stage: upload
script:
- Invoke-RestMethod -Headers @{ "JOB-TOKEN"="$CI_JOB_TOKEN" } -InFile path/to/file.txt -uri "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/my_package/0.0.1/file.txt" -Method put
```
### Enable or disable generic packages in the Package Registry
Support for generic packages is under development but ready for production use.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment