搶先一步
VMware 提供培訓和認證,以加速您的進度。
了解更多謹代表 Spring Cloud 團隊,我很高興宣布 Spring Cloud Pipelines 的新里程碑版本 - 1.0.0.M2
。除了修復一些錯誤之外,它還提供了對 Gradle 專案的開箱即用支援。
為了使 Gradle 專案能夠開箱即用,採用了以下主觀判斷的決策
使用 Gradlew Wrapper
自定義 deploy
任務用於部署構件
透過自定義 smoke
任務在已部署的應用程式上執行冒煙測試
透過自定義 e2e
任務在已部署的應用程式上執行端對端測試
自定義 groupId
任務來檢索 group id
自定義 artifactId
任務來檢索 artifact id
自定義 currentVersion
任務來檢索目前版本
自定義 stubIds
任務來檢索應下載存根的協作者列表
這些任務的範例實作可以在這裡找到。 我們將其內容貼在下面
test {
description = "Task to run unit and integration tests"
testLogging {
exceptionFormat = 'full'
}
jvmArgs = systemPropsFromGradle()
exclude 'smoke/**'
exclude 'e2e/**'
}
task smoke(type: Test) {
description = "Task to run smoke tests"
testLogging {
exceptionFormat = 'full'
}
jvmArgs = systemPropsFromGradle()
include 'smoke/**'
}
task e2e(type: Test) {
description = "Task to run end to end tests"
testLogging {
exceptionFormat = 'full'
}
jvmArgs = systemPropsFromGradle()
include 'e2e/**'
}
task deploy(dependsOn: 'publish') {
description = "Abstraction over publishing artifacts to Artifactory / Nexus"
}
task groupId << {
println projectGroupId
}
groupId.description = "Task to retrieve Group ID"
task artifactId << {
println projectArtifactId
}
artifactId.description = "Task to retrieve Artifact ID"
task currentVersion << {
println projectVersion
}
currentVersion.description = "Task to retrieve version"
task stubIds << {
println stubrunnerIds
}
stubIds.description = "Task to retrieve Stub Runner IDS"
[test, smoke, e2e, deploy, groupId, artifactId, currentVersion, stubIds].each {
it.group = "Pipeline"
}
private List<String> systemPropsFromGradle() {
return project.gradle.startParameter.systemPropertiesArgs.entrySet().collect { "-D${it.key}=${it.value}" }
}
與大多數 Spring 專案不同,這個專案無法在任何儲存庫中使用,因為它不是一個函式庫,而是作為一個 github 儲存庫提供,供您下載並用作建立部署管線的範本。
請查看以下任何連結以獲取更多資訊或與我們聯絡