Skip to content

Commit

Permalink
Move to JePL 2
Browse files Browse the repository at this point in the history
  • Loading branch information
alvarolopez committed Nov 20, 2023
1 parent fdbe54e commit bdfb964
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 87 deletions.
27 changes: 27 additions & 0 deletions .sqa/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
sqa_criteria:
qc_style:
repos:
deepaas:
container: DEEPaaS-testing
tox:
tox_file: 'tox.ini'
testenv:
- flake8
- black
- pip-missing-reqs
qc_security:
repos:
deepaas:
container: DEEPaaS-testing
tox:
tox_file: 'tox.ini'
testenv:
- bandit
qc_doc:
repos:
eosc-perf:
container: perf-testing
tox:
tox_file: 'tox.ini'
testenv:
- docs
11 changes: 11 additions & 0 deletions .sqa/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: "3.6"

services:
DEEPaaS-testing:
image: "indigodatacloud/ci-images:python3.11"
hostname: "deepaas-testing"
volumes:
- type: bind
source: ./
target: /deepaas-testing
working_dir: /deepaas-testing
89 changes: 11 additions & 78 deletions Jenkinsfile
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,94 +1,27 @@
#!/usr/bin/groovy

@Library(['github.com/indigo-dc/[email protected]']) _
@Library(['github.com/indigo-dc/jenkins-pipeline-library@release/2.1.0']) _

def projectConfig

pipeline {
agent {
docker { image 'indigodatacloud/ci-images:python3.10' }
}

environment {
dockerhub_repo = "indigodatacloud/deepaas"
dockerhub_image_id = ""
label 'docker'
}

stages {
stage('Code fetching') {
steps {
checkout scm
}
}

stage('Style analysis') {
stage('SQA baseline dynamic stages') {
steps {
ToxEnvRun('flake8')
script {
projectConfig = pipelineConfig()
buildStages(projectConfig)
}
}
post {
always {
recordIssues(tools: [flake8()])
cleanup {
cleanWs()
}
}
}

stage('Unit testing coverage') {
steps {
ToxEnvRun('cover')
ToxEnvRun('cobertura')
}
// post {
// success {
// HTMLReport('cover', 'index.html', 'coverage.py report')
// CoberturaReport('**/coverage.xml')
// }
// }
}

stage('Dependency check') {
steps {
ToxEnvRun('pip-missing-reqs')
}
}

// stage('DockerHub delivery') {
// when {
// anyOf {
// branch 'master'
// buildingTag()
// }
// }
// agent {
// label 'docker-build'
// }
// steps {
// checkout scm
// script {
// dockerhub_image_id = DockerBuild(dockerhub_repo,
// tag: env.BRANCH_NAME)
// }
// }
// post {
// success {
// DockerPush(dockerhub_image_id)
// }
// failure {
// DockerClean()
// }
// always {
// cleanWs()
// }
// }
// }

// stage('PyPI delivery') {
// when {
// anyOf {
// buildingTag()
// }
// }
// steps {
// PyPIDeploy('deepaas', 'indigobot-pypi')
// }
// }

}
}
13 changes: 4 additions & 9 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,6 @@ python = python3.11
skip_install = true
package = deepaas

[jenkins]
python = python3.10
skip_install = true
package = deepaas

[pytest]
addopts = -p no:warnings

Expand Down Expand Up @@ -88,8 +83,8 @@ exclude =
build

[testenv:flake8]
basepython = {[jenkins]python}
skip_install = {[jenkins]skip_install}
basepython = {[base]python}
skip_install = {[base]skip_install}
deps =
flake8>=4.0,<4.1
flake8-bugbear>=22.3,<22.4
Expand Down Expand Up @@ -149,6 +144,6 @@ commands =
mypy --config-file mypy.ini -p {[base]package}

[testenv:pip-missing-reqs]
basepython = {[jenkins]python}
basepython = {[base]python}
deps = pip_check_reqs
commands=pip-missing-reqs -d --ignore-file={[jenkins]package}/tests/* {[jenkins]package}
commands=pip-missing-reqs -d --ignore-file={[base]package}/tests/* {[base]package}

0 comments on commit bdfb964

Please sign in to comment.