Skip to content

Commit

Permalink
refactor - Commit changes in Jenkins configuration file.
Browse files Browse the repository at this point in the history
  • Loading branch information
RhonalVelasco committed Feb 23, 2022
2 parents cb10831 + b74f39e commit f0373c1
Showing 1 changed file with 43 additions and 42 deletions.
85 changes: 43 additions & 42 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,64 +1,65 @@
pipeline {
agent any
stages {
stage('Clean Workspace'){
stage('Clean Workspace') {
steps {
cleanWs(deleteDirs: true)
}
}
stage('Checkout SCM'){
steps {
checkout scm
}
}
stage('Codecov Functional Testing'){
steps{
sh 'echo "here steps to add"'
stage('Checkout SCM') {
steps {
checkout scm
}
}
stage('Codecov Code Quality'){
steps{
stage('Codecov Functional Testing') {
steps {
sh 'echo "here steps to add"'
}
}
/* stage('Codecov Quality Gates') {
steps{
timeout(time: 1, unit: 'HOURS'){
script{
def qualityGate = waitForQualityGate()
if(qualityGate.status != 'OK') {
error "Project build failed due to quality gate failure: ${qualityGate.status}"
}
}
}
}
}*/
stage('Generate documentation'){
steps{
sh 'git checkout devops-test'
nodejs(nodeJSInstallationName: 'NodeJs') {
sh 'npm config ls'
sh 'npm i'
sh 'mkdir -p ./docs/jsdoc-output/'
sh 'chown -R jenkins:jenkins docs'
sh 'ls -lah ./docs/jsdoc-output/'
sh 'npm run docs'
sh 'ls -l ./docs/jsdoc-output/'
}
sh 'git status && git pull && git config --global user.email "[email protected]" && git config --global user.name "Jenkins User" && git add . && git commit -m "test for jenkins" && git push [email protected]:Plato-solutions/Impressionist.git'
stage('Codecov Code Quality') {
steps {
sh 'echo "here steps to add"'
}
}

stage('publish'){
steps{
sh 'git checkout devops-test'
/* stage('Codecov Quality Gates') {
steps{
timeout(time: 1, unit: 'HOURS'){
script{
def qualityGate = waitForQualityGate()
if(qualityGate.status != 'OK') {
error "Project build failed due to quality gate failure: ${qualityGate.status}"
}
}
}
}
}*/
// stage('Generate documentation') {
// steps {
// sh 'git checkout main'
// nodejs(nodeJSInstallationName: 'NodeJs') {
// sh 'npm config ls'
// sh 'npm i'
// sh 'mkdir -p ./docs/jsdoc-output/'
// sh 'chown -R jenkins:jenkins docs'
// sh 'ls -lah ./docs/jsdoc-output/'
// sh 'npm run docs'
// sh 'ls -l ./docs/jsdoc-output/'
// }
// sh 'git status && git pull && git config --global user.email "[email protected]" && git config --global user.name "Jenkins User" && git add . && git commit -m "test for jenkins" && git push [email protected]:Plato-solutions/Impressionist.git'
// }
// }

stage('publish') {
steps {
sh 'git checkout main'
nodejs(nodeJSInstallationName: 'NodeJs') {
sh 'npm config ls'
sh 'npm i'
sh 'npm run publish'
}
}

}

}
}

0 comments on commit f0373c1

Please sign in to comment.