Skip to content

Commit fbbf728

Browse files
fix: Add verbose env var names
1 parent 241448e commit fbbf728

18 files changed

+221
-0
lines changed

src/ci_providers/provider_appveyorci.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,26 @@ function getServiceParams(inputs) {
7777
}
7878
}
7979

80+
function getEnvVarNames() {
81+
return [
82+
'APPVEYOR',
83+
'APPVEYOR_ACCOUNT_NAME',
84+
'APPVEYOR_BUILD_ID',
85+
'APPVEYOR_BUILD_VERSION',
86+
'APPVEYOR_JOB_ID',
87+
'APPVEYOR_PROJECT_SLUG',
88+
'APPVEYOR_PULL_REQUEST_NUMBER',
89+
'APPVEYOR_REPO_BRANCH',
90+
'APPVEYOR_REPO_COMMIT',
91+
'APPVEYOR_REPO_NAME',
92+
'APPVEYOR_URL',
93+
'CI',
94+
]
95+
}
96+
8097
module.exports = {
8198
detect,
99+
getEnvVarNames,
82100
getServiceName,
83101
getServiceParams,
84102
}

src/ci_providers/provider_azurepipelines.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,22 @@ function getServiceParams(inputs) {
106106
}
107107
}
108108

109+
function getEnvVarNames() {
110+
return [
111+
'BUILD_BUILDID',
112+
'BUILD_BUILDNUMBER',
113+
'BUILD_SOURCEBRANCH',
114+
'BUILD_SOURCEVERSION',
115+
'SYSTEM_PULLREQUEST_PULLREQUESTID',
116+
'SYSTEM_PULLREQUEST_PULLREQUESTNUMBER',
117+
'SYSTEM_TEAMFOUNDATIONSERVERURI',
118+
'SYSTEM_TEAMPROJECT',
119+
]
120+
}
121+
109122
module.exports = {
110123
detect,
124+
getEnvVarNames,
111125
getServiceName,
112126
getServiceParams,
113127
}

src/ci_providers/provider_bitbucket.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,21 @@ function getServiceParams(inputs) {
7171
}
7272
}
7373

74+
function getEnvVarNames() {
75+
return [
76+
'BITBUCKET_BRANCH',
77+
'BITBUCKET_BUILD_NUMBER',
78+
'BITBUCKET_COMMIT',
79+
'BITBUCKET_PR_ID',
80+
'BITBUCKET_REPO_OWNER',
81+
'BITBUCKET_REPO_SLUG',
82+
'CI',
83+
]
84+
}
85+
7486
module.exports = {
7587
detect,
88+
getEnvVarNames,
7689
getServiceName,
7790
getServiceParams,
7891
}

src/ci_providers/provider_buildkite.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,21 @@ function getServiceParams(inputs) {
118118
}
119119
}
120120

121+
function getEnvVarNames() {
122+
return [
123+
'BUILDKITE',
124+
'BUILDKITE_BRANCH',
125+
'BUILDKITE_BUILD_NUMBER',
126+
'BUILDKITE_BUILD_URL',
127+
'BUILDKITE_COMMIT',
128+
'BUILDKITE_JOB_ID',
129+
'BUILDKITE_PROJECT_SLUG',
130+
]
131+
}
132+
121133
module.exports = {
122134
detect,
135+
getEnvVarNames,
123136
getServiceName,
124137
getServiceParams,
125138
}

src/ci_providers/provider_circleci.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,24 @@ function getServiceParams(inputs) {
6565
}
6666
}
6767

68+
function getEnvVarNames() {
69+
return [
70+
'CI',
71+
'CIRCLECI',
72+
'CIRCLE_BRANCH',
73+
'CIRCLE_BUILD_NUM',
74+
'CIRCLE_NODE_INDEX',
75+
'CIRCLE_PROJECT_REPONAME',
76+
'CIRCLE_PROJECT_USERNAME',
77+
'CIRCLE_PR_NUMBER',
78+
'CIRCLE_REPOSITORY_URL',
79+
'CIRCLE_SHA1',
80+
]
81+
}
82+
6883
module.exports = {
6984
detect,
85+
getEnvVarNames,
7086
getServiceName,
7187
getServiceParams,
7288
}

src/ci_providers/provider_cirrus.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,21 @@ function getServiceParams(inputs) {
5757
}
5858
}
5959

60+
function getEnvVarNames() {
61+
return [
62+
'CIRRUS_BRANCH',
63+
'CIRRUS_BUILD_ID',
64+
'CIRRUS_CHANGE_IN_REPO',
65+
'CIRRUS_CI',
66+
'CIRRUS_PR',
67+
'CIRRUS_REPO_FULL_NAME',
68+
'CIRRUS_TASK_ID',
69+
]
70+
}
71+
6072
module.exports = {
6173
detect,
74+
getEnvVarNames,
6275
getServiceName,
6376
getServiceParams,
6477
}

src/ci_providers/provider_codebuild.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,20 @@ function getServiceParams(inputs) {
7676
}
7777
}
7878

79+
function getEnvVarNames() {
80+
return [
81+
'CODEBUILD_BUILD_ID',
82+
'CODEBUILD_CI',
83+
'CODEBUILD_RESOLVED_SOURCE_VERSION',
84+
'CODEBUILD_SOURCE_REPO_URL',
85+
'CODEBUILD_SOURCE_VERSION',
86+
'CODEBUILD_WEBHOOK_HEAD_REF',
87+
]
88+
}
89+
7990
module.exports = {
8091
detect,
92+
getEnvVarNames,
8193
getServiceName,
8294
getServiceParams,
8395
}

src/ci_providers/provider_drone.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,21 @@ function getServiceParams(inputs) {
5858
}
5959
}
6060

61+
function getEnvVarNames() {
62+
return [
63+
'DRONE',
64+
'DRONE_BRANCH',
65+
'DRONE_BUILD_NUMBER',
66+
'DRONE_BUILD_URL',
67+
'DRONE_COMMIT_SHA',
68+
'DRONE_PULL_REQUEST',
69+
'DRONE_REPO_LINK',
70+
]
71+
}
72+
6173
module.exports = {
6274
detect,
75+
getEnvVarNames,
6376
getServiceName,
6477
getServiceParams,
6578
}

src/ci_providers/provider_githubactions.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,22 @@ function getServiceParams(inputs) {
100100
}
101101
}
102102

103+
function getEnvVarNames() {
104+
return [
105+
'GITHUB_ACTION',
106+
'GITHUB_HEAD_REF',
107+
'GITHUB_REF',
108+
'GITHUB_REPOSITORY',
109+
'GITHUB_RUN_ID',
110+
'GITHUB_SERVER_URL',
111+
'GITHUB_SHA',
112+
'GITHUB_WORKFLOW',
113+
]
114+
}
115+
103116
module.exports = {
104117
detect,
118+
getEnvVarNames,
105119
getServiceName,
106120
getServiceParams,
107121
}

src/ci_providers/provider_gitlabci.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,24 @@ function getServiceParams(inputs) {
6666
}
6767
}
6868

69+
function getEnvVarNames() {
70+
return [
71+
'CI_BUILD_ID',
72+
'CI_BUILD_REF',
73+
'CI_BUILD_REF_NAME',
74+
'CI_BUILD_REPO',
75+
'CI_COMMIT_REF_NAME',
76+
'CI_COMMIT_SHA',
77+
'CI_JOB_ID',
78+
'CI_PROJECT_PATH',
79+
'CI_REPOSITORY_URL',
80+
'GITLAB_CI',
81+
]
82+
}
83+
6984
module.exports = {
7085
detect,
86+
getEnvVarNames,
7187
getServiceName,
7288
getServiceParams,
7389
}

0 commit comments

Comments
 (0)