Skip to content

Commit

Permalink
Performance Test Stage
Browse files Browse the repository at this point in the history
  • Loading branch information
Gopal Saini committed Nov 16, 2018
1 parent 1404762 commit 7ff602f
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 5,210 deletions.
60 changes: 26 additions & 34 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pipeline {
}

options {
// Only keep the 10 most recent builds
// Only keep the 5 most recent builds
buildDiscarder(logRotator(numToKeepStr:'5'))
}

Expand All @@ -18,37 +18,37 @@ pipeline {
}

stages {
stage('build') {
stage('test') {
steps {
sh 'npm --version'
sh 'printenv'
}
}

// stage('Performance Tests') {
// agent {
// label 'master'
// }
// when {
// branch 'master'
// }
// steps {
// sh 'npm i -d'
// // sh 'npm run lighthouse'
// }
// post {
// always {
// publishHTML (target: [
// allowMissing: false,
// alwaysLinkToLastBuild: false,
// keepAll: true,
// reportDir: '.',
// reportFiles: 'lighthouse-report.html',
// reportName: "Lighthouse"
// ])
// }
// }
// }
stage('Performance Tests') {
agent {
label 'feature/ci-pipiline'
}
when {
branch 'feature/ci-pipiline'
}
steps {
sh 'npm i -d'
sh 'npm run lighthouse'
}
post {
always {
publishHTML (target: [
allowMissing: false,
alwaysLinkToLastBuild: false,
keepAll: true,
reportDir: '.',
reportFiles: 'lighthouse-report.html',
reportName: "Lighthouse"
])
}
}
}
}

post {
Expand All @@ -57,14 +57,6 @@ pipeline {
}
success {
echo 'This will run only if successful'
publishHTML (target: [
allowMissing: false,
alwaysLinkToLastBuild: false,
keepAll: true,
reportDir: '.',
reportFiles: 'lighthouse-report.html',
reportName: 'Lighthouse'
])
}
failure {
echo 'This will run only if failed'
Expand Down
Loading

0 comments on commit 7ff602f

Please sign in to comment.