Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cicdhtj
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
xujian
cicdhtj
Commits
f52f5f0f
Commit
f52f5f0f
authored
Sep 23, 2024
by
xujian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xx
parent
6a6c88f2
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
19 deletions
+4
-19
Jenkinsfile
Jenkinsfile
+3
-18
project.yaml
project.yaml
+1
-1
No files found.
Jenkinsfile
View file @
f52f5f0f
...
@@ -36,25 +36,10 @@ pipeline {
...
@@ -36,25 +36,10 @@ pipeline {
def
smallfile
=
log
.
readYaml
(
yamlFile
)
def
smallfile
=
log
.
readYaml
(
yamlFile
)
repos
.
add
([
dir:
smallfile
.
base
.
name
,
type:
smallfile
.
base
.
type
,
isUpdate:
smallfile
.
base
.
isUpdate
,
url:
smallfile
.
base
.
url
])
repos
.
add
([
dir:
smallfile
.
base
.
name
,
type:
smallfile
.
base
.
type
,
isUpdate:
smallfile
.
base
.
isUpdate
,
url:
smallfile
.
base
.
url
])
echo
repos
[
0
].
dir
repos
.
add
([
dir:
smallfile
.
core
.
name
,
type:
smallfile
.
core
.
type
,
isUpdate:
smallfile
.
core
.
isUpdate
,
url:
smallfile
.
core
.
url
])
repos
.
add
([
dir:
smallfile
.
core
.
name
,
type:
smallfile
.
core
.
type
,
isUpdate:
smallfile
.
core
.
isUpdate
,
url:
smallfile
.
core
.
url
])
echo
repos
[
1
].
dir
repos
.
add
([
dir:
smallfile
.
htj
.
name
,
type:
smallfile
.
htj
.
type
,
isUpdate:
smallfile
.
htj
.
isUpdate
,
url:
smallfile
.
htj
.
url
])
repos
.
add
([
dir:
smallfile
.
htj
.
name
,
type:
smallfile
.
htj
.
type
,
isUpdate:
smallfile
.
htj
.
isUpdate
,
url:
smallfile
.
htj
.
url
])
echo
repos
[
2
].
dir
repos
.
add
([
dir:
smallfile
.
web
.
name
,
type:
smallfile
.
web
.
type
,
isUpdate:
smallfile
.
web
.
isUpdate
,
url:
smallfile
.
web
.
url
])
repos
.
add
([
dir:
smallfile
.
web
.
name
,
type:
smallfile
.
web
.
type
,
isUpdate:
smallfile
.
web
.
isUpdate
,
url:
smallfile
.
web
.
url
])
echo
repos
[
3
].
dir
// base = xxx.base.module
// core = xxx.core.module
// htj = xxx.htj.module
// web = xxx.web
// // 遍历 base 对象(假设 base 是一个集合)
// if (base instanceof List) {
// base.each { item ->
// echo "Base Item: ${item.name}" // 输出每个项的内容
// }
// } else {
// echo "Base is not a list"
// }
}
}
}
}
}
}
...
@@ -63,7 +48,7 @@ pipeline {
...
@@ -63,7 +48,7 @@ pipeline {
script
{
script
{
for
(
repo
in
repos
)
{
for
(
repo
in
repos
)
{
dir
(
repo
.
dir
)
{
dir
(
repo
.
dir
)
{
git
branch:
"${params[repo.dir]}"
,
credentialsId:
'175beac7-7b6f-4171-a605-a268377d2937'
,
url:
repo
.
url
if
(
repo
.
isUpdate
)
git
branch:
"${params[repo.dir]}"
,
credentialsId:
'175beac7-7b6f-4171-a605-a268377d2937'
,
url:
repo
.
url
}
}
}
}
}
}
...
@@ -76,7 +61,7 @@ pipeline {
...
@@ -76,7 +61,7 @@ pipeline {
for
(
repo
in
repos
)
{
for
(
repo
in
repos
)
{
dir
(
repo
.
dir
)
{
dir
(
repo
.
dir
)
{
if
(
repo
.
isUpdate
&&
repo
.
type
==
'mvn'
)
sh
"mvn -T 1C -Dmaven.test.failure.ignore=true clean package install"
if
(
repo
.
isUpdate
&&
repo
.
type
==
'mvn'
)
sh
"mvn -T 1C -Dmaven.test.failure.ignore=true clean package install"
else
if
(
repo
.
isUpdate
&&
repo
.
type
==
'node'
)
sh
"npm run build:prod-htj"
else
if
(
repo
.
isUpdate
&&
repo
.
type
==
'node'
)
sh
"npm
install --registry=https://registry.npm.taobao.org && npm
run build:prod-htj"
}
}
}
}
...
...
project.yaml
View file @
f52f5f0f
...
@@ -106,6 +106,6 @@ web:
...
@@ -106,6 +106,6 @@ web:
name
:
"
WEB"
name
:
"
WEB"
type
:
"
mvn"
type
:
"
mvn"
url
:
"
http://114.116.202.8:18808/factory-tobacco/factory-tobacco-qrcode-htj-vue.git"
url
:
"
http://114.116.202.8:18808/factory-tobacco/factory-tobacco-qrcode-htj-vue.git"
isUpdate
:
fals
e
isUpdate
:
tru
e
version
:
v24.09.20
version
:
v24.09.20
isEncryption
:
false
isEncryption
:
false
\ No newline at end of file
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