Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
java-ci-script
Project overview
Project overview
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
Administrator
java-ci-script
Commits
bc19b890
Commit
bc19b890
authored
May 31, 2020
by
Administrator
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新build.yml
parent
4e0434b9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
10 deletions
+16
-10
build.yml
build.yml
+16
-10
No files found.
build.yml
View file @
bc19b890
...
...
@@ -4,31 +4,36 @@ variables:
# 定义 stages
stages
:
-
init
-
pre_test
-
pre_prod
-
build
init
:
stage
:
init
script
:
-
cat /dev/null > ${appname}.env
pre_test
:
stage
:
pre_test
only
:
-
test
variables
:
k8sappname
:
"
${appname}-test"
image
:
192.168.123.7:5000/${appname}:test
springprofile
:
'
'
script
:
-
echo ${k8sappname}${image}${springprofile}
-
echo "k8sappname=${appname}-test" >> ${appname}.env
-
echo "image=192.168.123.7:5000/${appname}:test" >> ${appname}.env
-
echo "springprofile=''" >> ${appname}.env
-
cat ${appname}.env
pre_prod
:
stage
:
pre_prod
only
:
-
master
variables
:
k8sappname
:
"
${appname}-prod"
image
:
192.168.123.7:5000/${appname}:prod
springprofile
:
'
--spring.profiles.active=prod'
script
:
-
echo ${k8sappname}${image}${springprofile}
-
echo "k8sappname=${appname}-prod" >> ${appname}.env
-
echo "image=192.168.123.7:5000/${appname}:prod" >> ${appname}.env
-
echo "springprofile='--spring.profiles.active=prod'" >> ${appname}.env
-
cat ${appname}.env
# 定义 job
build
:
...
...
@@ -37,6 +42,7 @@ build:
-
master
stage
:
build
script
:
-
source ${appname}.env
-
echo "appname is ${k8sappname}, port is ${port}, replicas is ${replicas}, nodeName is ${nodeName}, hostNetwork is ${hostNetwork}, springprofile is ${springprofile}"
-
mvn -Dmaven.test.skip=true clean package -U
...
...
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