Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
9
91isoft_sys_web
Project
Project
Details
Activity
Releases
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
张伯涛
91isoft_sys_web
Commits
f41af1dc
Commit
f41af1dc
authored
Jul 06, 2022
by
zhangyichen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改提交
parent
6c9f2bdc
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
208 additions
and
37 deletions
+208
-37
Jenkinsfile
configuration/Jenkinsfile
+94
-0
Dockerfile
deploy/dev/Dockerfile
+9
-0
devops-rc-process-web.yaml
deploy/dev/devops-rc-process-web.yaml
+104
-0
index.vue
src/views/system/role/index.vue
+1
-37
No files found.
configuration/Jenkinsfile
0 → 100644
View file @
f41af1dc
pipeline
{
agent
{
node
{
label
'nodejs16'
}
}
parameters
{
string
(
name:
'TAG_NAME'
,
defaultValue:
'1.0'
,
description:
''
)
choice
(
description:
'你需要选择哪个环境进行构建?'
,
name:
'ENVIRONMENT'
,
choices:
[
'dev'
,
'test'
])
}
environment
{
DOCKER_CREDENTIAL_ID
=
'91isoft-harbor'
GITLAB_CREDENTIAL_ID
=
'91isoft-gitlab'
KUBECONFIG_CREDENTIAL_ID
=
'91isoft-kube'
REGISTRY
=
'harbor.91isoft.com:100'
HARBOR_NAMESPACE
=
'cy'
GITLAB_ACCOUNT
=
'licongyang@91isoft.com'
APP_NAME
=
'91isoft-sys-web'
GIT_LAB_PROJECT
=
'http://gitlab.91isoft.com:90/zhangbotao/91isoft_sys_web.git'
}
stages
{
stage
(
'checkout scm'
)
{
steps
{
checkout
(
scm
)
}
}
stage
(
'get dependencies'
)
{
steps
{
container
(
'nodejs16'
)
{
sh
'rm -rf node_modules'
sh
'node -v'
sh
'npm -v'
sh
'yarn -v'
sh
'yarn install'
}
}
}
stage
(
'build'
)
{
steps
{
container
(
'nodejs16'
)
{
sh
'yarn run build:$ENVIRONMENT'
}
}
}
stage
(
'push'
)
{
steps
{
container
(
'nodejs16'
)
{
sh
'cp `pwd`/deploy/$ENVIRONMENT/Dockerfile `pwd`/configuration/'
sh
'rm -rf dist/dist.tar.gz'
sh
'cd dist && tar -zcvf dist.tar.gz *'
sh
'echo `pwd`'
sh
'cd ../'
sh
'cat `pwd`/configuration/Dockerfile'
sh
'docker build --no-cache -f `pwd`/configuration/Dockerfile -t $REGISTRY/$HARBOR_NAMESPACE/$APP_NAME:latest .'
withCredentials
([
usernamePassword
(
passwordVariable
:
'DOCKER_PASSWORD'
,
usernameVariable
:
'DOCKER_USERNAME'
,
credentialsId
:
"$DOCKER_CREDENTIAL_ID"
)])
{
sh
'echo "$DOCKER_PASSWORD" | docker login $REGISTRY -u "$DOCKER_USERNAME" --password-stdin'
sh
'docker push $REGISTRY/$HARBOR_NAMESPACE/$APP_NAME:latest'
}
}
}
}
//deploy
stage
(
'deploy'
)
{
steps
{
//input(id: 'deploy-to-test', message: 'deploy to test?')
kubernetesDeploy
(
configs:
"deploy/$ENVIRONMENT/**.yaml"
,
enableConfigSubstitution:
true
,
kubeconfigId:
"$KUBECONFIG_CREDENTIAL_ID"
)
}
}
stage
(
'push with tag'
){
when
{
expression
{
return
params
.
TAG_NAME
=~
/v.*/
}
}
steps
{
input
(
id:
'release-image-with-tag'
,
message:
'release image with tag?'
)
withCredentials
([
usernamePassword
(
credentialsId:
"$GITLAB_CREDENTIAL_ID"
,
passwordVariable:
'GIT_PASSWORD'
,
usernameVariable:
'GIT_USERNAME'
)])
{
sh
'git config --global user.email "licongyang@91isoft.com" '
sh
'git config --global user.name "cy" '
sh
'git tag -a $TAG_NAME -m "$TAG_NAME" '
sh
'git push $GIT_LAB_PROJECT --tags --ipv4'
}
sh
'docker tag $REGISTRY/$HARBOR_NAMESPACE/$APP_NAME:latest $REGISTRY/$HARBOR_NAMESPACE/$APP_NAME:$TAG_NAME '
sh
'docker push $REGISTRY/$HARBOR_NAMESPACE/$APP_NAME:$TAG_NAME '
}
}
}
}
deploy/dev/Dockerfile
0 → 100644
View file @
f41af1dc
FROM
nginx
MAINTAINER
cy "licongyang@91isoft.com"
ENV
LANG C.UTF-8
ENV
TZ=Asia/Shanghai
RUN
ln
-snf
/usr/share/zoneinfo/
$TZ
/etc/localtime
&&
echo
$TZ
>
/etc/timezone
RUN
mkdir
-p
/usr/share/nginx/html/
ADD
dist/dist.tar.gz /usr/share/nginx/html/
EXPOSE
80
ENTRYPOINT
nginx -g "daemon off;"
deploy/dev/devops-rc-process-web.yaml
0 → 100644
View file @
f41af1dc
apiVersion
:
apps/v1
kind
:
Deployment
metadata
:
labels
:
app
:
rcisoft-sys
component
:
rcisoft-sys-web
tier
:
front
name
:
rcisoft-sys-deploy
namespace
:
rcisoft-v2
spec
:
progressDeadlineSeconds
:
600
replicas
:
1
selector
:
matchLabels
:
app
:
rcisoft-sys
component
:
rcisoft-sys-web
tier
:
front
template
:
metadata
:
labels
:
app
:
rcisoft-sys
component
:
rcisoft-sys-web
tier
:
front
spec
:
volumes
:
-
name
:
date-config
hostPath
:
path
:
/etc/localtime
type
:
File
-
name
:
nginx-config
configMap
:
name
:
nginx-conf
items
:
-
key
:
nginx-process.conf
path
:
etc/nginx/nginx.conf
defaultMode
:
420
containers
:
-
env
:
-
name
:
TZ
value
:
Asia/Shanghai
-
name
:
build-number
value
:
$BUILD_NUMBER
image
:
$REGISTRY/$HARBOR_NAMESPACE/$APP_NAME:latest
#先屏蔽健康检查
#readinessProbe:
# httpGet:
# path: /
# port: 8080
# timeoutSeconds: 10
# failureThreshold: 30
# periodSeconds: 5
name
:
rcisoft-sys
imagePullPolicy
:
Always
ports
:
-
containerPort
:
8080
protocol
:
TCP
resources
:
limits
:
cpu
:
400m
memory
:
500Mi
requests
:
cpu
:
200m
memory
:
256Mi
volumeMounts
:
-
name
:
date-config
readOnly
:
true
mountPath
:
/etc/localtime
-
name
:
nginx-config
mountPath
:
/etc/nginx/nginx.conf
subPath
:
etc/nginx/nginx.conf
terminationMessagePath
:
/dev/termination-log
terminationMessagePolicy
:
File
dnsPolicy
:
ClusterFirst
restartPolicy
:
Always
terminationGracePeriodSeconds
:
30
imagePullSecrets
:
-
name
:
91isoft-harbor
strategy
:
type
:
RollingUpdate
rollingUpdate
:
maxUnavailable
:
25%
maxSurge
:
25%
---
kind
:
Service
apiVersion
:
v1
metadata
:
name
:
rcisoft-sys-svc
namespace
:
rcisoft-v2
labels
:
app
:
rcisoft-sys
spec
:
ports
:
-
name
:
tcp-80
protocol
:
TCP
port
:
80
targetPort
:
80
nodePort
:
8085
selector
:
app
:
rcisoft-sys
component
:
rcisoft-sys
tier
:
front
type
:
NodePort
src/views/system/role/index.vue
View file @
f41af1dc
...
...
@@ -188,17 +188,6 @@
<el-form-item
label=
"角色名称"
>
<el-input
v-model
.
trim=
"form.roleName"
placeholder=
"请输入角色名称"
show-word-limit
:maxlength=
"30"
:disabled=
"true"
/>
</el-form-item>
<!-- <el-table-->
<!-- v-loading="loading"-->
<!-- :data="menuList"-->
<!-- row-key="businessId"-->
<!-- :tree-props="{children: 'children', hasChildren: 'hasChildren'}"-->
<!-- max-height="400px"-->
<!-- >-->
<!-- <el-form-item label="权限字符">-->
<!-- <el-input v-model.trim="form.roleKey" placeholder="请输入角色名称" show-word-limit :maxlength="30" :disabled="true" />-->
<!-- </el-form-item>-->
<el-form-item
label=
"菜单权限"
>
<el-tree
ref=
"menu2"
...
...
@@ -216,19 +205,6 @@
>
</el-tree>
</el-form-item>
<!-- :default-expand-all="true"-->
<!-- <el-table-column prop="" label="菜单名称" :show-overflow-tooltip="true" width="160" />-->
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">-->
<!-- <template slot-scope="scope">-->
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-circle-check"-->
<!-- @click="handleDataScope(scope.row)"-->
<!-- >修改</el-button>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- </el-table>-->
</el-form>
</el-col>
<el-col
style=
"width: 1%"
>
...
...
@@ -487,22 +463,10 @@ export default {
}
else
if
(
type
===
2
)
{
roleMenuTreeselect
(
roleId
).
then
(
response
=>
{
this
.
selectListId
=
response
.
data
.
checkedKeys
this
.
menuOptionData
=
response
.
data
.
menus
this
.
forEachList
(
this
.
menuOptionData
)
this
.
menuOptionData
=
response
.
data
.
checkedKeyList
})
}
},
/** 递归生成回显数据 */
forEachList
(
list
)
{
list
.
forEach
((
item
,
index
)
=>
{
if
(
'children'
in
item
)
{
this
.
forEachList
(
item
.
children
)
}
if
(
this
.
selectListId
.
indexOf
(
item
.
id
)
===
-
1
)
{
list
.
splice
(
index
,
1
)
}
})
},
/** 根据角色ID和菜单ID查询部门树结构 */
getRoleDeptTreeselect
(
roleId
,
menuId
)
{
return
roleDeptTreeselect
(
roleId
,
menuId
).
then
(
response
=>
{
...
...
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