Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wisdom-property
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
郭铭瑶
wisdom-property
Commits
689b2f54
Commit
689b2f54
authored
Apr 17, 2020
by
郭铭瑶
🤘
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
打包
parent
d2fc7f9e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
54 additions
and
3 deletions
+54
-3
Jenkinsfile
Jenkinsfile
+53
-0
api.js
src/server/api.js
+1
-3
No files found.
Jenkinsfile
0 → 100644
View file @
689b2f54
#
!
/usr/
bin
/
groovy
@Library
(
'pipeline-library'
)
def
utils
=
new
io
.
fabric8
.
Utils
()
clientsNode
{
def
env
=
'shanghaiwuye'
def
projectName
=
"${JOB_BASE_NAME}"
def
newVersion
=
''
def
deployType
=
""
try
{
deployType
=
DEPLOY_TYPE
}
catch
(
Throwable
e
)
{
deployType
=
"TEST"
}
checkout
scm
stage
'构建版本'
echo
'NOTE: running pipelines for the first time will take longer as build and base docker images are pulled onto the node'
if
(!
fileExists
(
'Dockerfile'
))
{
writeFile
file:
'Dockerfile'
,
text:
'''FROM 168.168.112.64:5000/node-nginx:8.12.0
WORKDIR /app
# 将当前目录下的所有文件拷贝到工作目录下
COPY . /app/
# 1.安装依赖
# 2.运行 npm run build
# 3.将 dist 目录的所有文件拷贝到 nginx 的目录下
# 4.删除工作目录的文件,尤其是 node_modules 以减小镜像体积
# 由于镜像构建的每一步都会产生新层
# 为了减小镜像体积,尽可能将一些同类操作,集成到一个步骤中,如下、
RUN cp -r dist/* /var/www/html \\
'''
}
newVersion
=
performCanaryRelease
{}
def
rc
=
getKubernetesJson
{
port
=
80
label
=
'nodejs'
version
=
newVersion
name
=
projectName
imageName
=
clusterImageName
}
stage
'部署'
kubernetesApply
(
file:
rc
,
environment:
env
)
}
src/server/api.js
View file @
689b2f54
let
BASE_URL
=
''
switch
(
process
.
env
.
NODE_ENV
)
{
case
'production'
:
BASE_URL
=
'
product_url
'
BASE_URL
=
'
http://www.962121.net/hmfmstest/shanghaiwuye/propertyinspector/api/v1
'
break
default
:
// BASE_URL = 'http://yapi.omniview.pro/mock/54/propertyinspector/api/v1/'
...
...
@@ -9,8 +9,6 @@ default:
};
export
default
{
BASE_URL
,
TEST_URL
:
'/api/test_url'
,
POST_CHECKCOMMUNITY_LIST
:
'sharingplatform/sectListForOneDay'
,
//物业督查---每一个主题下某天已检查的小区列表
POST_CHECKPEOPLE_LIST
:
'sharingplatform/getInspectors'
,
// 检查人员列表
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment