-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
GitLab-CI微信小程序进行持续集成和持续部署 | zacks's blog #7
Comments
如果ci打包在服务器上,是不是只能把文件下载到本地,然后手动上传小程序发布? |
CI有两步,第一步在服务器上打包,这台服务器是任意的,第二步部署的时候,需要指定在本机上运行(运行时会自动下载上一步打包的文件),这时候就可以调用微信开发者工具自动上传了 |
�好的谢谢,因为我gitlab runner是share runner,公司内网的gitlab上面使用的,跟你的配置不太一样。� |
你可能对gitlab-runner不熟悉,CI部署时,需要本机(mac/windows)安装gitlab-runner并注册到你们公司的gitlab。 然后CI的时候,让gitlab 调本机上的runner,在本机运行部署,相当于替你手动完成了这一步(登录你的电脑并运行命令) 即使是内网,本机连上内网后,本机的runner也是可用的 获取端口和调用上传,见deploy部分的script和参考文档
|
好的谢谢,我去自己的服务器上面测试一下。 |
你好,runner跑起来了。但是自动上传的时候出现了一个错误 我的小程序用的是wepy框架构建的项目,会有什么影响吗? |
可以了。发布成功了!谢谢! |
有时候会出现:{"code":40000,"error":"错误 Error: 缺少文件, error: /app.json not found"}Creating cache master... |
@cgygd 这应该是你CI配置的问题了,注意要用artifacts,不要用cache GitLab-CI中的artifacts使用研究 |
@zacksleo �好的,thx。 |
所以需要通过tags来指定部署用的runner呀,然后传递文件用artifacts,不要用cache |
https://zacksleo.github.io/2018/04/08/GitLab-CI%E5%BE%AE%E4%BF%A1%E5%B0%8F%E7%A8%8B%E5%BA%8F%E8%BF%9B%E8%A1%8C%E6%8C%81%E7%BB%AD%E9%9B%86%E6%88%90%E5%92%8C%E6%8C%81%E7%BB%AD%E9%83%A8%E7%BD%B2/
The text was updated successfully, but these errors were encountered: