Commit dcaf90e 1 parent 7266d64 commit dcaf90e Copy full SHA for dcaf90e
File tree 2 files changed +61
-2
lines changed
2 files changed +61
-2
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ apiVersion : tekton.dev/v1beta1
3
+ kind : Task
4
+ metadata :
5
+ name : cleanup
6
+ spec :
7
+ description : This task will clean up a workspace by deleting all the files.
8
+ workspaces :
9
+ - name : source
10
+ steps :
11
+ - name : remove
12
+ image : alpine:3
13
+ env :
14
+ - name : WORKSPACE_SOURCE_PATH
15
+ value : $(workspaces.source.path)
16
+ workingDir : $(workspaces.source.path)
17
+ securityContext :
18
+ runAsNonRoot : false
19
+ runAsUser : 0
20
+ script : |
21
+ #!/usr/bin/env sh
22
+ set -eu
23
+ echo "Removing all files from ${WORKSPACE_SOURCE_PATH} ..."
24
+ # Delete any existing contents of the directory if it exists.
25
+ #
26
+ # We don't just "rm -rf ${WORKSPACE_SOURCE_PATH}" because ${WORKSPACE_SOURCE_PATH} might be "/"
27
+ # or the root of a mounted volume.
28
+ if [ -d "${WORKSPACE_SOURCE_PATH}" ] ; then
29
+ # Delete non-hidden files and directories
30
+ rm -rf "${WORKSPACE_SOURCE_PATH:?}"/*
31
+ # Delete files and directories starting with . but excluding ..
32
+ rm -rf "${WORKSPACE_SOURCE_PATH}"/.[!.]*
33
+ # Delete files and directories starting with .. plus any other character
34
+ rm -rf "${WORKSPACE_SOURCE_PATH}"/..?*
35
+ fi
36
+
37
+ ---
38
+ apiVersion : tekton.dev/v1beta1
39
+ kind : Task
40
+ metadata :
41
+ name : nose
42
+ spec :
43
+ workspaces :
44
+ - name : source
45
+ params :
46
+ - name : args
47
+ description : Arguments to pass to nose
48
+ type : string
49
+ default : " -v"
50
+ steps :
51
+ - name : nosetests
52
+ image : python:3.9-slim
53
+ workingDir : $(workspaces.source.path)
54
+ script : |
55
+ #!/bin/bash
56
+ set -e
57
+ python -m pip install --upgrade pip wheel
58
+ pip install -r requirements.txt
59
+ nosetests $(params.args)
Original file line number Diff line number Diff line change 6
6
app = Flask (__name__ )
7
7
8
8
# This must be imported after the Flask app is created
9
- from service import routes # pylint: disable=wrong-import-position,cyclic-import
10
- from service .common import log_handlers # pylint: disable=wrong-import-position
9
+ from service import routes
10
+ from service .common import log_handlers
11
11
12
12
log_handlers .init_logging (app , "gunicorn.error" )
13
13
You can’t perform that action at this time.
0 commit comments