-
-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
more complex Jenkinsfile; updates #1309
- Loading branch information
Showing
1 changed file
with
60 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,69 @@ | ||
pipeline { | ||
agent any | ||
options { | ||
buildDiscarder logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '5', daysToKeepStr: '', numToKeepStr: '5') | ||
} | ||
|
||
stages { | ||
stage('Hello') { | ||
steps { | ||
sh ''' | ||
java -version | ||
agent { | ||
node any | ||
} | ||
|
||
''' | ||
} | ||
options { | ||
buildDiscarder logRotator( | ||
artifactDaysToKeepStr: '', | ||
artifactNumToKeepStr: '5', | ||
daysToKeepStr: '16', | ||
numToKeepStr: '10' | ||
) | ||
} | ||
|
||
stage('cat README') { | ||
// when { | ||
// branch "fix-*" | ||
// } | ||
steps { | ||
sh ''' | ||
stages { | ||
|
||
stage('Cleanup Workspace') { | ||
steps { | ||
cleanWs() | ||
sh """ | ||
echo "Cleaned Up Workspace For Project" | ||
""" | ||
} | ||
} | ||
|
||
stage('Code Checkout') { | ||
steps { | ||
checkout([ | ||
$class: 'GitSCM', | ||
branches: [[name: '*/master']], | ||
userRemoteConfigs: [[url: 'https://github.com/RespiraWorks/Ventilator.git']] | ||
]) | ||
} | ||
} | ||
|
||
stage('Unit Testing') { | ||
steps { | ||
sh """ | ||
echo "Running Unit Tests" | ||
""" | ||
} | ||
} | ||
|
||
stage('Code Analysis') { | ||
steps { | ||
sh """ | ||
echo "Running Code Analysis" | ||
""" | ||
} | ||
} | ||
|
||
stage('Build Deploy Code') { | ||
when { | ||
branch 'master' | ||
} | ||
steps { | ||
sh """ | ||
echo "Building Artifact" | ||
""" | ||
|
||
cat README.md | ||
sh """ | ||
echo "Deploying Code" | ||
""" | ||
} | ||
} | ||
|
||
''' | ||
} | ||
} | ||
} | ||
} |