@@ -9,6 +9,56 @@ pipeline {
99 // https://megalinter.io/latest/config-file/
1010 DEFAULT_WORKSPACE = " ${ WORKSPACE} "
1111
12+ // Uncomment below if used with Bitbucket
13+ /*
14+ TOKEN = credentials('mytoken')
15+ BITBUCKET_REPO_ACCESS_TOKEN = "${env.TOKEN_PSW}"
16+ BITBUCKET_REPO_FULL_NAME = "${env.BITBUCKET_OWNER}/${env.BITBUCKET_REPOSITORY}"
17+ BITBUCKET_GIT_HTTP_ORIGIN = "${env.GIT_URL.replaceAll('\\.git$', '')}"
18+ BITBUCKET_BUILD_NUMBER = "${env.BUILD_NUMBER}"
19+ BITBUCKET_PR_ID = "${env.CHANGE_ID}"
20+ BITBUCKET_STEP_UUID = "${env.BUILD_ID}"
21+ */
22+
23+ // Uncomment below if used with GitLab
24+ /*
25+ GITLAB_TOKEN = credentials('gitlab-token')
26+ CI_JOB_TOKEN = "${env.GITLAB_TOKEN_PSW}"
27+ CI_SERVER_URL = "${env.gitlabHost ?: 'https://gitlab.com'}"
28+ CI_PROJECT_NAME = "${env.gitlabSourceRepoName ?: env.JOB_NAME}"
29+ CI_PROJECT_ID = "${env.gitlabSourceRepoId ?: env.JOB_NAME}"
30+ CI_JOB_URL = "${env.BUILD_URL}"
31+ CI_MERGE_REQUEST_ID = "${env.gitlabMergeRequestIid ?: env.CHANGE_ID ?: ''}"
32+ CI_OPEN_MERGE_REQUESTS = "${env.gitlabMergeRequestLastCommit ?: ''}"
33+ CI_COMMIT_SHA = "${env.gitlabMergeRequestLastCommit ?: env.GIT_COMMIT}"
34+ */
35+
36+ // Uncomment below if used with GitHub
37+ /*
38+ GITHUB_TOKEN = credentials('github-token')
39+ PAT = "${env.GITHUB_TOKEN_PSW}"
40+ GITHUB_REPOSITORY = "${env.CHANGE_URL ? env.CHANGE_URL.replaceAll('https://github.com/', '').split('/pull/')[0] : env.GIT_URL?.replaceAll('^.*github.com[:/]', '')?.replaceAll('\\.git$', '')}"
41+ GITHUB_SERVER_URL = "https://github.com"
42+ GITHUB_API_URL = "https://api.github.com"
43+ GITHUB_REF = "${env.CHANGE_BRANCH ?: env.BRANCH_NAME ?: env.GIT_BRANCH}"
44+ GITHUB_SHA = "${env.GIT_COMMIT}"
45+ GITHUB_RUN_ID = "${env.BUILD_ID}"
46+ GITHUB_WORKFLOW = "${env.JOB_NAME}"
47+ GITHUB_JOB = "${env.STAGE_NAME ?: 'MegaLinter'}"
48+ */
49+
50+ // Uncomment below if used with Azure DevOps
51+ /*
52+ AZURE_TOKEN = credentials('azure-system-token')
53+ SYSTEM_ACCESSTOKEN = "${env.AZURE_TOKEN_PSW}"
54+ SYSTEM_COLLECTIONURI = "${env.ADO_COLLECTION_URI ?: 'https://dev.azure.com/your-org/'}"
55+ SYSTEM_TEAMPROJECT = "${env.ADO_TEAM_PROJECT ?: env.JOB_NAME}"
56+ BUILD_BUILDID = "${env.BUILD_ID}"
57+ BUILD_REPOSITORY_ID = "${env.ADO_REPOSITORY_ID ?: env.GIT_URL?.tokenize('/')?.last()?.replace('.git','')}"
58+ SYSTEM_PULLREQUEST_PULLREQUESTID = "${env.CHANGE_ID ?: ''}"
59+ SYSTEM_PULLREQUEST_SOURCEREPOSITORYURI = "${env.GIT_URL}"
60+ */
61+
1262 // Disable LLM Advisor for bot PRs (dependabot, renovate, etc.)
1363 // Note: Jenkins has limited access to PR metadata, this is a basic check
1464 LLM_ADVISOR_ENABLED = script {
0 commit comments