Bamboo-Angular 4应用程序如何部署 [英] Bamboo - Angular 4 app How to deploy

查看:56
本文介绍了Bamboo-Angular 4应用程序如何部署的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在我的竹子上部署我的angular 4应用程序?

How to deploy my angular 4 application on bamboo?

我只是做一个简单的工作 1. git 2. npm install 3. ng build

I just make a simple job with 1. git 2. npm install 3. ng build

这成功通过,但是接下来我要做什么? 如何在服务器上部署它,以便我可以从浏览器进入应用程序?

This passes succesfully, but what I should make next? How to deploy this on server, that i could get into app from browser?

我试图在tomcat上部署它,但是我没有任何战争.

I tried to deploy this on tomcat, but i don't have any war.

我不知道该怎么办

推荐答案

以下是我用来设置Bamboo部署计划的任务:

Here are the tasks I use to setup a Bamboo deployment plan:

  1. 源代码检出任务:在向Bamboo提供源代码存储库以供部署时,这是Bamboo中的标准任务(有关更多信息,请参见: NPM任务:使用此命令cache clean -f清除服务器node_modules的高速缓存,如果不这样做,可能会导致权限问题(有关更多信息,请参见: Npm,请尝试再次以root/administrator身份使用此命令)

    NPM Task: use this command cache clean -f to clear cache of server node_modules which could cause permission issues if you don't (for more information see: https://confluence.atlassian.com/bamboo/getting-started-with-node-js-and-bamboo-687213472.html#GettingstartedwithNode.jsandBamboo-npmtask and Npm Please try using this command again as root/administrator)

    NPM任务:使用此命令i为当前项目在服务器上安装/刷新所有node_modules

    NPM Task: use this command i to install/refresh all node_modules on the server for the current project

    NPM任务(可选):使用此命令i -g @angular/cli在服务器上安装/更新angular-cli.如果您担心锁定源版本,则每次都可以这样做,也可以不希望这样做.

    NPM Task (optional): use this command i -g @angular/cli to install/update angular-cli on the server. You may or may not want to do this every time if you're concerned with locking your source versions.

    NPM任务:使用此命令run ng build来构建(翻译)您的源代码(与ES5兼容等)

    NPM Task: use this command run ng build to build (transpile) your source code (es5 compatibility etc.)

    脚本配置任务:运行此命令xcopy "${bamboo.build.working.directory}\..." "[some output directory goes here]" /E /Y(有关脚本配置任务的更多信息,请参见: https://confluence.atlassian.com/display/BAMBOO0603/Script )

    Script Configuration Task: run this command xcopy "${bamboo.build.working.directory}\..." "[some output directory goes here]" /E /Y(for more information about the script config task, see: https://confluence.atlassian.com/display/BAMBOO0603/Script)

    可能还有其他运行测试的任务,等等,但是以上内容将使您入门.

    There can be other tasks for running test, etc. but the above will get you started.

    这篇关于Bamboo-Angular 4应用程序如何部署的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆