@@ -5,97 +5,97 @@ metadata:
5
5
name : scan-handler-bc
6
6
creationTimestamp :
7
7
parameters :
8
- - name : NAME
9
- displayName :
10
- description : the module name entered when run yo bcdk:pipeline, which is tfrs
11
- required : true
12
- - name : SUFFIX
13
- displayName :
14
- description : sample is -pr-0
15
- required : true
16
- - name : VERSION
17
- displayName :
18
- description : image tag name for output
19
- required : true
20
- - name : RELEASE_BRANCH
21
- displayName :
22
- description : the release branch name
23
- required : true
8
+ - name : NAME
9
+ displayName :
10
+ description : the module name entered when run yo bcdk:pipeline, which is tfrs
11
+ required : true
12
+ - name : SUFFIX
13
+ displayName :
14
+ description : sample is -pr-0
15
+ required : true
16
+ - name : VERSION
17
+ displayName :
18
+ description : image tag name for output
19
+ required : true
20
+ - name : RELEASE_BRANCH
21
+ displayName :
22
+ description : the release branch name
23
+ required : true
24
24
objects :
25
- - apiVersion : image.openshift.io/v1
26
- kind : ImageStream
27
- metadata :
28
- annotations :
29
- description : Keeps track of changes in the celery image
30
- labels :
31
- shared : " true"
32
- creationTimestamp : null
33
- name : ${NAME}-scan-handler
34
- spec :
35
- lookupPolicy :
36
- local : false
37
- status :
38
- dockerImageRepository : " "
39
- - kind : BuildConfig
40
- apiVersion : build.openshift.io/v1
41
- metadata :
42
- name : ${NAME}-scan-handler${SUFFIX}
43
- creationTimestamp :
44
- spec :
45
- triggers : []
46
- runPolicy : Serial
47
- source :
48
- type : Dockerfile
49
- dockerfile : |
50
- FROM artifacts.developer.gov.bc.ca/docker-remote/python:3.9.15
51
- RUN apt-get update \
52
- && apt-get install -y git \
53
- && apt-get install -y supervisor
54
- WORKDIR /app
55
- RUN git clone https://github.com/bcgov/tfrs.git
56
- WORKDIR /app/tfrs
57
- RUN git checkout ${tfrs_release}
58
- RUN pip install --upgrade pip \
59
- && pip install -r backend/requirements.txt
60
- RUN cp /app/tfrs/security-scan/scan-handler/scan-handler.conf /etc/supervisor/conf.d && \
61
- chgrp -R root /var/log/supervisor && \
62
- chmod -R g+w /var/log/supervisor && \
63
- chmod -R g+w /run || : && \
64
- chmod -R g+w /app
65
- # RUN sed -i "s/chmod=0700/chmod=0770/g" /etc/supervisor/supervisord.conf
66
- CMD ["supervisord"]
67
- strategy :
68
- type : Docker
69
- dockerStrategy :
70
- noCache : true
71
- env :
72
- - name : tfrs_release
73
- value : ${RELEASE_BRANCH}
74
- - name : ARTIFACTORY_USER
75
- valueFrom :
76
- secretKeyRef :
77
- name : artifacts-default-cgcynz
78
- key : username
79
- - name : ARTIFACTORY_PASSWORD
80
- valueFrom :
81
- secretKeyRef :
82
- name : artifacts-default-cgcynz
83
- key : password
84
- forcePull : true
85
- output :
86
- to :
87
- kind : ImageStreamTag
88
- name : ${NAME}-scan-handler:${VERSION}
89
- resources :
90
- limits :
25
+ - apiVersion : image.openshift.io/v1
26
+ kind : ImageStream
27
+ metadata :
28
+ annotations :
29
+ description : Keeps track of changes in the celery image
30
+ labels :
31
+ shared : " true"
32
+ creationTimestamp : null
33
+ name : ${NAME}-scan-handler
34
+ spec :
35
+ lookupPolicy :
36
+ local : false
37
+ status :
38
+ dockerImageRepository : " "
39
+ - kind : BuildConfig
40
+ apiVersion : build.openshift.io/v1
41
+ metadata :
42
+ name : ${NAME}-scan-handler${SUFFIX}
43
+ creationTimestamp :
44
+ spec :
45
+ triggers : []
46
+ runPolicy : Serial
47
+ source :
48
+ type : Dockerfile
49
+ dockerfile : |
50
+ FROM artifacts.developer.gov.bc.ca/docker-remote/python:3.9.15
51
+ RUN apt-get update \
52
+ && apt-get install -y git \
53
+ && apt-get install -y supervisor
54
+ WORKDIR /app
55
+ RUN git clone https://github.com/bcgov/tfrs.git
56
+ WORKDIR /app/tfrs
57
+ RUN git checkout ${tfrs_release}
58
+ RUN pip install --upgrade pip==24.0 \
59
+ && pip install -r backend/requirements.txt
60
+ RUN cp /app/tfrs/security-scan/scan-handler/scan-handler.conf /etc/supervisor/conf.d && \
61
+ chgrp -R root /var/log/supervisor && \
62
+ chmod -R g+w /var/log/supervisor && \
63
+ chmod -R g+w /run || : && \
64
+ chmod -R g+w /app
65
+ # RUN sed -i "s/chmod=0700/chmod=0770/g" /etc/supervisor/supervisord.conf
66
+ CMD ["supervisord"]
67
+ strategy :
68
+ type : Docker
69
+ dockerStrategy :
70
+ noCache : true
71
+ env :
72
+ - name : tfrs_release
73
+ value : ${RELEASE_BRANCH}
74
+ - name : ARTIFACTORY_USER
75
+ valueFrom :
76
+ secretKeyRef :
77
+ name : artifacts-default-cgcynz
78
+ key : username
79
+ - name : ARTIFACTORY_PASSWORD
80
+ valueFrom :
81
+ secretKeyRef :
82
+ name : artifacts-default-cgcynz
83
+ key : password
84
+ forcePull : true
85
+ output :
86
+ to :
87
+ kind : ImageStreamTag
88
+ name : ${NAME}-scan-handler:${VERSION}
89
+ resources :
90
+ limits :
91
91
cpu : 1500m
92
92
memory : 1300Mi
93
- requests :
93
+ requests :
94
94
cpu : 750m
95
- memory : 650Mi
96
- postCommit : {}
97
- nodeSelector :
98
- successfulBuildsHistoryLimit : 5
99
- failedBuildsHistoryLimit : 5
100
- status :
101
- lastVersion : 0
95
+ memory : 650Mi
96
+ postCommit : {}
97
+ nodeSelector :
98
+ successfulBuildsHistoryLimit : 5
99
+ failedBuildsHistoryLimit : 5
100
+ status :
101
+ lastVersion : 0
0 commit comments