validate_mr: fix pipeline
General MR
Summary
A few fixes in here:
- re-add retry logic that somehow vanished in a rebase
- use the correct token
- use the project id rather than the project path which would need to be URL escaped.
Relevant logs/screenshots
Tested locally using a snippet of this pipeline.
Current pipeline fails, but when the URL is escaped it works:
danieldides@BPH-MAC14 ~/P/b/p/kyverno-policies (dd/dan-kyverno-policies-master)> curl https://repo1.dso.mil/api/v4/projects/big-bang/pipeline-templates/package-validation/merge_requests/277
{"error":"404 Not Found"}⏎ danieldides@BPH-MAC14 ~/P/b/p/kyverno-policies (dd/dan-kyverno-policies-master)> curl https://repo1.dso.mil/api/v4/projects/big-bang%2Fpipeline-templates%2Fpackage-validation/merge_requests/277
{"id":181106,"iid":277,"project_id":2906,"title":"Williams upgrade test"
Using the project ID (found in the CI variables injected) also works:
danieldides@BPH-MAC14 ~/P/b/p/kyverno-policies (dd/dan-kyverno-policies-master)> curl https://repo1.dso.mil/api/v4/projects/2906/merge_requests/277
{"id":181106,"iid":277,"project_id":2906,"title":"Williams upgrade test"
Linked Issue
Closes #263 (closed)
Upgrade Notices
N/A
Edited by Daniel Dides