Skip to content

Commit

Permalink
more complex Jenkinsfile; updates #1309
Browse files Browse the repository at this point in the history
  • Loading branch information
martukas committed Jan 18, 2023
1 parent e55e1be commit 498f09a
Showing 1 changed file with 60 additions and 22 deletions.
82 changes: 60 additions & 22 deletions Jenkinsfile
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"
"""
}
}

'''
}
}
}
}

0 comments on commit 498f09a

Please sign in to comment.