forked from sigstore/model-transparency
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpipeline.yml
112 lines (112 loc) · 3.25 KB
/
pipeline.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
apiVersion: tekton.dev/v1
kind: Pipeline
metadata:
name: slsa-for-models
spec:
workspaces:
- name: shared
params:
- name: tool-versions
properties:
python: {}
gcloud: {}
default:
python: '3.11'
gcloud: 'slim'
- name: model-source
properties:
url: {}
revision: {}
requirements-path: {}
main-path: {}
default:
url: 'https://github.com/sigstore/model-transparency'
revision: 'main'
requirements-path: 'slsa_for_models/install/requirements_Linux.txt'
main-path: 'slsa_for_models/main.py'
- name: model-name
enum:
- 'tensorflow_model.keras'
- 'tensorflow_hdf5_model.h5'
- 'tensorflow_hdf5.weights.h5'
- 'pytorch_model.pth'
- 'pytorch_full_model.pth'
- 'pytorch_jitted_model.pt'
- name: model-storage
properties:
package: {}
location: {}
repository: {}
results:
- name: source_ARTIFACT_INPUTS
value: $(tasks.git-clone.results.source_ARTIFACT_INPUTS[*])
- name: model_ARTIFACT_OUTPUTS
value: $(tasks.upload-model.results.model_ARTIFACT_OUTPUTS[*])
tasks:
- name: git-clone
workspaces:
- name: output
workspace: shared
params:
- name: url
value: $(params.model-source.url)
- name: revision
value: $(params.model-source.revision)
taskRef:
resolver: git
params:
- name: url
value: https://github.com/sigstore/model-transparency.git
- name: revision
value: $(params.model-source.revision)
- name: pathInRepo
value: slsa_for_models/gcp/tasks/git-clone.yml
- name: build-model
runAfter:
- git-clone
workspaces:
- name: source
workspace: shared
params:
- name: model-name
value: $(params.model-name)
- name: model-source
value:
requirements-path: $(params.model-source.requirements-path)
main-path: $(params.model-source.main-path)
- name: python-version
value: $(params.tool-versions.python)
taskRef:
resolver: git
params:
- name: url
value: https://github.com/sigstore/model-transparency.git
- name: revision
value: $(params.model-source.revision)
- name: pathInRepo
value: slsa_for_models/gcp/tasks/build-model.yml
- name: upload-model
runAfter:
- build-model
workspaces:
- name: shared
params:
- name: config
value:
package: $(params.model-storage.package)
version: $(tasks.build-model.results.digest)
source: $(params.model-name)
location: $(params.model-storage.location)
repository: $(params.model-storage.repository)
- name: tool-versions
value:
gcloud: $(params.tool-versions.gcloud)
taskRef:
resolver: git
params:
- name: url
value: https://github.com/sigstore/model-transparency.git
- name: revision
value: $(params.model-source.revision)
- name: pathInRepo
value: slsa_for_models/gcp/tasks/upload-model.yml