diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 00000000..a7cf4e57 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,69 @@ +pipeline { + + agent { + node { + label 'BuildInNode' + } + } + + options { + buildDiscarder logRotator( + daysToKeepStr: '16', + numToKeepStr: '10' + ) + } + + stages { + + stage('Cleanup Workspace') { + steps { + cleanWs() + sh """ + echo "Cleaned Up Workspace For Project" + """ + } + } + + stage('Code Checkout') { + steps { + checkout([ + $class: 'GitSCM', + branches: [[name: '*/main']], + userRemoteConfigs: [[url: 'https://github.com/githubkhchua/book-helloworld.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 'develop' + } + steps { + sh """ + echo "Building Artifact" + """ + + sh """ + echo "Deploying Code" + """ + } + } + + } +} diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html index 82aa8ee8..745e145c 100644 --- a/src/main/webapp/index.html +++ b/src/main/webapp/index.html @@ -6,6 +6,6 @@