Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
B
building-a-multibranch-pipeline-project
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
谢宇轩
building-a-multibranch-pipeline-project
Commits
aac318ca
Commit
aac318ca
authored
Jun 21, 2022
by
谢宇轩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
edit jenkins
parent
f7a315b4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
16 deletions
+32
-16
Jenkinsfile
Jenkinsfile
+31
-15
App.js
src/App.js
+1
-1
No files found.
Jenkinsfile
View file @
aac318ca
pipeline
{
agent
{
docker
{
image
'node:6-alpine'
args
'-p 3000:3000 -p 5000:5000'
}
}
agent
any
environment
{
CI
=
'true'
}
...
...
@@ -26,15 +21,7 @@ Rollback:【回滚】''',
)
}
stages
{
stage
(
'Build dev'
)
{
when
{
branch
'developer'
}
steps
{
sh
'npm install'
}
}
stage
(
'Build master'
)
{
stage
(
'checkout'
)
{
when
{
branch
'master'
}
...
...
@@ -49,16 +36,39 @@ Rollback:【回滚】''',
sh
"git checkout $DeployVersion"
}
}
}
}
stage
(
'Build'
)
{
agent
{
docker
{
image
'node:6-alpine'
args
'-p 3000:3000 -p 5000:5000'
}
}
steps
{
sh
'npm install'
}
}
stage
(
'Test'
)
{
agent
{
docker
{
image
'node:6-alpine'
args
'-p 3000:3000 -p 5000:5000'
}
}
steps
{
sh
'echo "testing!"'
echo
"test complete!"
}
}
stage
(
'Deliver for development'
)
{
agent
{
docker
{
image
'node:6-alpine'
args
'-p 3000:3000 -p 5000:5000'
}
}
when
{
branch
'developer'
}
...
...
@@ -69,6 +79,12 @@ Rollback:【回滚】''',
}
}
stage
(
'Deploy for production'
)
{
agent
{
docker
{
image
'node:6-alpine'
args
'-p 3000:3000 -p 5000:5000'
}
}
when
{
branch
'master'
}
...
...
src/App.js
View file @
aac318ca
...
...
@@ -11,7 +11,7 @@ class App extends Component {
<
h1
className
=
"App-title"
>
Welcome
to
React
<
/h1
>
<
/header
>
<
p
className
=
"App-intro"
>
To
get
started
,
edit
<
code
>
src
/
App
.
js
<
/code> and save to reload. We are in
develop
er right now
!
To
get
started
,
edit
<
code
>
src
/
App
.
js
<
/code> and save to reload. We are in
mast
er right now
!
<
/p
>
<
/div
>
);
...
...
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