Skip to content

Commit f9cf269

Browse files
author
khadijeh.alibabaei
committed
update ci/cd config
1 parent e3ab78f commit f9cf269

File tree

5 files changed

+46
-56
lines changed

5 files changed

+46
-56
lines changed

.sqa/docker-compose.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
version: "3.6"
22

33
services:
4-
testing:
5-
container_name: testing
4+
thisrepo-testing:
5+
image: "mteamkit/cicd-python-gl"
6+
container_name: "${BUILD_TAG}"
7+
hostname: "${BUILD_TAG}"
68
working_dir: /srv
7-
build:
8-
context: ./.sqa
9+
command: >
10+
sh -c "git config --global --add safe.directory /srv &&
11+
tail -f /dev/null"
912
volumes:
1013
- type: bind
1114
source: ./

.sqa/dockerfile

Lines changed: 0 additions & 23 deletions
This file was deleted.

JenkinsConstants.groovy

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import groovy.transform.Field
2+
// This file defines three variables to be used in the AI4OS-Hub Upstream Jenkins pipeline
3+
// base_cpu_tag : base docker image for Dockerfile, CPU version
4+
// base_gpu_tag : base docker image for Dockerfile, GPU version
5+
// dockerfile : what Dockerfile to use for building, can include path, e.g. docker/Dockerfile
6+
7+
//@Field
8+
//def base_cpu_tag = '1.13.1-cuda11.6-cudnn8-runtime'
9+
10+
//@Field
11+
//def base_gpu_tag = ''
12+
13+
@Field
14+
def dockerfile = 'Dockerfile'
15+
16+
return this;

Jenkinsfile

Lines changed: 22 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -18,37 +18,30 @@ pipeline {
1818
post {
1919
// publish results and clean-up
2020
always {
21-
script {
22-
if (fileExists("flake8.log")) {
23-
// file locations are defined in tox.ini
24-
// publish results of the style analysis
25-
recordIssues(tools: [flake8(pattern: 'flake8.log',
26-
name: 'PEP8 report',
27-
id: "flake8_pylint")])
28-
}
29-
if (fileExists("htmlcov/index.html")) {
30-
// publish results of the coverage test
31-
publishHTML([allowMissing: false,
32-
alwaysLinkToLastBuild: false,
33-
keepAll: true,
34-
reportDir: "htmlcov",
35-
reportFiles: 'index.html',
36-
reportName: 'Coverage report',
37-
reportTitles: ''])
38-
}
39-
if (fileExists("bandit/index.html")) {
40-
// publish results of the security check
41-
publishHTML([allowMissing: false,
42-
alwaysLinkToLastBuild: false,
43-
keepAll: true,
44-
reportDir: "bandit",
45-
reportFiles: 'index.html',
46-
reportName: 'Bandit report',
21+
// file locations are defined in tox.ini
22+
// publish results of the style analysis
23+
recordIssues(enabledForFailure: true,
24+
tools: [flake8(pattern: 'flake8.log',
25+
name: 'PEP8 report',
26+
id: "flake8_pylint")])
27+
// publish results of the coverage test
28+
publishHTML([allowMissing: false,
29+
alwaysLinkToLastBuild: false,
30+
keepAll: true,
31+
reportDir: "htmlcov",
32+
reportFiles: 'index.html',
33+
reportName: 'Coverage report',
4734
reportTitles: ''])
48-
}
49-
}
35+
// publish results of the security check
36+
publishHTML([allowMissing: false,
37+
alwaysLinkToLastBuild: false,
38+
keepAll: true,
39+
reportDir: "bandit",
40+
reportFiles: 'index.html',
41+
reportName: 'Bandit report',
42+
reportTitles: ''])
5043
// Clean after build
5144
cleanWs()
52-
}
45+
}
5346
}
5447
}

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ numpy>=1.14
66
scikit-image>=0.13
77
imageio>=2.3
88
matplotlib>=3.0
9+
GDAL>=2.2
910
requests>=2.18.4
1011
PyYAML>=3.12
1112
Keras==2.2.4

0 commit comments

Comments
 (0)