1
我正在写一个Jenkins(版本2.6)DSL,它允许我检出并构建一个Maven项目,运行一个shell脚本并将其部署到Artifactory。在Jenkins DSL中运行shell脚本mavenJob
mavenJob("test-build") {
multiscm {
...
}
steps {
shell ("bash build-scripts/script.sh")
}
goals("clean install")
configure{ project ->
project/publishers << 'org.jfrog.hudson.ArtifactoryRedeployPublisher' {
details {
artifactoryUrl('<url>')
artifactoryName('<name>')
repositoryKey('libs-release-local')
snapshotsRepositoryKey('libs-snapshot-local')
}
deployBuildInfo(true)
deployArtifacts(true)
evenIfUnstable(false)
}
publishers {
archiveJunit('target/*/.xml')
publishBuilder {
discardOldBuilds(7,10)
}
}
}
的工作只有当我删除steps{}
块作为steps
不是在mavenJob
允许的工作。我试过使用freeStyleJob
,但ArtifactoryRedeployPublisher
不起作用。
我需要做些什么来运行我的shell脚本?