Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add max file upload argument to test-reporting step #698

Merged
merged 9 commits into from
Sep 5, 2024
36 changes: 31 additions & 5 deletions incubating/test-reporting/step.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ kind: step-type
version: '1.0'
metadata:
name: test-reporting
version: 1.1.4
version: 1.2.0
title: Test reporting
isPublic: true
description: Upload test report to some your storage integration.
description: Upload test report data to your storage integration.
sources:
- 'https://github.com/codefresh-io/cf-docker-test-reporting'
stage: incubating
Expand Down Expand Up @@ -45,7 +45,6 @@ metadata:
branch: ${{CF_BRANCH_TAG_NORMALIZED}}
report_dir: mochawesome-report
report_index_file: mochawesome.html

spec:
arguments: |-
{
Expand Down Expand Up @@ -77,21 +76,39 @@ spec:
"type": "string",
"description": "Directory with test report files"
},
"report_path": {
"type": "string",
"description": "Path where the report files are saved in the bucket"
},
"report_index_file": {
"type": "string",
"description": "Root file that will be open in report"
},
"branch" : {
"type": "string",
"description": "Normalized branch name"
},
"max_upload_size_mb": {
"type": "integer",
"description": "Max upload size in MB",
"default": 1000
},
"cf_api_retries": {
"type": "integer",
"description": "The number of times to retry if a Codefresh API call fails",
"default": 0
},
"image_tag": {
"type": "string",
"description": "The version of test reporting image",
"default": "1.2.0"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self-reminder: make sure the cf-docker-test-reporting:1.2.0 image is published before merging this PR.

}

}
}
stepsTemplate: |-
first:
title: Generate test reporting
image: codefresh/cf-docker-test-reporting:test-report-link
image: codefresh/cf-docker-test-reporting:[[ .Arguments.image_tag ]]
environment:
[[ if .Arguments.allure_dir ]]
- ALLURE_DIR=[[ .Arguments.allure_dir ]]
Expand All @@ -105,6 +122,9 @@ spec:
[[ if .Arguments.report_dir ]]
- REPORT_DIR=[[ .Arguments.report_dir ]]
[[ end ]]
[[ if .Arguments.report_path ]]
- REPORT_PATH=[[ .Arguments.report_path ]]
[[ end ]]
[[ if .Arguments.report_index_file ]]
- REPORT_INDEX_FILE=[[ .Arguments.report_index_file ]]
[[ end ]]
Expand All @@ -113,6 +133,12 @@ spec:
[[ end ]]
[[ if .Arguments.storage_integration ]]
- CF_STORAGE_INTEGRATION=[[ .Arguments.storage_integration ]]
[[ end ]]
[[ if .Arguments.max_upload_size_mb ]]
- MAX_UPLOAD_SIZE_MB=[[ .Arguments.max_upload_size_mb ]]
[[ end ]]
[[ if .Arguments.cf_api_retries ]]
- CF_API_RETRIES=[[ .Arguments.cf_api_retries ]]
[[ end ]]
- CF_STEP_NAME=first
- CF_VOLUME_PATH=/meta
Expand Down
Loading