31
31
description : The arguments to pass to the pylint CLI.
32
32
type : array
33
33
default : []
34
- - name : requirements_file
34
+ - name : requirements-file
35
35
description : The name of the requirements file inside the source location
36
36
default : " requirements.txt"
37
37
steps :
49
49
python -m pip install poetry poetry-plugin-export
50
50
poetry export --with=dev -f requirements.txt --output requirements.txt
51
51
python -m pip install --user -r requirements.txt
52
- elif [ -n "$(params.requirements_file )" ] && [ -e "$(params.requirements_file )" ]; then
53
- python -m pip install --user -r "$(params.requirements_file )"
52
+ elif [ -n "$(params.requirements-file )" ] && [ -e "$(params.requirements-file )" ]; then
53
+ python -m pip install --user -r "$(params.requirements-file )"
54
54
fi
55
55
56
56
# Make sure pylint is installed
@@ -85,15 +85,15 @@ spec:
85
85
that is sourced from a Secret. This allows you to define
86
86
credentials that can be used to connect to a test database.
87
87
params :
88
- - name : PYTEST_ARGS
88
+ - name : pytest-args
89
89
description : The arguments to pass to the pytest CLI.
90
90
type : array
91
91
default : []
92
- - name : SECRET_NAME
92
+ - name : secret-name
93
93
description : The name of the secret containing a database_uri key
94
94
type : string
95
95
default : " postgres-creds"
96
- - name : SECRET_KEY
96
+ - name : secret-key
97
97
description : The name of the key that contains the database uri
98
98
type : string
99
99
default : " database_uri"
@@ -105,8 +105,8 @@ spec:
105
105
- name : DATABASE_URI
106
106
valueFrom :
107
107
secretKeyRef :
108
- name : $(params.SECRET_NAME )
109
- key : $(params.SECRET_KEY )
108
+ name : $(params.secret-name )
109
+ key : $(params.secret-key )
110
110
script : |
111
111
#!/bin/bash
112
112
set -e
@@ -129,7 +129,7 @@ spec:
129
129
pytest --version
130
130
pytest
131
131
args :
132
- - " $(params.PYTEST_ARGS )"
132
+ - " $(params.pytest-args )"
133
133
134
134
---
135
135
apiVersion : tekton.dev/v1beta1
@@ -151,10 +151,10 @@ spec:
151
151
This task will update the deployment.yaml with the latest image name
152
152
and then apply that yaml file and it's service file.
153
153
params :
154
- - name : image_name
154
+ - name : image-name
155
155
description : The fully qualified name of the new image to deploy
156
156
type : string
157
- - name : manifest_dir
157
+ - name : manifest-dir
158
158
description : The directory in source that contains yaml manifests
159
159
type : string
160
160
default : " k8s"
@@ -168,7 +168,7 @@ spec:
168
168
#!/bin/bash
169
169
set -e
170
170
171
- echo Applying manifests in $(inputs.params.manifest_dir ) directory
171
+ echo Applying manifests in $(inputs.params.manifest-dir ) directory
172
172
173
173
echo "**********************************************************************"
174
174
echo "Installing YQ..."
@@ -177,16 +177,15 @@ spec:
177
177
chmod a+x /usr/bin/yq
178
178
179
179
echo "********************* DEPLOYMENT ***********************"
180
- echo "Deploying $(inputs.params.image_name ) ..."
180
+ echo "Deploying $(inputs.params.image-name ) ..."
181
181
182
- yq -e -i '.spec.template.spec.containers[0].image="$(inputs.params.image_name)"' $(inputs.params.manifest_dir)/deployment.yaml
183
- # sed -i 's|'"$(inputs.params.old_image_name)"'|'"$(inputs.params.image_name)"'|g' $(inputs.params.manifest_dir)/deployment.yaml
184
- cat $(inputs.params.manifest_dir)/deployment.yaml
182
+ yq -e -i '.spec.template.spec.containers[0].image="$(inputs.params.image-name)"' $(inputs.params.manifest-dir)/deployment.yaml
183
+ cat $(inputs.params.manifest-dir)/deployment.yaml
185
184
186
185
echo "************************************************************"
187
186
echo "OC APPLY..."
188
- oc apply -f $(inputs.params.manifest_dir )/deployment.yaml
189
- oc apply -f $(inputs.params.manifest_dir )/service.yaml
187
+ oc apply -f $(inputs.params.manifest-dir )/deployment.yaml
188
+ oc apply -f $(inputs.params.manifest-dir )/service.yaml
190
189
191
190
echo "************************************************************"
192
191
sleep 3
@@ -213,7 +212,7 @@ spec:
213
212
description : >-
214
213
This task will deploy all of the yaml files in the manifest folder.
215
214
params :
216
- - name : manifest_dir
215
+ - name : manifest-dir
217
216
description : The directory in source that contains yaml manifests
218
217
type : string
219
218
default : " k8s"
@@ -224,8 +223,8 @@ spec:
224
223
command : ["/bin/bash", "-c"]
225
224
args :
226
225
- |-
227
- echo Applying manifests in $(inputs.params.manifest_dir ) directory
228
- oc apply -f $(inputs.params.manifest_dir )
226
+ echo Applying manifests in $(inputs.params.manifest-dir ) directory
227
+ oc apply -f $(inputs.params.manifest-dir )
229
228
echo -----------------------------------
230
229
231
230
---
@@ -247,14 +246,14 @@ spec:
247
246
description : >-
248
247
This task can be used to perform bdd tests with behave.
249
248
params :
250
- - name : BASE_URL
249
+ - name : base-url
251
250
description : The url of the application to test
252
251
type : string
253
- - name : WAIT_SECONDS
252
+ - name : wait-seconds
254
253
description : The number of seconds to wait for a reply
255
254
type : string
256
255
default : " 60"
257
- - name : DRIVER
256
+ - name : driver
258
257
description : The web driver to use (chrome or firefox)
259
258
type : string
260
259
default : " chrome"
@@ -264,11 +263,11 @@ spec:
264
263
workingDir : $(workspaces.source.path)
265
264
env :
266
265
- name : BASE_URL
267
- value : $(params.BASE_URL )
266
+ value : $(params.base-url )
268
267
- name : WAIT_SECONDS
269
- value : $(params.WAIT_SECONDS )
268
+ value : $(params.wait-seconds )
270
269
- name : DRIVER
271
- value : $(params.DRIVER )
270
+ value : $(params.driver )
272
271
script : |
273
272
#!/bin/bash
274
273
set -e
0 commit comments