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:
Aarif
2021-06-07 18:37:06 +05:00
committed by GitHub
parent f497f0d103
commit 58a54f8d0b
8 changed files with 44 additions and 357 deletions

View File

@@ -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 {

View File

@@ -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

View File

@@ -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