Skip to content

Commit

Permalink
Add max file upload argument to test-reporting step (#698)
Browse files Browse the repository at this point in the history
* add max_upload_size_mb for test-reporting step

* update version

* add missing argument definition

* update tag to new version

* add missing arguments

* update image tag to latest pre-release tag

* add image tag to step

* Fix bugs, defaults and descriptions in step after testing

* Update to full release tag for step
  • Loading branch information
scme0 authored Sep 5, 2024
1 parent 3d0b168 commit 1649290
Showing 1 changed file with 31 additions and 5 deletions.
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"
}
}
}
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

0 comments on commit 1649290

Please sign in to comment.