我在Jenkins上运行gradle构建时遇到问题:Gradle版本是https://services.gradle.org/distributions/gradle-2.14.1-bin.zip
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'myApp'.
> Could not resolve all dependencies for configuration ':classpath'.
> Could not resolve org.springframework.boot:spring-boot-gradle-plugin:1.4.2.RELEASE.
Required by:
:myApp:unspecified
> Could not resolve org.springframework.boot:spring-boot-gradle-plugin:1.4.2.RELEASE.
> Could not get resource 'https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-gradle-plugin/1.4.2.RELEASE/spring-boot-gradle-plugin-1.4.2.RELEASE.pom'.
> Could not HEAD 'https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-gradle-plugin/1.4.2.RELEASE/spring-boot-gradle-plugin-1.4.2.RELEASE.pom'.
> repo1.maven.org: Nome o servizio sconosciuto
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
这是我的build.gradle文件:
buildscript {
ext …Run Code Online (Sandbox Code Playgroud) 我还有一个关于詹金斯管道的问题。
如何将构建工件发布到 Windows 共享?在正常的构建作业中,有一个“CIFS 发布者”构建后操作。但是我如何使用它
post{
success {
//publish build artifacts
}
}
Run Code Online (Sandbox Code Playgroud)
有什么例子吗?
我有一个詹金斯管道,应该评估一个名为的布尔参数saveEar:
stage ('Publish to CIFS'){
echo String.valueOf(saveEar)
if ( saveEar ) {
cifsPublisher alwaysPublishFromMaster: false, continueOnError: false, failOnError: false, publishers: [[
configName: 'MY-CONFIG', transfers: [[
cleanRemote: false,
excludes: '',
flatten: false,
makeEmptyDirs: false,
noDefaultExcludes: false,
patternSeparator: '[, ]+',
remoteDirectory: "jenkins-job_" + '$JOB_NAME' + '$BUILD_NUMBER',
remoteDirectorySDF: false,
removePrefix: 'build/libs',
sourceFiles: 'build/libs/my.ear']],
usePromotionTimestamp: false,
useWorkspaceInPromotion: false,
verbose: true
]]
}
}
Run Code Online (Sandbox Code Playgroud)
这是参数配置:
<hudson.model.BooleanParameterDefinition>
<name>saveEar</name>
<description>valore per scegliere se salvare l'EAR generato su XXXX (true => salva, default false)</description>
<defaultValue>false</defaultValue>
</hudson.model.BooleanParameterDefinition> …Run Code Online (Sandbox Code Playgroud)