@@ -62,6 +62,8 @@ export default declare((api, config, dirname) => {
62
62
const env_sha = envs . CI_MERGE_REQUEST_SOURCE_BRANCH_SHA || envs . CI_BUILD_REF || envs . CI_COMMIT_SHA
63
63
const env_projectID = envs . CI_PROJECT_ID
64
64
const env_branch = envs . CI_COMMIT_BRANCH
65
+ const env_buildID = envs . CI_JOB_ID
66
+ const env_buildProvider = 'gitlab_runner'
65
67
66
68
const servePa :{ provider ?:string , compareTarget ?:string } & any = trim ( {
67
69
...config ,
@@ -74,6 +76,8 @@ export default declare((api, config, dirname) => {
74
76
dsn : config . dsn || process . env [ 'DSN' ] || 'http://localhost:3000' ,
75
77
reporter : config . reporter || process . env [ 'REPORTER' ] || '-' ,
76
78
ci : config . ci || process . env [ 'CI' ] || false ,
79
+ buildID : config . buildID || env_buildID || '-' ,
80
+ buildProvider : config . buildProvider || env_buildProvider ,
77
81
} )
78
82
79
83
if ( onlyOne ) {
@@ -109,6 +113,8 @@ export default declare((api, config, dirname) => {
109
113
REPORTER : servePa . reporter ,
110
114
COMPARE_TARGET : servePa . compareTarget || '-' ,
111
115
INSTRUMENT_CWD : servePa . instrumentCwd ,
116
+ BUILD_ID : servePa . buildID ,
117
+ BUILD_PROVIDER : servePa . buildProvider ,
112
118
}
113
119
if ( config . debug ) {
114
120
console . log ( 'Canyon:' , __canyon__ )
@@ -130,10 +136,11 @@ export default declare((api, config, dirname) => {
130
136
reportID : 'initial_coverage_data' ,
131
137
compare_target : __canyon__ . COMPARE_TARGET ,
132
138
instrumentCwd : __canyon__ . INSTRUMENT_CWD ,
133
- // buildID: __canyon__.BUILD_ID
139
+ buildID : __canyon__ . BUILD_ID ,
140
+ buildProvider : __canyon__ . BUILD_PROVIDER ,
134
141
} , {
135
142
headers : {
136
- Authorization : 'Bearer ' + __canyon__ . REPORTER ,
143
+ Authorization : 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6InR6aGFuZ21AdHJpcC5jb20iLCJpZCI6Ijg0MTciLCJpYXQiOjE3NDEyNDEyOTQsImV4cCI6MjA1NjgxNzI5NH0.5R8HQ5ag_HG8_brkFJiSXMZXGTso9bwpLsQ58MQm0zw' ,
137
144
} ,
138
145
timeout : 15000 ,
139
146
...proxy
0 commit comments