Skip to content
Open
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
30 changes: 20 additions & 10 deletions bin/helpers/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,14 +195,15 @@ exports.getHostInfo = () => {

exports.getCiInfo = () => {
var env = process.env;

// Jenkins
if ((typeof env.JENKINS_URL === "string" && env.JENKINS_URL.length > 0) || (typeof env.JENKINS_HOME === "string" && env.JENKINS_HOME.length > 0)) {
return {
name: "Jenkins",
build_url: env.BUILD_URL,
job_name: env.JOB_NAME,
build_number: env.BUILD_NUMBER
}
};
}
// CircleCI
if (env.CI === "true" && env.CIRCLECI === "true") {
Expand All @@ -211,7 +212,7 @@ exports.getCiInfo = () => {
build_url: env.CIRCLE_BUILD_URL,
job_name: env.CIRCLE_JOB,
build_number: env.CIRCLE_BUILD_NUM
}
};
}
// Travis CI
if (env.CI === "true" && env.TRAVIS === "true") {
Expand All @@ -220,7 +221,7 @@ exports.getCiInfo = () => {
build_url: env.TRAVIS_BUILD_WEB_URL,
job_name: env.TRAVIS_JOB_NAME,
build_number: env.TRAVIS_BUILD_NUMBER
}
};
}
// Codeship
if (env.CI === "true" && env.CI_NAME === "codeship") {
Expand All @@ -229,7 +230,7 @@ exports.getCiInfo = () => {
build_url: null,
job_name: null,
build_number: null
}
};
}
// Bitbucket
if (env.BITBUCKET_BRANCH && env.BITBUCKET_COMMIT) {
Expand All @@ -238,7 +239,7 @@ exports.getCiInfo = () => {
build_url: env.BITBUCKET_GIT_HTTP_ORIGIN,
job_name: null,
build_number: env.BITBUCKET_BUILD_NUMBER
}
};
}
// Drone
if (env.CI === "true" && env.DRONE === "true") {
Expand All @@ -247,7 +248,7 @@ exports.getCiInfo = () => {
build_url: env.DRONE_BUILD_LINK,
job_name: null,
build_number: env.DRONE_BUILD_NUMBER
}
};
}
// Semaphore
if (env.CI === "true" && env.SEMAPHORE === "true") {
Expand All @@ -256,7 +257,7 @@ exports.getCiInfo = () => {
build_url: env.SEMAPHORE_ORGANIZATION_URL,
job_name: env.SEMAPHORE_JOB_NAME,
build_number: env.SEMAPHORE_JOB_ID
}
};
}
// GitLab
if (env.CI === "true" && env.GITLAB_CI === "true") {
Expand All @@ -265,7 +266,16 @@ exports.getCiInfo = () => {
build_url: env.CI_JOB_URL,
job_name: env.CI_JOB_NAME,
build_number: env.CI_JOB_ID
}
};
}
// GitHub Actions
if (env.GITHUB_ACTIONS === "true" || env.CI === "true" && env.GITHUB_RUN_ID) {
return {
name: "GitHub Actions",
build_url: `${env.GITHUB_SERVER_URL || 'https://github.com'}/${env.GITHUB_REPOSITORY}/actions/runs/${env.GITHUB_RUN_ID}`,
job_name: env.GITHUB_WORKFLOW || env.GITHUB_JOB,
build_number: env.GITHUB_RUN_NUMBER
};
}
// Buildkite
if (env.CI === "true" && env.BUILDKITE === "true") {
Expand All @@ -274,7 +284,7 @@ exports.getCiInfo = () => {
build_url: env.BUILDKITE_BUILD_URL,
job_name: env.BUILDKITE_LABEL || env.BUILDKITE_PIPELINE_NAME,
build_number: env.BUILDKITE_BUILD_NUMBER
}
};
}
// Visual Studio Team Services
if (env.TF_BUILD === "True") {
Expand All @@ -283,7 +293,7 @@ exports.getCiInfo = () => {
build_url: `${env.SYSTEM_TEAMFOUNDATIONSERVERURI}${env.SYSTEM_TEAMPROJECTID}`,
job_name: env.SYSTEM_DEFINITIONID,
build_number: env.BUILD_BUILDID
}
};
}
// if no matches, return null
return null;
Expand Down
4 changes: 4 additions & 0 deletions bin/helpers/usageReporting.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,10 @@ function ci_environment() {
if (env.CI === "true" && env.GITLAB_CI === "true") {
return "GitLab";
}
// GitHub Actions
if (env.GITHUB_ACTIONS === "true" || (env.CI === "true" && env.GITHUB_RUN_ID)) {
return "GitHub Actions";
}
// Buildkite
if (env.CI === "true" && env.BUILDKITE === "true") {
return "Buildkite";
Expand Down
1 change: 1 addition & 0 deletions bin/testObservability/helper/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,7 @@ exports.launchTestSession = async (user_config, bsConfigPath) => {
sdkVersion: helper.getAgentVersion()
}
};

const config = {
auth: {
username: obsUserName,
Expand Down
Loading