Skip to content

Conversation

@xtao
Copy link

@xtao xtao commented Dec 27, 2016

  1. Add stage yaml

说明:
在 lain config 里面设置 stage 变量,lain build PHASE 的时候,会读取这个 stage 的值,载入对应的 lain.STAGE.yaml 的配置。同理: lain tag PHASE, lain push PHASE, lain deploy PHASE

@xtao
Copy link
Author

xtao commented Dec 27, 2016

依赖这个: laincloud/lain-sdk#8

@panli889
Copy link
Member

@xtao 构建 meta 镜像的时候,现在应该还是会把 lain.yaml 拷到镜像里面而不是拷贝 lain.STAGE.yaml 吧

@xtao
Copy link
Author

xtao commented Dec 27, 2016

@panli889 改了 SDK 了

check_phase(phase)
yml = lain_yaml(ignore_prepare=True)
stage = get_phase_stage(phase)
yml = lain_yaml(ignore_prepare=True, stage)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

stage=stage?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我改一下这个,有很多地方还没改全,这个 stage yaml 的 feature 准备合入主干么?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我觉得可以合啊,挺好的,正好有些app现在部署还要修改 lain.yaml 才行。。

@arg('--release', help="build from build image if it exists")
@arg('--push', help="tag release and meta image with version and push to registry")
def build(push=False, release=False):
@arg('phase', help="lain cluster phase id, can be added by lain config save")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--phase?

Copy link
Author

@xtao xtao Dec 28, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@panli889 有个问题,就是 --phase 支持 lain buildlain build local 么?
还是说需要 lain build --phase local ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

应该是需要 lain build --phase local,你是想弄成哪种?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@panli889 期望不改变原来的行为,并且自然的支持。期望是 支持 lain build 和 lain build local,不期望加个 --phase。我刚才试了一下,--phase 需要输入 --phase,我研究一下怎么改..

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

没找到方法,就先 --phase 吧。。感觉有点搓。。

@iwinux
Copy link

iwinux commented Jan 10, 2017

@xtao 使用方式是 lain CMD --phase PHASE local?

@xtao
Copy link
Author

xtao commented Jan 11, 2017

@iwinux lain build 没有留 phase 的接口,需要使用 lain build --phase local-stage 类似这样的。其他的应该可以直接 lain deploy local-stage 这样

@panli889
Copy link
Member

@xtao 这个应该已经 ok 了吧,我觉得可以 merge 了

@xtao
Copy link
Author

xtao commented Jan 12, 2017

@panli889 lain deploy stage 的时候,还有个 bug,我还没有修

@bibaijin
Copy link
Contributor

lain deploy stage 的 bug 修复了吗? @xtao

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants