-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
405 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
image: node:latest | ||
|
||
services: | ||
# - mysql:latest | ||
# - redis:latest | ||
# - postgres:latest | ||
|
||
# http://docs.gitlab.com/ce/ci/yaml/README.html#cache | ||
|
||
stages: | ||
- init_restart | ||
#- deploy_v5 | ||
#- deploy_production | ||
|
||
# 1.需要自行配置 gitlab runner | ||
# 2.ssh免登录 | ||
# 3.gitlab中设置好 SSH_PRIVATE_KEY | ||
|
||
cache: | ||
paths: | ||
- node_modules/ | ||
before_script: | ||
|
||
job_init_restart: | ||
stage: init_restart | ||
only: | ||
- develop | ||
script: | ||
- 'ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime' | ||
- 'echo "当前时间:`date`"' | ||
- 'which ssh-agent || ( yum update -y && yum install openssh-client -y )' | ||
- eval $(ssh-agent -s) | ||
- ssh-add <(echo "$SSH_PRIVATE_KEY") | ||
- mkdir -p ~/.ssh | ||
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\tPort 1876\n\n" > ~/.ssh/config' | ||
- 'ssh www@172.16.0.46 -p 1876 "cd /home/www/data_board && git pull && exit"' | ||
# 安装npm模块,万一有新的呢 | ||
- 'ssh www@172.16.0.46 -p 1876 "cd /home/www/data_board && yarn install && exit"' | ||
# 重启项目 | ||
- 'ssh www@172.16.0.46 -p 1876 "cd /home/www/data_board && npm run test"' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<style type="text/css"> | ||
table.gridtable { | ||
font-family: verdana,arial,sans-serif; | ||
font-size:11px; | ||
color:#333333; | ||
border-width: 1px; | ||
border-color: #666666; | ||
border-collapse: collapse; | ||
width:50%; | ||
} | ||
table.gridtable th { | ||
border-width: 1px; | ||
padding: 8px; | ||
border-style: solid; | ||
border-color: #666666; | ||
background-color: #dedede; | ||
} | ||
table.gridtable td { | ||
text-align: left; | ||
border-width: 1px; | ||
padding: 8px; | ||
border-style: solid; | ||
border-color: #666666; | ||
background-color: #ffffff; | ||
} | ||
</style> | ||
<h3>{{ d.table_title }}</h3> | ||
<table id="{{d.table_id}}" class="gridtable"> | ||
{{# let headLen}} | ||
{{# if(d.table_head){ headLen=d.table_head.length;}} | ||
<thead> | ||
<tr> | ||
<th>序号</th> | ||
{{# for(let i = 0, len = d.table_head.length; i < len; i++){ }} | ||
<th>{{ d.table_head[i] }}</th> | ||
{{# } }} | ||
</tr> | ||
</thead> | ||
{{# } else { headLen=d.table_col.length; }} | ||
<thead> | ||
<tr> | ||
<th>序号</th> | ||
{{# for(let i = 0, len = d.table_col.length; i < len; i++){ }} | ||
<th>{{ d.table_col[i] }}</th> | ||
{{# } }} | ||
</tr> | ||
</thead> | ||
{{# } }} | ||
<tbody> | ||
{{# for(let i = 0, len = d.table_list.length; i < len; i++){ }} | ||
<tr> | ||
<td>{{i+1}}</td> | ||
{{# for(let k = 0, len1 = headLen; k < len1; k++){ }} | ||
<td>{{ d.table_list[i][d.table_col[k]]||'' }}</td> | ||
{{# } }} | ||
</tr> | ||
{{# } }} | ||
</tbody> | ||
</table> |
Oops, something went wrong.