Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
global-jenkinsfile
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
QA
global-jenkinsfile
Commits
567b0f27
Commit
567b0f27
authored
Apr 21, 2022
by
黎博
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
support go
parent
79f89e2a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
0 deletions
+24
-0
StageBucketTke2.groovy
src/org/qg/docker_new/StageBucketTke2.groovy
+24
-0
No files found.
src/org/qg/docker_new/StageBucketTke2.groovy
View file @
567b0f27
...
...
@@ -177,6 +177,9 @@ def slaveImageRespority(buildEnv){
case
"node12"
:
return
"ccr.ccs.tencentyun.com/qg-qa/node12:latest"
break
case
"go"
:
return
"ccr.ccs.tencentyun.com/qg-qa/golang:1.18"
break
default
:
return
"192.168.4.4/baseimg/jenkins-slave:latest"
}
...
...
@@ -249,6 +252,9 @@ def check_and_build(buildType,systemName,branchName,contextDir){
case
"ui"
:
buildEnv
=
"node12"
break
case
"go"
:
buildEnv
=
"golang"
break
default
:
buildEnv
=
"java8"
}
...
...
@@ -304,6 +310,9 @@ def checkout(buildType,systemName, branchName) {
case
"ui"
:
checkout_luaui
(
systemName
,
branchName
)
break
case
"go"
:
checkout_go
(
systemName
,
branchName
)
break
default:
echo
"未知的buildType: ${buildType}"
break
...
...
@@ -421,6 +430,12 @@ def checkout_nodejs(systemName, branchName) {
}
}
def
checkout_go
(
systemName
,
branchName
)
{
def
projectAttr
=
project_attr
(
systemName
)
def
gitPath
=
projectAttr
[
"git_path"
]
git
branch:
branchName
,
credentialsId:
'c6be40a7-235a-46db-89b8-61cfcbcbc1c4'
,
url:
gitPath
}
def
prepare_config
(
buildType
,
systemName
,
contextDir
)
{
_utils
().
beautyEcho
(
"Prepare Config +++ type:${buildType} systemName:${systemName}"
,
"info"
)
switch
(
buildType
)
{
...
...
@@ -501,6 +516,9 @@ def build(buildType,systemName, branchName,contextDir){
sh
"npm -v"
build_luaui
(
systemName
,
branchName
,
contextDir
)
break
case
"go"
:
build_go
(
systemName
,
branchName
,
contextDir
)
break
default:
echo
"未知的buildType: ${buildType}"
break
...
...
@@ -589,6 +607,12 @@ def build_luaui( systemName, branchName,contextDir) {
sh
"mv ${systemName}.tgz ${contextDir}"
}
def
build_go
(
systemName
,
branchName
,
contextDir
)
{
def
projectAttr
=
project_attr
(
systemName
)
buildCmd
=
projectAttr
[
"build_command"
]
sh
buildCmd
}
def
dockerbuild_and_push
(
imageTagInfo
,
buildNumber
,
systemName
,
branchName
,
timeStemp
,
contextDir
){
def
harbor_host
=
imageTagInfo
[
"harborHost"
]
...
...
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