【问题标题】:Jenkins deployment on GCP VM via shell script通过 shell 脚本在 GCP VM 上部署 Jenkins
【发布时间】:2018-12-25 05:35:06
【问题描述】:

我是 Google Cloud Platform 的新手,想通过 Jenkins 构建部署管道。我有一个正在运行的虚拟机,我通过仪表板上给出的 SSH 按钮进行连接并进行部署。

与 AWS 我获得 pem 文件进行连接的地方不同...我在这里没有要连接的文件。现在,在 Jenkins 中,我想通过 shell 脚本连接并在 VM 上部署最新代码 - 我不知道该怎么做。

类似

ssh -i @some-file name:ip

请帮助我如何通过 Jenkins 中的 shell 连接/ssh gcp vm 并进行部署。需要一步一步的回答。谢谢!

【问题讨论】:

    标签: jenkins deployment google-cloud-platform google-compute-engine


    【解决方案1】:

    VM 实例中仍然存储有 PEM 文件,您可以在 $HOME/.ssh 中找到它们。 请参阅stack post 了解如何在 GCE 上检索 SSH 密钥

    【讨论】:

    • 是的,如果您愿意,Google 会提供完全托管的 SSH 密钥,否则,无论云提供商如何,SSH 协议都是 Linux 的标准
    猜你喜欢
    • 2020-05-31
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-11-23
    • 1970-01-01
    • 2017-04-07
    • 2018-12-03
    • 2018-01-23
    相关资源
    最近更新 更多