refactor(executeFreeleapsPipeline): move sourceFetcher instantiation to relevant steps
Signed-off-by: 孙振宇 <>
This commit is contained in:
parent
3728822500
commit
ea5f2c3a0a
@ -13,8 +13,6 @@ def call(Closure closure) {
|
|||||||
closure.delegate = configurations
|
closure.delegate = configurations
|
||||||
closure()
|
closure()
|
||||||
|
|
||||||
def sourceFetcher = new SourceFetcher(this)
|
|
||||||
|
|
||||||
pipeline {
|
pipeline {
|
||||||
agent any
|
agent any
|
||||||
options {
|
options {
|
||||||
@ -58,6 +56,7 @@ spec:
|
|||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
log.info("Pipeline","Commit message linting is enabled")
|
log.info("Pipeline","Commit message linting is enabled")
|
||||||
|
def sourceFetcher = new SourceFetcher(this)
|
||||||
sourceFetcher.fetch(configurations)
|
sourceFetcher.fetch(configurations)
|
||||||
|
|
||||||
def linter = new CommitMessageLinter(this)
|
def linter = new CommitMessageLinter(this)
|
||||||
@ -164,13 +163,14 @@ spec:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (env.executeMode == "fully" || env.changedComponents.contains(component.name)) {
|
if (env.executeMode == "fully" || env.changedComponents.contains(component.name)) {
|
||||||
|
def sourceFetcher = new SourceFetcher(this)
|
||||||
sourceFetcher.fetch(configurations)
|
sourceFetcher.fetch(configurations)
|
||||||
|
|
||||||
def language = ServiceLanguage.parse(component.language)
|
def language = ServiceLanguage.parse(component.language)
|
||||||
|
|
||||||
def depManager = DependenciesManager.parse(component.dependenciesManager)
|
def depManager = DependenciesManager.parse(component.dependenciesManager)
|
||||||
|
|
||||||
def dependenciesResolver = new DependenciesResolver(this, language, env.workspace + "/" + component.root + "/")
|
def dependenciesResolver = new DependenciesResolver(this, language, "${workspace}/" + component.root + "/")
|
||||||
dependenciesResolver.useManager(depManager)
|
dependenciesResolver.useManager(depManager)
|
||||||
|
|
||||||
if (component.buildCacheEnabled) {
|
if (component.buildCacheEnabled) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user