-
Notifications
You must be signed in to change notification settings - Fork 1
/
pipeline.yaml
99 lines (97 loc) · 3.02 KB
/
pipeline.yaml
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
apiVersion: tekton.dev/v1
kind: Pipeline
metadata:
name: push-to-edge
namespace: ci-cd
spec:
params:
- name: MODEL_VERSION
type: string
default: prod
- name: MODEL_VERSION_DIGEST
type: string
- name: BUCKET_NAME
type: string
default: fedora
- default: 'http://minio-fedora-detection.apps.CLUSTER_DOMAIN_NAME/' # CHANGEME with the S3 public endpoint from your OCP cluster
name: S3_ENDPOINT_URL
type: string
- default: 'https://gitea-ci-cd.apps.OCP_DOMAINE_NAME/data-scientist-1/fedora-detection' # CHANGEME with the git repo url. It should be the gitea route endpoint from the full OCP cluster/
name: git_repository_url
type: string
- default: image-registry.openshift-image-registry:5000/ci-cd/edge-detection
name: target_image_url
type: string
description: 'Image name w/o tag, MODEL_VERSION is used for the tag.'
workspaces:
- name: edge-pipeline-pvc
tasks:
- name: git-clone
params:
- name: url
value: $(params.git_repository_url)
- name: revision
value: prod
- name: submodules
value: 'true'
- name: depth
value: '1'
- name: sslVerify
value: 'false'
- name: deleteExisting
value: 'true'
- name: verbose
value: 'true'
taskRef:
kind: ClusterTask
name: git-clone
workspaces:
- name: output
workspace: edge-pipeline-pvc
- name: download-model
params:
- name: S3_ENDPOINT_URL
value: $(params.S3_ENDPOINT_URL)
- name: MODEL_VERSION
value: $(params.MODEL_VERSION)
taskSpec:
params:
- name: S3_ENDPOINT_URL
type: string
- name: MODEL_VERSION
type: string
steps:
- image: registry.redhat.io/ubi9/ubi:latest
script: |
curl $(params.S3_ENDPOINT_URL)/models/registry/$(params.MODEL_VERSION)/model.onnx --output /workspace/output/applications/remote-detection/model/model.pt
workspaces:
- name: output
workspace: edge-pipeline-pvc
runAfter:
- git-clone
- name: build-and-push-to-edge
params:
- name: IMAGE
value: '$(params.target_image_url):$(params.MODEL_VERSION)'
- name: BUILDER_IMAGE
value: >-
registry.redhat.io/rhel8/buildah@sha256:55f5c7d88c77e1ab5a2ab8e877172b2b66cb196e21f10dc45148470d0ee8bbae
- name: DOCKERFILE
value: /workspace/source/applications/remote-detection/Containerfile
- name: CONTEXT
value: /workspace/source/applications/remote-detection
- name: TLSVERIFY
value: 'false'
- name: FORMAT
value: oci
- name: BUILD_EXTRA_ARGS
value: '--platform linux/arm64'
runAfter:
- download-model
taskRef:
kind: ClusterTask
name: buildah
workspaces:
- name: source
workspace: edge-pipeline-pvc
finally: []