社区所有版块导航
Python
python开源   Django   Python   DjangoApp   pycharm  
DATA
docker   Elasticsearch  
aigc
aigc   chatgpt  
WEB开发
linux   MongoDB   Redis   DATABASE   NGINX   其他Web框架   web工具   zookeeper   tornado   NoSql   Bootstrap   js   peewee   Git   bottle   IE   MQ   Jquery  
机器学习
机器学习算法  
Python88.com
反馈   公告   社区推广  
产品
短视频  
印度
印度  
Py学习  »  Git

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

Hubert Ströbitzer • 6 年前 • 140 次点击  

我在玩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
 
140 次点击  
文章 [ 1 ]  |  最新文章 6 年前