Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/datadog-ci/src/commands/elf-symbols/renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export const renderMissingBuildId = (path: string) =>
chalk.red(`${ICONS.FAILED} Error: Invalid or missing 'build_id' file. Expected at path ${path}`)

export const renderGitWarning = (errorMessage: string) =>
chalk.yellow(`${ICONS.WARNING} An error occured while invoking git: ${errorMessage}
chalk.yellow(`${ICONS.WARNING} An error occurred while invoking git: ${errorMessage}
Make sure the command is running within your git repository to fully leverage Datadog's git integration.
To ignore this warning use the --disable-git flag.\n`)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export const renderCommandSummary = (statuses: UploadStatus[], duration: number,
}

export const renderGitWarning = (errorMessage: string) =>
chalk.yellow(`${ICONS.WARNING} An error occured while invoking git: ${errorMessage}
chalk.yellow(`${ICONS.WARNING} An error occurred while invoking git: ${errorMessage}
Make sure the command is running within your git repository to fully leverage Datadog's git integration.
To ignore this warning use the --disable-git flag.\n`)

Expand Down
2 changes: 1 addition & 1 deletion packages/datadog-ci/src/commands/pe-symbols/renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export const renderMissingPdbFile = (pdbFilename: string, dllPath: string) =>
chalk.yellow(`${ICONS.WARNING} Error: Missing '${pdbFilename}' file expected for ${dllPath}`)

export const renderGitWarning = (errorMessage: string) =>
chalk.yellow(`${ICONS.WARNING} An error occured while invoking git: ${errorMessage}
chalk.yellow(`${ICONS.WARNING} An error occurred while invoking git: ${errorMessage}
Make sure the command is running within your git repository to fully leverage Datadog's git integration.
To ignore this warning use the --disable-git flag.\n`)

Expand Down
6 changes: 3 additions & 3 deletions packages/datadog-ci/src/commands/react-native/renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import chalk from 'chalk'
import {RNSourcemap} from './interfaces'

export const renderGitWarning = (errorMessage: string) =>
chalk.yellow(`${ICONS.WARNING} An error occured while invoking git: ${errorMessage}
chalk.yellow(`${ICONS.WARNING} An error occurred while invoking git: ${errorMessage}
Make sure the command is running within your git repository to fully leverage Datadog's git integration.
To ignore this warning use the --disable-git flag.\n`)

Expand Down Expand Up @@ -43,12 +43,12 @@ export const renderRemoveSourcesContentWarning = () =>
)}`

export const renderFailedSourcesContentRemovalError = (payload: RNSourcemap, errorMessage: string) => `${chalk.red(
`An error occured while removing the "sourcesContent" part of the sourcemap file ${payload.sourcemapPath}": ${errorMessage}`
`An error occurred while removing the "sourcesContent" part of the sourcemap file ${payload.sourcemapPath}": ${errorMessage}`
)}.
Trying to upload the full sourcemap with the "sourcesContent".`

/**
* As of now, this command takes an array of one signe UploadStatus element since we only support upload
* As of now, this command takes an array of one single UploadStatus element since we only support upload
* of a single sourcemap.
* We considered it was preferable to leave it this way so it's ready for multiple sourcemaps uploads,
* rather than investing into adapting it for this purpose.
Expand Down
7 changes: 4 additions & 3 deletions packages/datadog-ci/src/commands/sourcemaps/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,18 @@ Example: if you're uploading `dist/file.js` to `https://example.com/static/file.
In addition, some optional parameters are available:

* `--max-concurrency` (default: `20`): number of concurrent upload to the API.
* `--disable-git` (default: false): prevents the command from invoking git in the current working directory and sending repository related data to Datadog (hash, remote URL and the paths within the repository of the sources referenced in the sourcemap).
* `--disable-git` (default: false): prevents the command from invoking git in the current working directory and sending repository-related data to Datadog (such as the hash, remote URL, and paths within the repository of sources referenced in the sourcemap).
* `--quiet` (default: false): suppresses individual line output for each upload. Success and error logs are never suppressed.
* `--dry-run` (default: `false`): it will run the command without the final step of upload. All other checks are performed.
* `--project-path` (default: empty): the path of the project where the sourcemaps were built. This will be stripped off from sources paths referenced in the sourcemap so they can be properly matched against tracked files paths. See details in the [dedicated section](#setting-the-project-path).
* `--repository-url` (default: empty): overrides the repository remote with a custom URL. For example: https://github.com/my-company/my-project

### Link errors with your source code

Errors in Datadog UI can be enriched with links to GitHub/GitLab/Bitbucket/Azure DevOps if these requirements are met:
Errors in Datadog UI can be enriched with direct links to your repository if these requirements are met:
- `git` executable is installed
- `datadog-ci` is run within the git repository
- `--disable-git` is not set

When these requirements are met, the upload command reports Git information such as:
- the current commit hash
Expand Down Expand Up @@ -120,4 +121,4 @@ Additional helpful documentation, links, and articles:

- [Learn about Uploading JavaScript Source Maps][1]

[1]: https://docs.datadoghq.com/real_user_monitoring/guide/upload-javascript-source-maps/
[1]: https://docs.datadoghq.com/real_user_monitoring/guide/upload-javascript-source-maps/
2 changes: 1 addition & 1 deletion packages/datadog-ci/src/commands/sourcemaps/renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import chalk from 'chalk'
import {Sourcemap} from './interfaces'

export const renderGitWarning = (errorMessage: string) =>
chalk.yellow(`${ICONS.WARNING} An error occured while invoking git: ${errorMessage}
chalk.yellow(`${ICONS.WARNING} An error occurred while invoking git: ${errorMessage}
Make sure the command is running within your git repository to fully leverage Datadog's git integration.
To ignore this warning use the --disable-git flag.\n`)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export const renderMissingBuildId = (path: string) =>
chalk.red(`${ICONS.FAILED} Error: Invalid or missing 'build_id' file. Expected at path ${path}\n`)

export const renderGitWarning = (errorMessage: string) =>
chalk.yellow(`${ICONS.WARNING} An error occured while invoking git: ${errorMessage}
chalk.yellow(`${ICONS.WARNING} An error occurred while invoking git: ${errorMessage}
Make sure the command is running within your git repository to fully leverage Datadog's git integration.
To ignore this warning use the --disable-git flag.\n`)

Expand Down