]> git.arvados.org - arvados.git/blob - tools/cluster-activity/cluster-activity.cwl
21121: Use template uuid instead of workflow name if wf was deleted
[arvados.git] / tools / cluster-activity / cluster-activity.cwl
1 #!/usr/bin/env cwl-runner
2 # Copyright (C) The Arvados Authors. All rights reserved.
3 #
4 # SPDX-License-Identifier: AGPL-3.0
5
6 cwlVersion: v1.2
7 class: CommandLineTool
8 $namespaces:
9   arv: "http://arvados.org/cwl#"
10   cwltool: "http://commonwl.org/cwltool#"
11
12 inputs:
13   reporting_days: int
14   prometheus_host: string
15   prometheus_apikey: string?
16   prometheus_user: string?
17   prometheus_password: string?
18   exclude: string?
19
20 requirements:
21   DockerRequirement:
22     dockerPull: 'arvados/cluster-activity:2.8.0.dev20240702194009'
23
24   InitialWorkDirRequirement:
25     listing:
26       - entryname: prometheus.env
27         entry: |
28           PROMETHEUS_HOST=$(inputs.prometheus_host)
29           PROMETHEUS_APIKEY=$(inputs.prometheus_apikey)
30           PROMETHEUS_USER=$(inputs.prometheus_user)
31           PROMETHEUS_PASSWORD=$(inputs.prometheus_password)
32
33   arv:APIRequirement: {}
34
35   ResourceRequirement:
36     ramMin: 768
37
38 hints:
39   cwltool:Secrets:
40     secrets: [prometheus_apikey, prometheus_password]
41
42 arguments:
43   - arv-cluster-activity
44   - {prefix: '--prometheus-auth', valueFrom: prometheus.env}
45   - {prefix: '--days', valueFrom: $(inputs.reporting_days)}
46   - {prefix: '--exclude', valueFrom: $(inputs.exclude)}
47   - {prefix: '--html-report-file', valueFrom: report.html}
48
49 outputs:
50   report:
51     type: File
52     outputBinding:
53       glob: report.html