Add pipeline-postgresql-transformer.
Showing
2 changed files
with
111 additions
and
0 deletions
... | @@ -3,6 +3,7 @@ kind: Kustomization | ... | @@ -3,6 +3,7 @@ kind: Kustomization |
3 | 3 | ||
4 | resources: | 4 | resources: |
5 | - ./service-account.yaml | 5 | - ./service-account.yaml |
6 | - ./pipeline-postgresql-transformer.yaml | ||
6 | - ./task-postgresql-pod.yaml | 7 | - ./task-postgresql-pod.yaml |
7 | - ./task-postgresql-create-databases-users.yaml | 8 | - ./task-postgresql-create-databases-users.yaml |
8 | - ./task-postgresql-import.yaml | 9 | - ./task-postgresql-import.yaml | ... | ... |
pipeline-postgresql-transformer.yaml
0 → 100644
1 | --- | ||
2 | apiVersion: tekton.dev/v1beta1 | ||
3 | kind: Pipeline | ||
4 | metadata: | ||
5 | name: pipeline-postgresql-transformer | ||
6 | spec: | ||
7 | params: | ||
8 | - name: databases | ||
9 | type: array | ||
10 | - name: users | ||
11 | type: array | ||
12 | - name: exports | ||
13 | type: array | ||
14 | - name: auth-config-map | ||
15 | type: string | ||
16 | default: "" | ||
17 | - name: auth-secret | ||
18 | type: string | ||
19 | default: "" | ||
20 | - name: s3-items | ||
21 | type: array | ||
22 | default: [] | ||
23 | - name: postgresql-image | ||
24 | type: string | ||
25 | default: bitnami/postgresql:14.1.0-debian-10-r66 | ||
26 | |||
27 | workspaces: | ||
28 | - name: imports | ||
29 | description: Place any input database dump files here | ||
30 | - name: exports | ||
31 | description: The database exports will be placed in this workspace. | ||
32 | - name: transformations | ||
33 | description: The location that transformation scripts are placed. | ||
34 | |||
35 | tasks: | ||
36 | - name: download-from-s3 | ||
37 | taskRef: | ||
38 | name: task-s5cmd-download | ||
39 | workspaces: | ||
40 | - name: files | ||
41 | workspace: imports | ||
42 | params: | ||
43 | - name: auth-config-map | ||
44 | value: $(params.auth-config-map) | ||
45 | - name: auth-secret | ||
46 | value: $(params.auth-secret) | ||
47 | - name: items | ||
48 | value: ["$(params.s3-items[*])"] | ||
49 | - name: postgresql-service | ||
50 | taskRef: | ||
51 | name: task-postgresql-pod | ||
52 | |||
53 | - name: create-databases-users | ||
54 | taskRef: | ||
55 | name: task-postgresql-create-databases-users | ||
56 | params: | ||
57 | - name: databases | ||
58 | value: ["$(params.databases)"] | ||
59 | - name: users | ||
60 | value: ["$(params.users)"] | ||
61 | - name: postgresql-image | ||
62 | value: $(params.postgresql-image) | ||
63 | - name: POSTGRESQL_HOST | ||
64 | value: $(tasks.postgresql-service.results.service-name) | ||
65 | - name: import | ||
66 | runAfter: | ||
67 | - create-databases-users | ||
68 | - download-from-s3 | ||
69 | taskRef: | ||
70 | name: task-postgresql-import | ||
71 | params: | ||
72 | - name: postgresql-image | ||
73 | value: $(params.postgresql-image) | ||
74 | - name: POSTGRESQL_HOST | ||
75 | value: $(tasks.postgresql-service.results.service-name) | ||
76 | workspaces: | ||
77 | - name: imports | ||
78 | workspace: imports | ||
79 | |||
80 | - name: transform | ||
81 | runAfter: | ||
82 | - import | ||
83 | taskRef: | ||
84 | name: task-postgresql-transformer | ||
85 | params: | ||
86 | - name: postgresql-image | ||
87 | value: $(params.postgresql-image) | ||
88 | - name: POSTGRESQL_HOST | ||
89 | value: $(tasks.postgresql-service.results.service-name) | ||
90 | workspaces: | ||
91 | - name: transformations | ||
92 | workspace: transformations | ||
93 | |||
94 | - name: export | ||
95 | runAfter: | ||
96 | - transform | ||
97 | taskRef: | ||
98 | name: task-postgresql-export | ||
99 | params: | ||
100 | - name: exports | ||
101 | value: ["$(params.exports)"] | ||
102 | - name: postgresql-image | ||
103 | value: $(params.postgresql-image) | ||
104 | - name: POSTGRESQL_HOST | ||
105 | value: $(tasks.postgresql-service.results.service-name) | ||
106 | workspaces: | ||
107 | - name: exports | ||
108 | workspace: exports | ||
109 | |||
110 |
-
Please register or sign in to post a comment