diff --git a/.teamcity/.gitignore b/.teamcity/.gitignore new file mode 100644 --- /dev/null +++ b/.teamcity/.gitignore @@ -0,0 +1,3 @@ +.idea +target +BitcoinABC_dsl.iml diff --git a/.teamcity/BitcoinABC/buildTypes/BitcoinABCMasterLinux.kt b/.teamcity/BitcoinABC/buildTypes/BitcoinABCMasterLinux.kt new file mode 100755 --- /dev/null +++ b/.teamcity/BitcoinABC/buildTypes/BitcoinABCMasterLinux.kt @@ -0,0 +1,49 @@ +package BitcoinABC.buildTypes + +import jetbrains.buildServer.configs.kotlin.v2017_2.* +import jetbrains.buildServer.configs.kotlin.v2017_2.buildSteps.script +import jetbrains.buildServer.configs.kotlin.v2017_2.triggers.vcs + +object BitcoinABCMasterLinux : BuildType({ + uuid = "0a8f3248-ed0a-4c8d-9554-796d8fc3f52e" + id = "BitcoinABCMasterLinux" + name = "Bitcoin-ABC Master" + + enablePersonalBuilds = false + artifactRules = """ + +:output/**/* + +:build/tmp/**/* + +:build/ibd/debug.log + +:build/core + """.trimIndent() + + vcs { + root(BitcoinABC.vcsRoots.BitcoinABCGit) + + checkoutMode = CheckoutMode.ON_AGENT + cleanCheckout = true + } + + steps { + script { + scriptContent = "./contrib/teamcity/build.sh" + } + } + + triggers { + vcs { + // Run every commit + perCheckinTriggering = true + enableQueueOptimization = false + } + } + + features { + feature { + // Parse test reports + type = "xml-report-plugin" + param("xmlReportParsing.reportType", "junit") + param("xmlReportParsing.reportDirs", "+:build/test_bitcoin.xml") + } + } +}) diff --git a/.teamcity/BitcoinABC/vcsRoots/BitcoinABCGit.kt b/.teamcity/BitcoinABC/vcsRoots/BitcoinABCGit.kt new file mode 100755 --- /dev/null +++ b/.teamcity/BitcoinABC/vcsRoots/BitcoinABCGit.kt @@ -0,0 +1,18 @@ +package BitcoinABC.vcsRoots + +import jetbrains.buildServer.configs.kotlin.v2017_2.* +import jetbrains.buildServer.configs.kotlin.v2017_2.vcs.GitVcsRoot + +object BitcoinABCGit : GitVcsRoot({ + uuid = "6bc507be-2572-4968-a4fb-3128ae025398" + id = "BitcoinABCGit" + name = "ssh://vcs@reviews.bitcoinabc.org:2221/source/bitcoin-abc.git" + url = "ssh://vcs@reviews.bitcoinabc.org:2221/source/bitcoin-abc.git" + branchSpec = """ + +:refs/heads/(*) + +:refs/tags/(*) + """.trimIndent() + authMethod = uploadedKey { + uploadedKey = "teamcity" + } +}) diff --git a/.teamcity/BitcoinAbc/Project.kt b/.teamcity/BitcoinAbc/Project.kt new file mode 100755 --- /dev/null +++ b/.teamcity/BitcoinAbc/Project.kt @@ -0,0 +1,18 @@ +package BitcoinABC + +import jetbrains.buildServer.configs.kotlin.v2017_2.* +import jetbrains.buildServer.configs.kotlin.v2017_2.Project +import BitcoinABC.buildTypes.* +import BitcoinABC.vcsRoots.* + + +object Project : Project({ + uuid = "0688f2d8-f1aa-450b-b3f0-34c279245928" + id = "BitcoinABC" + parentId = "_Root" + name = "Bitcoin-ABC" + + vcsRoot(BitcoinABCGit) + + buildType(BitcoinABCMasterLinux) +}) diff --git a/.teamcity/BitcoinAbc/settings.kts b/.teamcity/BitcoinAbc/settings.kts new file mode 100755 --- /dev/null +++ b/.teamcity/BitcoinAbc/settings.kts @@ -0,0 +1,41 @@ +package BitcoinABC + +import jetbrains.buildServer.configs.kotlin.v2017_2.* + +/* +The settings script is an entry point for defining a single +TeamCity project. TeamCity looks for the 'settings.kts' file in a +project directory and runs it if it's found, so the script name +shouldn't be changed and its package should be the same as the +project's id. + +The script should contain a single call to the project() function +with a Project instance or an init function as an argument. + +VcsRoots, BuildTypes, and Templates of this project must be +registered inside project using the vcsRoot(), buildType(), and +template() methods respectively. + +Subprojects can be defined either in their own settings.kts or by +calling the subProjects() method in this project. + +To debug settings scripts in command-line, run the + + mvnDebug org.jetbrains.teamcity:teamcity-configs-maven-plugin:generate + +command and attach your debugger to the port 8000. + +To debug in IntelliJ Idea, open the 'Maven Projects' tool window (View -> +Tool Windows -> Maven Projects), find the generate task +node (Plugins -> teamcity-configs -> teamcity-configs:generate), +the 'Debug' option is available in the context menu for the task. + +More documentation is available in these locations: + +https://blog.jetbrains.com/teamcity/2016/11/kotlin-configuration-scripts-an-introduction/ +https://confluence.jetbrains.com/display/TCD10/Kotlin+DSL +https://build.bitcoinabc.org/app/dsl-documentation/index.html +*/ + +version = "2017.2" +project(BitcoinABC.Project) diff --git a/.teamcity/pom.xml b/.teamcity/pom.xml new file mode 100755 --- /dev/null +++ b/.teamcity/pom.xml @@ -0,0 +1,114 @@ + + + 4.0.0 + BitcoinABC Config DSL Script + + 1.1.4-3 + 2017.2 + + BitcoinABC + BitcoinABC_dsl + 1.0-SNAPSHOT + + + + jetbrains-all + http://download.jetbrains.com/teamcity-repository + + true + + + + teamcity-server + https://build.bitcoinabc.org/app/dsl-plugins-repository + + true + + + + + + + JetBrains + http://download.jetbrains.com/teamcity-repository + + + + + . + + + kotlin-maven-plugin + org.jetbrains.kotlin + ${kotlin.version} + + + + + compile + process-sources + + compile + + + + test-compile + process-test-sources + + test-compile + + + + + + org.jetbrains.teamcity + teamcity-configs-maven-plugin + ${teamcity.dsl.version} + + kotlin + target/generated-configs + + + + + + + + org.jetbrains.teamcity + configs-dsl-kotlin + ${teamcity.dsl.version} + compile + + + org.jetbrains.teamcity + configs-dsl-kotlin-plugins + 1.0-SNAPSHOT + pom + compile + + + org.jetbrains.kotlin + kotlin-runtime + ${kotlin.version} + compile + + + org.jetbrains.kotlin + kotlin-stdlib + ${kotlin.version} + compile + + + org.jetbrains.kotlin + kotlin-script-runtime + ${kotlin.version} + compile + + + org.jetbrains.kotlin + kotlin-reflect + ${kotlin.version} + compile + + + \ No newline at end of file