美文网首页
IBM Cloud - Devops

IBM Cloud - Devops

作者: 前端混合开发 | 来源:发表于2019-07-16 16:02 被阅读0次

Continuously deploy your Angular application

部署Angular项目

  1. Code on github
  2. create a DevOps Toolchain on the cloud
  3. deploy and view the app
    ` Create a delivery pipeline
    A DevOps Toolchain is a set of tools for development, deployment, and operations tasks that you can use together to automate many development tasks (for example, testing and deployment).
image.png
#!/bin/bash
 export NVM_DIR=/home/pipeline/nvm
 export NODE_VERSION=10.9.0
 export NVM_VERSION=0.29.0

 npm config delete prefix \
   && curl https://raw.githubusercontent.com/creationix/nvm/v${NVM_VERSION}/install.sh | sh \
   && . $NVM_DIR/nvm.sh \
   && nvm install $NODE_VERSION \
   && nvm alias default $NODE_VERSION \
   && nvm use default \
   && node -v \
   && npm -v
 npm install -g @angular/cli
 npm install

 ng build --prod

image.png
#!/bin/bash
 cf push "${CF_APP}" --hostname dmat-admin-console --no-manifest -b 'https://github.com/cloudfoundry/staticfile-buildpack'

用自动部署的一些感受:
当push代码到github的时候就会触发自动部署,感觉省去了很多工序节省时间;

相关文章

网友评论

      本文标题:IBM Cloud - Devops

      本文链接:https://www.haomeiwen.com/subject/jcfafctx.html