-
Notifications
You must be signed in to change notification settings - Fork 1
/
action.yml
94 lines (93 loc) · 5.12 KB
/
action.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
name: 'Teamscale Upload'
author: 'CQSE'
description: 'Uploads external analysis results (coverage, findings, …) to Teamscale.'
branding:
icon: 'upload'
color: 'orange'
inputs:
server:
description: 'The url under which the Teamscale server can be reached.'
required: true
project:
description: 'The project ID to which to upload the data.'
required: true
user:
description: 'The username used to perform the upload. Must have the "Perform External Uploads" permission for the given Teamscale project.'
required: true
partition:
description: 'The partition into which the data is inserted in Teamscale. Successive uploads into the same partition will overwrite the data previously inserted there, so use different partitions if you would instead like to merge data from different sources (e.g. one for Findbugs findings and one for JaCoCo coverage).'
required: true
accesskey:
description: 'The IDE access key of the given user. Can be retrieved in Teamscale under Admin > Users.'
required: true
format:
description: 'The file format of the reports which are specified as command line arguments. See http://cqse.eu/upload-formats for a full list of supported file formats.'
required: false
revision:
description: 'The version control commit for which you obtained the report files. E.g. if you obtained a test coverage report in your CI pipeline, then this is the commit the CI pipeline built before running the tests. Can be either a Git SHA1, a SVN revision number or an Team Foundation changeset ID.'
required: false
repository:
description: 'When using the revision parameter, this parameter allows to pass a repository name which is used to identify the correct commit in situations where the same revision exists in multiple repositories.'
required: false
branch-and-timestamp:
description: "The branch and Unix Epoch timestamp for which you obtained the report files. E.g. if you obtained a test coverage report in your CI pipeline, then this is the branch and the commit timestamp of the commit that the CI pipeline built before
running the tests. The timestamp must be milliseconds since 00:00:00 UTC Thursday, 1 January 1970 or the string HEAD to upload to the latest revision on that branch. \n
Format: BRANCH:TIMESTAMP \n
Example: master:1597845930000 \n
Example: develop:HEAD"
required: false
move-to-last-commit:
description: 'Moves the upload timestamp to right after the last commit.'
required: false
message:
description: 'The message for the commit created in Teamscale for this upload. Will be visible in the Activity perspective. Defaults to a message containing useful meta-information about the upload and the machine performing it.'
required: false
input:
description: 'A file which contains additional report file patterns.'
required: false
insecure:
description: 'Causes SSL certificates to be accepted without validation, which makes using this tool with self-signed or invalid certificates easier.'
required: false
default: 'false'
trusted-keystore:
description: 'A Java keystore file and its corresponding password. The keystore contains additional certificates that should be trusted when performing SSL requests. Separate the path from the password with a semicolon, e.g: /path/to/keystore.jks;PASSWORD The path to the keystore must not contain a semicolon. When this option is used, --validate-ssl will automatically be enabled as well.'
required: false
append-to-message:
description: 'Appends the given line to the message. Use this to augment the autogenerated message instead of replacing it. You may specify multiple lines separated by space to append several lines to the message (e.g., "1 3 10")'
required: false
stacktrace:
description: 'Enables printing stack traces in all cases where errors occur. Used for debugging.'
required: false
default: 'false'
files:
description: 'Path(s) or pattern(s) of the report files to upload. Alternatively, you may provide input files via the input parameter.'
required: false
runs:
using: 'composite'
steps:
- id: 'set-version-number'
name: 'Set Version Number'
run: echo "VERSION=v2.6.0" >> $GITHUB_ENV
shell: bash
- id: 'run-teamscale-upload'
run: "$GITHUB_ACTION_PATH/src/run-teamscale-upload.sh"
env:
OS: ${{ runner.os }}
SERVER: ${{ inputs.server }}
PROJECT: ${{ inputs.project }}
USER: ${{ inputs.user }}
PARTITION: ${{ inputs.partition }}
ACCESSKEY: ${{ inputs.accesskey }}
FORMAT: ${{ inputs.format }}
REVISION: ${{ inputs.revision }}
REPOSITORY: ${{ inputs.repository }}
BRANCH_AND_TIMESTAMP: ${{ inputs.branch-and-timestamp }}
MOVE_TO_LAST_COMMIT: ${{ inputs.move-to-last-commit }}
MESSAGE: ${{ inputs.message }}
INPUT: ${{ inputs.input }}
INSECURE: ${{ inputs.insecure }}
TRUSTED_KEYSTORE: ${{ inputs.trusted-keystore }}
APPEND_TO_MESSAGE: ${{ inputs.append-to-message }}
STACKTRACE: ${{ inputs.stacktrace }}
FILES: ${{ inputs.files }}
shell: 'bash'