limitations under the License.
*/
-def ciHelper
def DEFAULT_MODULE_NAME = 'nbi'
pipeline {
}
}
- stage('Unit Tests') {
+ stage('Tests') {
steps {
script {
- if (!ciHelper) {
- ciHelper = load 'devops/jenkins/ci-pipelines/ci_helper.groovy'
- }
def UID = sh(returnStdout: true, script: 'id -u').trim()
def GID = sh(returnStdout: true, script: 'id -g').trim()
def common = "-v ${env.WORKSPACE}:/tests -e UID=${UID} -e GID=${GID} " + (params.DOCKER_ARGS ?: '')
- stage('Test') {
+ stage('Linting Tests') {
+ sh """
+ docker run --rm ${common} \
+ ${env.TEST_IMAGE} \
+ /tests/devops-stages/stage-lint.sh
+ """
+ }
+
+ stage('Unit Tests') {
sh """
docker run --rm ${common} \
${env.TEST_IMAGE} \
Promotion should be done in a separate downstream job after E2E success to avoid
*/
}
+
post {
always {
- cleanWs()
+ // cleanWs()
+ deleteDir()
}
}
}
--- /dev/null
+#!/bin/sh
+
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+echo "Launching tox"
+# TOX_PARALLEL_NO_SPINNER=1 tox --parallel=auto -e black,flake8,pylint,safety
+echo "DONE"