如何手动触发容器刷新 [英] How to trigger manually container refresh
问题描述
我在Azure中使用WebApp for Container,目前在Jenkins中构建自己的容器并将其推送到自己的私有注册表中。
I am using WebApp for Container in Azure, currently I build my own containers in Jenkins and push it to my own private registry.
我自己的私有注册表非常基本并且没有WebHook的功能,因此我想在Jenkins工作流中添加以触发容器刷新。
My Own private registry is very basic and doesn't have functionality for WebHook, so I would like to add in my Jenkins workflow to trigger the container refresh.
我已按照以下步骤操作: https://docs.microsoft.com / en-us / azure / app-service / containers / app-service-linux-ci-cd ,我得到了URL,但是当我尝试卷曲时,得到了:
I have followed these steps: https://docs.microsoft.com/en-us/azure/app-service/containers/app-service-linux-ci-cd and I got the URL but when I try to curl to it I got:
401-未经授权:由于凭据无效而拒绝访问。如果我执行GET请求,例如:
401 - Unauthorized: Access is denied due to invalid credentials. if I do a GET request like:
curl https:// $ user:password@mysite.scm.azurewebsites.net/docker/hook
curl https://$user:password@mysite.scm.azurewebsites.net/docker/hook
和
HTTP错误411。请求必须分块或具有内容长度。如果我执行POST请求
HTTP Error 411. The request must be chunked or have a content length. if I do a POST request
curl -X POST curl https:// $ user:password@mysite.scm.azurewebsites.net/docker/hook
curl -X POST curl https://$user:password@mysite.scm.azurewebsites.net/docker/hook
我应该如何使用Curl进行请求以触发此操作?
How I should do the request with Curl to trigger this?
谢谢
推荐答案
解决方案:
简单为:
curl -X POST'curl https:// $ user:password@mysite.scm.azurewebsites.net/docker / hook'-H''-d''
curl -X POST 'curl https://$user:password@mysite.scm.azurewebsites.net/docker/hook' -H '' -d ''
这篇关于如何手动触发容器刷新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!