-
Notifications
You must be signed in to change notification settings - Fork 166
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pipelines: add lint-py to liter pipeline
- Loading branch information
Showing
1 changed file
with
9 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,7 @@ pipeline { | |
userRemoteConfigs: [[ | ||
credentialsId: "96d5f81c-e9ad-45f7-ba5d-bc8107c0ae2c", | ||
url: "[email protected]:${params.GITHUB_ORG}/${params.REPO_NAME}", | ||
refspec: "+refs/heads/*:refs/remotes/origin/* +${params.GIT_REMOTE_REF}:refs/remotes/origin/_jenkins_local_branch" | ||
refspec: "+${params.GIT_REMOTE_REF}:refs/remotes/origin/_jenkins_local_branch" | ||
]] | ||
]) | ||
} | ||
|
@@ -42,15 +42,22 @@ pipeline { | |
steps { | ||
// Calling with `returnStatus` suppresses automatic failures | ||
sh(script: "${env.MAKE} lint-md-build", returnStatus: true) | ||
sh(script: "${env.MAKE} lint-py-build", returnStatus: true) | ||
} | ||
} | ||
|
||
stage('Run tests') { | ||
steps { | ||
script { | ||
def node_version = sh(script: "@python tools/getnodeversion.py", returnStdout: true) | ||
def lint_py3_ret = 0 | ||
if (node_version > '11') { | ||
// this job does not build node, so we use the system's node | ||
lint_py3_ret = sh(script: "NODE=node PYTHON=python3 ${env.MAKE} lint-py", returnStatus: true) | ||
} | ||
// this job does not build node, so we use the system's node | ||
def ret = sh(script: "NODE=node ${env.MAKE} lint-ci", returnStatus: true) | ||
if (ret != 0) { | ||
if (ret != 0 || lint_py3_ret != 0) { | ||
echo(extractErrors()) | ||
error('lint failed - open above section for details') | ||
} | ||
|