This repository has been archived by the owner on Sep 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathargo.yml
81 lines (78 loc) · 2.38 KB
/
argo.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
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: debricked-
spec:
entrypoint: debricked
arguments:
parameters:
- name: git-url # For example: https://github.com/debricked/go-templates.git
- name: debricked-token # Consider using kubernetes secrets instead. For more details, see: https://github.com/argoproj/argo-workflows/blob/master/examples/secrets.yaml
templates:
- name: debricked
inputs:
parameters:
- name: git-url
- name: debricked-token
steps:
- - name: build
template: build
arguments:
parameters:
- name: git-url
value: "{{inputs.parameters.git-url}}"
- - name: scan
template: scan
arguments:
parameters:
- name: git-url
value: "{{inputs.parameters.git-url}}"
- name: debricked-token
value: "{{inputs.parameters.debricked-token}}"
artifacts:
- name: repository
from: "{{steps.build.outputs.artifacts.repository}}"
- name: build
inputs:
parameters:
- name: git-url
artifacts:
- name: repository
path: /repository
git: # For more details, see: https://github.com/argoproj/argo-workflows/blob/master/examples/input-artifact-git.yaml
repo: "{{inputs.parameters.git-url}}"
outputs:
artifacts:
- name: repository
path: /repository
container:
name: 'gradle'
image: gradle:7-jdk11
workingDir: /repository
command:
- /bin/sh
- '-c'
args:
- ./gradlew dependencies > .debricked-gradle-dependencies.txt
- name: scan
inputs:
parameters:
- name: debricked-token
- name: git-url
artifacts:
- name: repository
path: /repository
container:
name: 'debricked-scan'
image: debricked/debricked-scan:latest
workingDir: /repository
command:
- /bin/sh
- '-c'
args:
- /argo.sh
env:
- name: DEBRICKED_TOKEN
value: "{{inputs.parameters.debricked-token}}"
- name: DEBRICKED_GIT_URL
value: "{{inputs.parameters.git-url}}"