Py学习  »  Git

在google cloud build中使用git容器提交git

Hubert Ströbitzer • 5 年前 • 136 次点击  

我在玩google cloud build。在我的用例中,我必须在构建期间更改一个文件并将其提交到Git中。

我画了下面的构建步骤,它们可以工作。但这是一个简单的Git承诺的很多仪式。

你有什么建议如何缩短这些东西吗?

steps:
- name: alpine
  args: ["touch", "some-file.txt"]
- name: gcr.io/cloud-builders/git
  args: [ "config", "--global", "user.name", "batman" ]
- name: gcr.io/cloud-builders/git
  args: [ "config", "--global", "user.email", "batman@gotham.city" ]
- name: gcr.io/cloud-builders/git
  args: [ "add", "-A" ]
- name: gcr.io/cloud-builders/git
  args: [ 'commit', '-m', 'batmans commit' ]
- name: gcr.io/cloud-builders/git
  args: [ 'push', 'https://source.developers.google.com/p/$PROJECT_ID/r/my-repo', 'master']
Python社区是高质量的Python/Django开发社区
本文地址:http://www.python88.com/topic/38536
 
136 次点击  
文章 [ 1 ]  |  最新文章 5 年前