I like to add commit message to my master brach when i create new release.
With that commit message will trigger nightly deployment process.
When i try the below commad
Pre-depoyment:
stage: CodeCommit
rules:
- if: $CI_COMMIT_TAG
script:
- echo $CI_COMMIT_TAG
- |
curl --request POST --header 'PRIVATE-TOKEN: ${CI_JOB_TOKEN}' --data '{"branch": "master", "commit_message": "RedyForDeploy"}' \
"https://gitlab.example.com/api/v4/projects/13083/repository/files/app%2Fproject%2Erb"
Powershell Output:
$ curl --request POST --header ‘PRIVATE-TOKEN: ${CI_JOB_TOKEN}’ --data ‘{“branch”: “master”, “commit_message”: “create a new file”}’ \ # collapsed multi-line command
Invoke-WebRequest : A positional parameter cannot be found that accepts argument ‘POST’.
At C:\Windows\TEMP\build_script078740762\script.ps1:245 char:1
-
curl --request POST --header ‘PRIVATE-TOKEN: ${CI_JOB_TOKEN}’ --data …
)+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
CategoryInfo : InvalidArgument: ( [Invoke-WebRequest], ParameterBindingException
) + FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
https://gitlab.example.com/api/v4/projects/13083/repository/files/app%2Fproject.rb