-
Notifications
You must be signed in to change notification settings - Fork 42
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
Fix CIRCLE_BUILD_NUM bug and allows users to specify env vars as flags #167
Fix CIRCLE_BUILD_NUM bug and allows users to specify env vars as flags #167
Conversation
This commit fixes the ${CIRCLE_BUILD_NAME} upload name bug by changing the upload_name parameter default string from "${CIRCLE_BUILD_NUM}" to the empty string, then modifying `upload.sh` to replace the PARAM_UPLOAD_NAME env var with the contents of CIRCLE_BUILD_NUM if PARAM_UPLOAD_NAME is the empty string. Signed-off-by: joseph-sentry <joseph.sawaya@sentry.io>
This commit allows users to specify an environment variable as a flag. The codecov uploader will use the contents of the environment variable as the flags when it runs. This commit checks if the string specified in PARAM_FLAGS corresponds to an env var and if it does it passes the contents to the flags option of the uploader. If it doesn't then it uses the PARAM_FLAGS string itself. Signed-off-by: joseph-sentry <joseph.sawaya@sentry.io>
Signed-off-by: joseph-sentry <joseph.sawaya@sentry.io>
Signed-off-by: joseph-sentry <joseph.sawaya@sentry.io>
Codecov Report
@@ Coverage Diff @@
## master #167 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 1 1
Lines 4 4
=========================================
Hits 4 4
Flags with carried forward coverage won't be shown. Click here to find out more. |
Signed-off-by: joseph-sentry <joseph.sawaya@sentry.io>
85c0d6d
to
3360850
Compare
src/commands/upload.yml
Outdated
@@ -13,7 +13,9 @@ parameters: | |||
default: "" | |||
flags: | |||
description: Flag the upload to group coverage metrics (e.g. unittests | |||
| integration | ui,chrome) | |||
| integration | ui,chrome). If the name of an environment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the name of an environment variable is provided as a flag then the value of that environment environment variable will be used.
This is a bit wordy. Can we do something like
Flags can be input as strings or environment variables.
.circleci/test-deploy.yml
Outdated
@@ -80,6 +84,10 @@ jobs: | |||
file: coverage/coverage-final.json | |||
flags: linux | |||
version: v0.1.0_8880 | |||
- codecov/upload: | |||
flags: frontend,ENV_VAR_FLAG |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we use flag names that are more relevant here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the flags themselves, or for the name of the environment variable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
names of the flags. backend
and frontend
are already used
Signed-off-by: joseph-sentry <joseph.sawaya@sentry.io>
557bcca
to
7f38290
Compare
Signed-off-by: joseph-sentry <joseph.sawaya@sentry.io>
This PR fixes the ${CIRCLE_BUILD_NUM} bug in the upload name.
This PR allows users to specify environment variables that specify the
flags to be used in the uploader.
Fixes: codecov/engineering-team#83