Version 4.0 and older
Simple plugin that allows for configuration to only become available when
running under specific cloud CI providers.This just leads to a more beautiful
DSL than having to use if
conditions and simultaneously having to remember
which environmental variables to check.
Simply because typing stuff like this looks ugly in a Gradle build script
if( System.getenv()['APPVEYOR'] ) {
test {
jvmArgs '-Xmx:2048m'
}
}
Now you can have a slicker DSL to do the same for a variety of CI products.
Applying the plugin
See https://plugins.gradle.org/plugin/org.ysb33r.cloudci for up to date information on applying this plugin.
Conditional Configuration
Appveyor
ci {
appveyor { (1)
test {
jvmArgs '-Xmx:2048m' (2)
}
}
}
1 | Only run this configuration when on AppVeyor |
2 | By example you can set the JVM Args for tests when on Appveyor. |
Amazon CodeBuild
ci {
codebuild { (1)
test {
jvmArgs '-Xmx:2048m' (2)
}
}
}
1 | Only run this configuration when on AppVeyor |
2 | By example you can set the JVM Args for tests when building on Amazon CodeBuild. |
Bamboo
ci {
bamboo { (1)
test {
jvmArgs '-Xmx:2048m'
}
}
}
1 | Only use this configuration if an Atlassian Bamboo agent is detected. |
Circle CI
ci {
circleci { (1)
test {
jvmArgs '-Xmx:2048m'
}
}
}
1 | Only run this configuration when on Circle CI. |
Codeship
ci {
codeship { (1)
test {
jvmArgs '-Xmx:2048m'
}
}
}
1 | Only run this configuration when on Codeship. |
Drone
ci {
drone { (1)
test {
jvmArgs '-Xmx:2048m'
}
}
}
1 | Only use this configuration if a Drone agent is detected. |
GitHub Actions
ci {
githubactions { (1)
test {
jvmArgs '-Xmx:2048m'
}
}
}
1 | Only use this configuration if a GitHub Actions build is detected. |
GitLab Runners
ci {
gitlabci { (1)
test {
jvmArgs '-Xmx:2048m'
}
}
}
1 | Only use this configuration if a GitLab runner is detected. |
Go CD
ci {
gocd { (1)
test {
jvmArgs '-Xmx:2048m'
}
}
}
1 | Only run this configuration when on Go CD. |
Jenkins CI
ci {
jenkinsci { (1)
test {
jvmArgs '-Xmx:2048m'
}
}
}
1 | Only run this configuration when on a Jenkins CI server. |
Teamcity
ci {
travisci { (1)
test {
jvmArgs '-Xmx:2048m'
}
}
}
1 | Only run this configuration when on Jetbrains Teamcity |
Travis CI
ci {
travisci { (1)
test {
jvmArgs '-Xmx:2048m'
}
}
}
1 | Only run this configuration when on Travis CI |
ci {
any_ci { (1)
test {
jvmArgs '-Xmx:2048m'
}
}
}
1 | Run this configuration if executed under any of the supported CI environments. Use any_ci , as the use of any from previous releases is deprecated). |
ci {
no_ci { (1)
test {
jvmArgs '-Xmx:2048m'
}
}
}
1 | Only run this configuration if none of the supported CI environments are detected. |
Pushing test results to Appveyor’s Build Worker API
If you have any tasks based up on the Gradle Test
class, you can have the test results pushed in real time via the Build Worker API. All you need to do is
plugins {
id 'org.ysb33r.cloudci.appveyor.testreporter' version '<VERSION>' (1)
}
1 | See https://plugins.gradle.org/plugin/org.ysb33r.cloudci.appveyor.testreporter for up to date information on applying this plugin. |
Now when you run your tests the results will be posted when your build runs on Appveyor.
Currently only the Test
task type is supported, which will cover most cases for JVM projects.