使用gitlab页面触发另一个项目管道

发布于 2025-01-31 00:04:17 字数 891 浏览 2 评论 0原文

我正在尝试在gitlab页面上创建一个表单(仅成员才能访问),并且在提交时,我想触发另一个项目的管道,该项目将使用所有表单值并将其用作管道变量。

我使用Hugo Template创建了GitLab页面项目,并运行了成功发布该网站的管道。

我更改了模板以接受输入并提交到其他项目的管道URL。

我在这里找到了一个很好的例子 https://gitlab.com/guided - 探索/gitlab-api/custom-pipeline-form ,但OAuth隐式赠款流量已弃用且不安全。

我查看了gitlab doc查找其他选项,并遇到 https://docs.gitlab.com/ee/api/oauth2.html#authorization-code-with-with-with-proof--prof--------------------------------------------带有重定向/回调URL的应用程序设置。

我不是100%确定此回调或重定向URL是什么。我尝试了我的gitlab页面URL,并且它因而失败。重定向的URI无效。

想知道是否有人从事类似的要求。任何建议都将不胜感激。

I am trying to create a form on Gitlab pages (only accessible to Members) and on submit I want to trigger a pipeline of another project which will use all the form values and use it as pipeline variables.

I used Hugo template to create the Gitlab Page project and ran pipeline which is successfully publishing the website.

I changed the template to accept inputs and submit to other project's pipeline URL.

I found a really good example here https://gitlab.com/guided-explorations/gitlab-api/custom-pipeline-form but OAuth implicit Grant flow is deprecated and not secure.

I looked at Gitlab doc for other option and come across https://docs.gitlab.com/ee/api/oauth2.html#authorization-code-with-proof-key-for-code-exchange-pkce which requires an Application setup with redirect/callback URL.

I am not 100% sure what this callback or redirect URL would be. I tried my Gitlab pages URL and it failed with The redirect URI included is not valid.

Wonder if anyone has worked on a similar requirement. Any suggestions will be highly appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文