BOM-2543: Remove the diff-quality step from quality checks (#27619)
* build: Removed the diff-quality step Applied lint-amnesty on all the warnings Removed pylint thresholds comparison code and related tests Co-authored-by: Usama Sadiq <usama.sadiq@arbisoft.com>
This commit is contained in:
@@ -73,7 +73,7 @@ pipeline {
|
||||
}
|
||||
stage('Run Tests') {
|
||||
parallel {
|
||||
stage("commonlib pylint") {
|
||||
stage("common pylint") {
|
||||
// "pylint common" requires 5.5 GB of RAM, so use js-worker (8 GB) instead of jenkins-worker (4 GB)
|
||||
agent { label "js-worker" }
|
||||
environment {
|
||||
@@ -153,37 +153,6 @@ pipeline {
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Diff quality') {
|
||||
when {
|
||||
// Only run diff quality on PR builds
|
||||
expression { env.ghprbTargetBranch != null }
|
||||
}
|
||||
environment {
|
||||
TARGET_BRANCH = "origin/${ghprbTargetBranch}"
|
||||
}
|
||||
steps {
|
||||
sshagent(credentials: ['jenkins-worker'], ignoreMissing: true) {
|
||||
checkout changelog: false, poll: false, scm: [$class: 'GitSCM', branches: [[name: "${ghprbActualCommit}"]],
|
||||
doGenerateSubmoduleConfigurations: false, extensions: [[$class: 'CloneOption',
|
||||
honorRefspec: true, noTags: true, shallow: false], [$class: 'WipeWorkspace']], submoduleCfg: [],
|
||||
userRemoteConfigs: [[credentialsId: 'jenkins-worker',
|
||||
refspec: "+refs/heads/${ghprbTargetBranch}:refs/remotes/origin/${ghprbTargetBranch} +refs/pull/${ghprbPullId}/*:refs/remotes/origin/pr/${ghprbPullId}/*",
|
||||
url: "git@github.com:edx/${REPO_NAME}.git"]]]
|
||||
unstash 'quality-1-reports'
|
||||
unstash 'quality-2-reports'
|
||||
unstash 'quality-3-reports'
|
||||
unstash 'quality-4-reports'
|
||||
sh "./scripts/jenkins-quality-diff.sh"
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
qualityTestCleanup()
|
||||
publishHTML([allowMissing: true, alwaysLinkToLastBuild: false, keepAll: true, reportDir: 'reports/diff_quality',
|
||||
reportFiles: 'diff_quality_pylint.html, diff_quality_eslint.html', reportName: 'Diff Quality Report', reportTitles: ''])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
|
||||
@@ -6,11 +6,8 @@ source scripts/jenkins-common.sh
|
||||
source scripts/thresholds.sh
|
||||
|
||||
# Run quality task. Pass in the 'fail-under' percentage to diff-quality
|
||||
echo "Running diff quality."
|
||||
echo "Generating quality report."
|
||||
mkdir -p test_root/log/
|
||||
LOG_PREFIX=test_root/log/run_quality
|
||||
|
||||
if [[ $TARGET_BRANCH != origin/* ]]; then
|
||||
TARGET_BRANCH=origin/$TARGET_BRANCH
|
||||
fi
|
||||
paver run_quality -b $TARGET_BRANCH -p 100 -l $LOWER_PYLINT_THRESHOLD:$UPPER_PYLINT_THRESHOLD 2> $LOG_PREFIX.err.log > $LOG_PREFIX.out.log
|
||||
paver run_quality 2> $LOG_PREFIX.err.log > $LOG_PREFIX.out.log
|
||||
@@ -1,7 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
export LOWER_PYLINT_THRESHOLD=0
|
||||
export UPPER_PYLINT_THRESHOLD=1
|
||||
export ESLINT_THRESHOLD=5300
|
||||
export STYLELINT_THRESHOLD=880
|
||||
|
||||
Reference in New Issue
Block a user