Commit aac318ca authored by 谢宇轩's avatar 谢宇轩

edit jenkins

parent f7a315b4
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'
}
......
......@@ -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 developer right now!
To get started, edit <code>src/App.js</code> and save to reload. We are in master right now!
</p>
</div>
);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment