Merge branch 'master' of git.yoho.cn:yoho-cicd/jenkins-pipeline
Showing
1 changed file
with
33 additions
and
1 deletions
1 | -# 构建 `web`项目 (pc , wap , ufo node ) `docker`镜像 | ||
1 | +# 构建 `web`项目 (pc , wap , ufo node ) `docker`镜像 | ||
2 | + | ||
3 | +参数: | ||
4 | + - `projectName`: 例如 `xianyu-ufo-app-web` 用于git上获取源码 | ||
5 | + - `projectGitGroup`: `fe` 用于git上获取源码 | ||
6 | + - `projectBranch`: `develop` 用于git上获取源码 | ||
7 | + - `deployName`: `xianyu-ufo-app-web` | ||
8 | + - `imageSource`: `yoho-online` | ||
9 | + - `imageVersion`: `develop-20191015104330` | ||
10 | + - `isNeedCdn`: `YES` | ||
11 | + - `isMergeMaster`: `NO` | ||
12 | + | ||
13 | + | ||
14 | +业务git目录需要提供: | ||
15 | + - `docker.sh` : 需要在这里完成`build`流程。 传入2个参数: `docker.sh $isNeedCdn $WORK_DIR` | ||
16 | + - `Dockerfile` : `docker`镜像的构建使用这个`dockerfile` | ||
17 | + | ||
18 | + | ||
19 | +```shell | ||
20 | +#!/bin/bash | ||
21 | +wordir=$2 | ||
22 | + | ||
23 | +cd $wordir | ||
24 | +yarn --production=false | ||
25 | + | ||
26 | +yarn build | ||
27 | +yarn build:node | ||
28 | + | ||
29 | +/usr/local/bin/node-prune ./dist/node/node_modules | ||
30 | + ``` | ||
31 | + | ||
32 | +支持项目: | ||
33 | + - 闲鱼web: http://git.yoho.cn/fe/xianyu-ufo-app-web |
-
Please register or login to post a comment