diff --git a/.circleci/test-deploy.yml b/.circleci/test-deploy.yml index 3e7168b..ba85f8c 100644 --- a/.circleci/test-deploy.yml +++ b/.circleci/test-deploy.yml @@ -1,3 +1,4 @@ +--- version: 2.1 orbs: codecov: codecov/codecov@dev:alpha @@ -56,12 +57,12 @@ jobs: - codecov/upload: flags: backend - codecov/upload: - cli_args: -v - file: coverage/coverage-final.json + fail_on_error: true + files: coverage/coverage-final.json flags: frontend - upload_args: -Z + verbose: true - codecov/upload: - file: coverage/coverage-final.json + files: coverage/coverage-final.json flags: alpine version: v0.2.2 - codecov/upload: @@ -79,14 +80,12 @@ jobs: - codecov/upload: flags: backend - codecov/upload: - cli_args: -v - commit_args: -Z - file: coverage/coverage-final.json + fail_on_error: true + files: coverage/coverage-final.json flags: frontend - report_args: -Z - upload_args: -Z + verbose: true - codecov/upload: - file: coverage/coverage-final.json + files: coverage/coverage-final.json flags: linux version: v0.7.4 - codecov/upload: @@ -104,12 +103,12 @@ jobs: - codecov/upload: flags: backend - codecov/upload: - cli_args: -v - file: coverage/coverage-final.json + fail_on_error: true + files: coverage/coverage-final.json flags: frontend - upload_args: -Z + verbose: true - codecov/upload: - file: coverage/coverage-final.json + files: coverage/coverage-final.json flags: macos version: v0.7.4 - codecov/upload: @@ -128,12 +127,12 @@ jobs: - codecov/upload: flags: backend - codecov/upload: - cli_args: -v - file: coverage/coverage-final.json + fail_on_error: true + files: coverage/coverage-final.json flags: frontend - upload_args: -Z + verbose: true - codecov/upload: - file: coverage/coverage-final.json + files: coverage/coverage-final.json flags: windows version: v0.2.2 - codecov/upload: @@ -149,9 +148,9 @@ workflows: filters: *filters - test-frontend: filters: *filters -# - test-alpine: -# filters: *filters -# requires: [test-backend, test-frontend] + # - test-alpine: + # filters: *filters + # requires: [test-backend, test-frontend] - test-linux: filters: branches: diff --git a/src/@orb.yml b/src/@orb.yml index 0b873a1..6fe0882 100644 --- a/src/@orb.yml +++ b/src/@orb.yml @@ -1,3 +1,4 @@ +--- version: 2.1 description: > diff --git a/src/commands/upload.yml b/src/commands/upload.yml index 3294717..d2790b4 100644 --- a/src/commands/upload.yml +++ b/src/commands/upload.yml @@ -1,3 +1,5 @@ +--- +# yamllint disable rule:line-length description: | Upload your coverage reports to Codecov without dealing with complex configurations. This orb helps you get coverage results quickly so that you @@ -7,29 +9,120 @@ description: | `gnupg` in order to validate. parameters: - cli_args: - description: Any extra arguments provided to the CLI the CLI - (e.g. `-v`). + binary: + description: The file location of a pre-downloaded version of the CLI. If specified, integrity checking will be bypassed. type: string default: "" - commit_args: - description: Any arguments provided to the create-commit step of the CLI - (e.g. `--git-service github-enterprise`). + branch: + description: Branch to which this commit belongs type: string default: "" - file: - description: Path to the code coverage data file to upload. + build: + description: Specify the build number manually + type: string + default: "" + build_url: + description: The URL of the build where this is running + type: string + default: "" + code: + description: The code of the report if using local upload. If unsure, leave default. Read more here https://docs.codecov.com/docs/the-codecov-cli#how-to-use-local-upload + type: string + default: "" + dir: + description: Folder to search for coverage files. Default to the current working directory + type: string + default: "" + disable_file_fixes: + description: Disable file fixes to ignore common lines from coverage (e.g. blank lines or empty brackets). Read more here https://docs.codecov.com/docs/fixing-reports + type: boolean + default: false + disable_search: + description: Disable search for coverage files. This is helpful when specifying what files you want to upload with the files option. + type: boolean + default: false + dry_run: + description: Don't upload files to Codecov. + type: boolean + default: false + enterprise_url: + description: Set to the Codecov instance URl. Only applicable to some Enterprise users. + type: string + default: "" + env: + description: Specify environment variables to be included with this build + type: string + default: "" + excludes: + description: Comma-separated list of folders to exclude from search. + type: string + default: "" + fail_on_error: + description: Exit with non-zero code in case of error. + type: boolean + default: false + files: + description: Comma-separated list of explicit files to upload. These will be added to the coverage files found for upload. If you wish to only upload the specified files, please consider using disable-search to disable uploading other files. type: string default: "" flags: - description: Flag the upload to group coverage metrics (e.g. unittests - | integration | ui,chrome). Flags can be input as strings or - environment variables. + description: Comma-separated list of flags to upload to group coverage metrics. + type: string + default: "" + git_service: + description: One of [github|gitlab|bitbucket|github_enterprise|gitlab_enterprise|bitbucket_server] + type: string + default: "" + handle_no_reports_found: + description: Raise no exceptions when no coverage reports are found. + type: boolean + default: false + job_code: + description: + type: string + default: "" + legacy: + description: Use the legacy upload endpoint. + type: boolean + default: false + network_filter: + description: Specify a filter on the files listed in the network section of the Codecov report. This will only add files whose path begin with the specified filter. Useful for upload-specific path fixing. + type: string + default: "" + network_prefix: + description: Specify a prefix on files listed in the network section of the Codecov report. Useful to help resolve path fixing. + type: string + default: "" + network_root_folder: + description: Root folder from which to consider paths on the network section. Defaults to current working directory. + type: string + default: "" + parent_sha: + description: SHA (with 40 chars) of what should be the parent of this commit. + type: string + default: "" + plugins: + description: Comma-separated list of plugins to run. Specify `noop` to turn off all plugins + type: string + default: "" + pr: + description: Specify the pull request number manually. Used to override pre-existing CI environment variables. type: string default: "" - report_args: - description: Any arguments provided to the create-report step of the CLI - (e.g. `--git-service github-enterprise`). + report_type: + description: The type of file to upload, coverage by default. Possible values are "testing", "coverage". + type: string + default: "coverage" + sha: + description: Commit SHA (with 40 chars) + type: string + default: "" + skip_validation: + description: Skip integrity checking of the CLI. This is NOT recommended. + type: boolean + default: false + slug: + description: Set to the owner/repo slug used instead of the private repo token. Only applicable to some Enterprise users. type: string default: "" token: @@ -38,20 +131,15 @@ parameters: type: env_var_name default: CODECOV_TOKEN upload_name: - description: Custom defined name of the upload. Visible in Codecov UI - type: string - default: "" - upload_args: - description: Any extra flags as provided to the `do-upload` step of the CLI + description: Custom defined name of the upload. Visible in the Codecov UI type: string default: "" - validate: - description: Validate the uploader before uploading the codecov result. + verbose: + description: Use verbose logging in the CLI type: boolean - default: true + default: false version: - description: Which version of the Codecov Uploader to use (defaults to - 'latest') + description: Which version of the Codecov CLI to use (defaults to 'latest') type: string default: "latest" when: @@ -61,28 +149,40 @@ parameters: steps: - run: - name: Download Codecov Uploader - command: <> + name: Upload to Codecov + command: <> when: << parameters.when >> environment: - PARAM_VERSION: << parameters.version >> - - when: - condition: << parameters.validate >> - steps: - - run: - name: Validate Codecov Uploader - command: <> - environment: - CODECOV_PUBLIC_PGP_KEY: <> - - run: - name: Upload Coverage Results - command: <> - environment: - PARAM_CLI_ARGS: << parameters.cli_args >> - PARAM_COMMIT_ARGS: << parameters.commit_args >> - PARAM_FILE: << parameters.file >> - PARAM_FLAGS: << parameters.flags >> - PARAM_REPORT_ARGS: << parameters.report_args >> - PARAM_TOKEN: << parameters.token >> - PARAM_UPLOAD_ARGS: << parameters.upload_args >> - PARAM_UPLOAD_NAME: << parameters.upload_name >> + CC_BINARY: << parameters.binary >> + CC_BRANCH: << parameters.branch >> + CC_BUILD: << parameters.build >> + CC_BUILD_URL: << parameters.build_url >> + CC_CODE: << parameters.code >> + CC_DIR: << parameters.dir >> + CC_DISABLE_FILE_FIXES: << parameters.disable_file_fixes >> + CC_DISABLE_SEARCH: << parameters.disable_search >> + CC_DRY_RUN: << parameters.dry_run >> + CC_ENTERPRISE_URL: << parameters.enterprise_url >> + CC_ENV: << parameters.env >> + CC_EXCLUDES: << parameters.excludes >> + CC_FAIL_ON_ERROR: << parameters.fail_on_error >> + CC_FILES: << parameters.files >> + CC_FLAGS: << parameters.flags >> + CC_GIT_SERVICE: << parameters.git_service >> + CC_HANDLE_NO_REPORTS_FOUND: << parameters.handle_no_reports_found >> + CC_JOB_CODE: << parameters.job_code >> + CC_LEGACY: << parameters.legacy >> + CC_NAME: << parameters.upload_name >> + CC_NETWORK_FILTER: << parameters.network_filter >> + CC_NETWORK_PREFIX: << parameters.network_prefix >> + CC_NETWORK_ROOT_FOLDER: << parameters.network_root_folder >> + CC_PARENT_SHA: << parameters.parent_sha >> + CC_PLUGINS: << parameters.plugins >> + CC_PR: << parameters.pr >> + CC_REPORT_TYPE: << parameters.report_type >> + CC_SHA: << parameters.sha >> + CC_SKIP_VALIDATION: << parameters.skip_validation >> + CC_SLUG: << parameters.slug >> + CC_TOKEN_VAR: << parameters.token >> + CC_VERBOSE: << parameters.verbose >> + CC_VERSION: << parameters.version >> diff --git a/src/scripts b/src/scripts index c0d5281..9a9fbc3 160000 --- a/src/scripts +++ b/src/scripts @@ -1 +1 @@ -Subproject commit c0d5281863d5b66eaa60c69539c174c71de68e46 +Subproject commit 9a9fbc32fdbffe470ca2536570e1100dfc11189c