由两部分组成的问题:
-
我尝试使用gitpod预构建是否正确?
-
如何测试我对.gitpod.yml的更改?我希望步骤何时运行,我希望看到什么输出?
我的计划是在我的git存储库中有几个分支,同事们正在处理几个问题。我想设置他们的初始环境。我知道有些事情需要在docker映像中完成,有些事情可以在.gitpod.yml中指定——这里的重点是我在预构建中可以做什么。
所以我创建了一个分支,并在其中更新我的基本.gitpod.yml
ports:
- port: 3000
github:
prebuilds:
# enable for the default branch (defaults to true)
master: true
# enable for all branches in this repo (defaults to false)
branches: true
# enable for pull requests coming from this repo (defaults to true)
pullRequests: true
# enable for pull requests coming from forks (defaults to false)
pullRequestsFromForks: false
# add a check to pull requests (defaults to true)
addCheck: true
# add a "Review in Gitpod" button as a comment to pull requests (defaults to false)
addComment: false
# add a "Review in Gitpod" button to the pull request's description (defaults to false)
addBadge: true
我相信我已经启用了gitpod构建:
然后,我尝试在预构建中添加一些琐碎的工作(最终我想做一些更有用的事情,比如在一个窗格中启动nodeexpress)。
github:
prebuilds:
master: true
# etc ... lines elided
tasks:
- name: "Lefty"
command: echo 'left'
- name: "Dexter"
command: echo 'right'
openMode: split-right
我查了一下零钱,然后推到分行。我的期望是,在某个时候,我会看到一个带有一些回声文本的拆分终端窗口。
我不清楚工作空间的生命周期应该在什么时候发生。我尝试过这个序列:
-
推送更新的.gitpod.yml
-
关闭工作区,删除工作区
-
从分支URL创建新工作区
这带来了一个带有更新的.gitpod.yml的新工作区,但我看不到预构建的证据。我欢迎再教育;-)