@testomatio/reporter 1.4.12-beta-bitbucket-pipe β 1.4.13-beta-bitbucket-pipe
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/lib/pipe/bitbucket.js +3 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@ Testomat.io Reporter (this npm package) supports:
|
|
|
11
11
|
- π Integarion with all popular [JavaScript/TypeScript frameworks](./docs/frameworks.md)
|
|
12
12
|
- ποΈ Screenshots, videos, traces [uploaded into S3 bucket](./docs/artifacts.md)
|
|
13
13
|
- π [Stack traces](./docs/stacktrace.md) and error messages
|
|
14
|
-
- π [GitHub](./docs/pipes/github.md)
|
|
14
|
+
- π [GitHub](./docs/pipes/github.md), [GitLab](./docs/pipes/gitlab.md) & [Bitbucket](./docs/pipes/bitbucket.md) integration
|
|
15
15
|
- π
Realtime reports
|
|
16
16
|
- ποΈ Other test frameworks supported via [JUNit XML](./docs/junit.md)
|
|
17
17
|
- πΆββοΈ Steps _(work in progress)_
|
|
@@ -128,6 +128,7 @@ Bring this reporter on CI and never lose test results again!
|
|
|
128
128
|
- [Gitlab](./docs/pipes/gitlab.md)
|
|
129
129
|
- [CSV](./docs/pipes/csv.md)
|
|
130
130
|
- [HTML report](./docs/pipes/html.md)
|
|
131
|
+
- [Bitbucket](./docs/pipes/bitbucket.md)
|
|
131
132
|
- π [JUnit](./docs/junit.md)
|
|
132
133
|
- ποΈ [Artifacts](./docs/artifacts.md)
|
|
133
134
|
- π [Workflows](./docs/workflows.md)
|
package/lib/pipe/bitbucket.js
CHANGED
|
@@ -8,7 +8,7 @@ const { APP_PREFIX, testomatLogoURL } = require('../constants');
|
|
|
8
8
|
const { ansiRegExp, isSameTest } = require('../utils/utils');
|
|
9
9
|
const { statusEmoji, fullName } = require('../utils/pipe_utils');
|
|
10
10
|
|
|
11
|
-
//!
|
|
11
|
+
//! BITBUCKET_ACCESS_TOKEN environment variable is required for this functionality to work
|
|
12
12
|
//! and your pipeline trigger should be a pull request
|
|
13
13
|
|
|
14
14
|
/**
|
|
@@ -23,7 +23,7 @@ class BitbucketPipe {
|
|
|
23
23
|
this.store = store;
|
|
24
24
|
this.tests = [];
|
|
25
25
|
// Bitbucket PAT looks like bbpat-*****
|
|
26
|
-
this.token = params.
|
|
26
|
+
this.token = params.BITBUCKET_ACCESS_TOKEN || process.env.BITBUCKET_ACCESS_TOKEN || this.ENV.BITBUCKET_ACCESS_TOKEN;
|
|
27
27
|
this.hiddenCommentData = `Testomat.io report: ${process.env.BITBUCKET_BRANCH || ''}`;
|
|
28
28
|
|
|
29
29
|
debug(
|
|
@@ -32,11 +32,6 @@ class BitbucketPipe {
|
|
|
32
32
|
`Project key: ${this.ENV.BITBUCKET_PROJECT_KEY}, Pull request ID: ${this.ENV.BITBUCKET_PR_ID}`,
|
|
33
33
|
);
|
|
34
34
|
|
|
35
|
-
if (!this.ENV.BITBUCKET_PROJECT_KEY || !this.ENV.BITBUCKET_PR_ID) {
|
|
36
|
-
debug(`CI pipeline should be run in a Pull Request to have the ability to add the report comment.`);
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
35
|
if (!this.token) {
|
|
41
36
|
debug(`Hint: Bitbucket CI variables are unavailable for unprotected branches by default.`);
|
|
42
37
|
return;
|
|
@@ -111,7 +106,7 @@ class BitbucketPipe {
|
|
|
111
106
|
|
|
112
107
|
if (this.ENV.BITBUCKET_BRANCH && this.ENV.BITBUCKET_COMMIT) {
|
|
113
108
|
// eslint-disable-next-line max-len
|
|
114
|
-
summary += `| **Job** | π· [
|
|
109
|
+
summary += `| **Job** | π· [#${this.ENV.BITBUCKET_BUILD_NUMBER}](https://bitbucket.org/${this.ENV.BITBUCKET_REPO_FULL_NAME}/pipelines/results/${this.ENV.BITBUCKET_BUILD_NUMBER}") by commit: **${this.ENV.BITBUCKET_COMMIT}** |`;
|
|
115
110
|
}
|
|
116
111
|
|
|
117
112
|
const failures = this.tests
|