diff --git a/VERSION b/VERSION index abae0d9..c5864dc 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.1.3 \ No newline at end of file +2.1.5 \ No newline at end of file diff --git a/{{ cookiecutter.__repo_name }}/.sqa/docker-compose.yml b/{{ cookiecutter.__repo_name }}/.sqa/docker-compose.yml index 0907b8b..d189b8a 100644 --- a/{{ cookiecutter.__repo_name }}/.sqa/docker-compose.yml +++ b/{{ cookiecutter.__repo_name }}/.sqa/docker-compose.yml @@ -2,13 +2,13 @@ version: "3.6" services: thisrepo-testing: - image: "indigodatacloud/ci-images:python3.8" + image: "ai4oshub/ci-images:python3.10" container_name: "${BUILD_TAG}" hostname: "${BUILD_TAG}" working_dir: /srv command: > sh -c "git config --global --add safe.directory /srv && - /usr/sbin/sshd -D" + tail -f /dev/null" volumes: - type: bind source: ./ diff --git a/{{ cookiecutter.__repo_name }}/Jenkinsfile b/{{ cookiecutter.__repo_name }}/Jenkinsfile index dd0cce3..115f89e 100644 --- a/{{ cookiecutter.__repo_name }}/Jenkinsfile +++ b/{{ cookiecutter.__repo_name }}/Jenkinsfile @@ -18,29 +18,37 @@ pipeline { post { // publish results and clean-up always { - // file locations are defined in tox.ini - // publish results of the style analysis - recordIssues(tools: [flake8(pattern: 'flake8.log', - name: 'PEP8 report', - id: "flake8_pylint")]) - // publish results of the coverage test - publishHTML([allowMissing: false, - alwaysLinkToLastBuild: false, - keepAll: true, - reportDir: "htmlcov", - reportFiles: 'index.html', - reportName: 'Coverage report', - reportTitles: '']) - // publish results of the security check - publishHTML([allowMissing: false, - alwaysLinkToLastBuild: false, - keepAll: true, - reportDir: "bandit", - reportFiles: 'index.html', - reportName: 'Bandit report', - reportTitles: '']) + script { + if (fileExists("flake8.log")) { + // file locations are defined in tox.ini + // publish results of the style analysis + recordIssues(tools: [flake8(pattern: 'flake8.log', + name: 'PEP8 report', + id: "flake8_pylint")]) + } + if (fileExists("htmlcov/index.html")) { + // publish results of the coverage test + publishHTML([allowMissing: false, + alwaysLinkToLastBuild: false, + keepAll: true, + reportDir: "htmlcov", + reportFiles: 'index.html', + reportName: 'Coverage report', + reportTitles: '']) + } + if (fileExists("bandit/index.html")) { + // publish results of the security check + publishHTML([allowMissing: false, + alwaysLinkToLastBuild: false, + keepAll: true, + reportDir: "bandit", + reportFiles: 'index.html', + reportName: 'Bandit report', + reportTitles: '']) + } + } // Clean after build cleanWs() - } + } } } diff --git a/{{ cookiecutter.__repo_name }}/metadata.json b/{{ cookiecutter.__repo_name }}/metadata.json index ecad027..0d861de 100644 --- a/{{ cookiecutter.__repo_name }}/metadata.json +++ b/{{ cookiecutter.__repo_name }}/metadata.json @@ -11,7 +11,7 @@ ], "license": "{{ cookiecutter.open_source_license }}", "date_creation": "{% now 'utc', '%Y-%m-%d' %}", - "dataset_url": "https://zenodo.org/", + "dataset_url": "http://add-some-url-pointing-to-your-dataset.com", "sources": { "dockerfile_repo": "{{ cookiecutter.git_base_url }}/{{ cookiecutter.__repo_name }}", "docker_registry_repo": "ai4oshub/{{ cookiecutter.__repo_name }}", diff --git a/{{ cookiecutter.__repo_name }}/tox.ini b/{{ cookiecutter.__repo_name }}/tox.ini index 45c794c..c21734d 100644 --- a/{{ cookiecutter.__repo_name }}/tox.ini +++ b/{{ cookiecutter.__repo_name }}/tox.ini @@ -1,10 +1,12 @@ [tox] -minversion = 3.25.0 +minversion = 3.26.0 isolated_build = True -envlist = qc.sty,qc.cov,qc.sec,py310,py39,py38 +envlist = qc.sty,qc.cov,qc.sec,py310 [testenv] install_command = pip install -U {opts} {packages} +# if recreating envdir fails in tox>=4, comment the following line +envdir = {toxworkdir}/shared commands = pytest --numprocesses=auto {posargs} allowlist_externals = mkdir @@ -34,4 +36,4 @@ commands = [testenv:qc.sec] commands = mkdir -p {toxinidir}/bandit - bandit -r {{ cookiecutter.__app_name }} -x tests -o {toxinidir}/bandit/index.html \ No newline at end of file + bandit -r {{ cookiecutter.__app_name }} -x tests -f html -o {toxinidir}/bandit/index.html