从CircleCI部署到Azure

编程入门 行业动态 更新时间:2024-10-22 11:42:46
本文介绍了从CircleCI部署到Azure的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我是第一次使用CircleCI,但无法发布到Azure.

该文档没有Azure的示例,但有AWS的示例,还有Azure的注释,上面写着要部署到Azure,请使用与上面使用适当命令的示例相似的作业."

如果有人有一个很好的示例YAML文件,那么如果不按正确的方向进行操作将很方便.到目前为止,我认为我已经解决了以下问题.

  • 我需要一个将安装Azure CLI的配置

  • 我需要将我的Azure部署凭据放在环境变量中,并且

  • 我需要在YAML文件中运行deploy命令,以压缩所有正确的文件并部署到我的Azure应用服务.

  • 我不知道上面的方法是否正确,或者如何做,但这是我目前的理解.

    我还将其发布在 CircleCi论坛.

    仅添加一些信息,AWS版本的配置文件使用以下命令:

    -运行:名称:部署到S3命令:aws s3 sync jekyll/_site/docs s3://circle-production-static-site/docs/--delete

    所以我想我正在寻找Azure等效产品.

    解决方案

    最简单的方法是,在azure管理控制台上,您可以从源代码管理中将其设置为部署,并且可以点击这两个链接

    medium/@strid/automatic-deploy-to-azure-web-app-with-circle-ci-v2-0-1e4bda0626e5 www.bradleyportnoy/如何从Circle-ci/

    如果要将文件从ci复制到iis服务器或azure,则需要ssh访问密钥等.并且在circle.yml的Dependencies部分中,您可以有这样的一行:/p>

    部署:生产:分支机构:硕士命令:-scp -r circle-pushing/* username @ my-server:/path-to-put-files-on-server/

    推圆"是您的存储库名称,即在GitHub或Bitbucket中的名称,其余是您要将文件上传到的服务器的主机名和文件路径.

    这也许可以帮助您更好地理解它 docs.microsoft/zh-CN/azure/virtual-machines/linux/copy-files-to-linux-vm-using-scp

    I'm using CircleCI for the first time and having trouble publishing to Azure.

    The docs don't have an example for Azure, they have an example for AWS and a note for Azure saying "To deploy to Azure, use a similar job to the above example that uses an appropriate command."

    If anybody has an example YAML file that would be great, if not a nudge in the right direction would be handy. So far I think I've worked out the following.

  • I need a config that will install the Azure CLI

  • I need to put my Azure deployment credentials in an environment variable and

  • I need to run a deploy command in the YAML file to zip up all the right files and deploy to my Azure app service.

  • I have no idea if the above is correct, or how to do it, but that's my understanding right now.

    I've also posted this on the CircleCi forum.

    EDIT: Just to add a little more info, the AWS version of the config file used the following command:

    - run: name: Deploy to S3 command: aws s3 sync jekyll/_site/docs s3://circle-production-static-site/docs/ --delete

    So I guess I'm looking for the Azure equivalent.

    解决方案

    The easiest way is that on the azure management console you setup as deployment from source control and you can follow this two links

    medium/@strid/automatic-deploy-to-azure-web-app-with-circle-ci-v2-0-1e4bda0626e5 www.bradleyportnoy/how-to-set-up-continuous-deployment-to-azure-from-circle-ci/

    if you want to do the copy of the files from ci to the iis server or azure you will need ssh access the keys etc.. and In the Dependencies section of circle.yml you can have a line such as this:

    deployment: production: branch: master commands: - scp -r circle-pushing/* username@my-server:/path-to-put-files-on-server/

    "circle-pushing" is your repo name, which is whatever it’s called in GitHub or Bitbucket, and the rest is the hostname and filepath of the server you want to upload files to.

    and probably this could help you understand it better docs.microsoft/en-us/azure/virtual-machines/linux/copy-files-to-linux-vm-using-scp

    更多推荐

    从CircleCI部署到Azure

    本文发布于:2023-11-26 00:01:36,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1631863.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:CircleCI   Azure

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!