refactor(CommitMessageLinter, SourceFetcher): update workspace path configuration for consistency
Signed-off-by: 孙振宇 <>
This commit is contained in:
parent
d568c0e88c
commit
682bbc5ef3
@ -27,7 +27,7 @@ class CommitMessageLinter {
|
|||||||
|
|
||||||
steps.dir(steps.env.workspace) {
|
steps.dir(steps.env.workspace) {
|
||||||
// commit lint cli requires a git repository to lint commit messages, so we need make sure the workspace is a trusted git repository
|
// commit lint cli requires a git repository to lint commit messages, so we need make sure the workspace is a trusted git repository
|
||||||
steps.sh "git config --global --add safe.directory ${steps.env.WORKSPACE}/${steps.env.workspace}"
|
steps.sh "git config --global --add safe.directory ${steps.env.workspace}"
|
||||||
steps.sh "commitlint --verbose -g ${rules} -f HEAD^"
|
steps.sh "commitlint --verbose -g ${rules} -f HEAD^"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -16,7 +16,7 @@ class SourceFetcher {
|
|||||||
steps.error("serviceGitBranch is required")
|
steps.error("serviceGitBranch is required")
|
||||||
}
|
}
|
||||||
|
|
||||||
steps.env.workspace = "workspace"
|
steps.env.workspace = "${steps.env.WORKSPACE}/devops-workspace/${configurations.serviceName}"
|
||||||
|
|
||||||
steps.dir(steps.env.workspace) {
|
steps.dir(steps.env.workspace) {
|
||||||
steps.git branch: configurations.serviceGitBranch, credentialsId: 'git-bot-credentials', url: configurations.serviceGitRepo
|
steps.git branch: configurations.serviceGitBranch, credentialsId: 'git-bot-credentials', url: configurations.serviceGitRepo
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user