Skip to content

Commit

Permalink
baseline-circleci no longer applies configuration resolver plugin (#1184
Browse files Browse the repository at this point in the history
)

baseline-circleci no longer applies the (deprecated) configuration resolver plugin
  • Loading branch information
iamdanfox authored and bulldozer-bot[bot] committed Jan 23, 2020
1 parent 10a3647 commit 26ce174
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 40 deletions.
28 changes: 4 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -271,32 +271,12 @@ configurations.all {
```

## com.palantir.baseline-circleci
Automatically applies the following plugins:
The plugin surfaces failures using JUnit XML which is rendered nicely by CircleCI, by

- [`com.palantir.configuration-resolver`](https://github.com/palantir/gradle-configuration-resolver-plugin) - this adds a `./gradlew resolveConfigurations` task which is useful for caching on CI.

Also, the plugin:

1. stores junit test reports in `$CIRCLE_TEST_REPORTS/junit`
2. Converts java compilation errors and checkstyle errors into test failures stored under `$CIRCLE_TEST_REPORTS/javac` and `$CIRCLE_TEST_REPORTS/checkstyle` respectively
1. Storing JUnit test reports in `$CIRCLE_TEST_REPORTS/junit`
2. Converting java compilation errors and checkstyle errors into test failures stored under `$CIRCLE_TEST_REPORTS/javac` and `$CIRCLE_TEST_REPORTS/checkstyle` respectively
![CHECKSTYLE — 1 FAILURE](images/checkstyle-circle-failure.png?raw=true "CircleCI failure image")
3. stores the HTML output of tests in `$CIRCLE_ARTIFACTS/junit`


### Troubleshooting

If you declare a force in `versions.props` that you don't depend on, but query in your repo, such as:
```groovy
dependencyRecommendations.getRecommendedVersion('group', 'name')
```

Then `checkNoUnusedPin` will fail because it can't determine where the version is used. To work around this, you can
put the version at the end of the file after a `# linter:OFF` line, e.g.:

```properties
# linter:OFF
group:name = 1.0.0
```
3. Storeing the HTML output of tests in `$CIRCLE_ARTIFACTS/junit`

## com.palantir.baseline-format

Expand Down
7 changes: 7 additions & 0 deletions changelog/@unreleased/no-more-configuration-resolver.v2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
type: break
break:
description: |+
baseline-circleci no longer applies the (deprecated) configuration resolver plugin which provided the `./gradlew resolveConfigurations` task. We no longer run this on CI, but if you want to keep using it, feel free to depend on the plugin directly.
links:
- https://github.com/palantir/gradle-baseline/pull/1184
1 change: 0 additions & 1 deletion gradle-baseline-java/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ dependencies {
compile 'com.diffplug.spotless:spotless-plugin-gradle'
compile 'com.google.errorprone:error_prone_refaster'
compile 'com.google.guava:guava'
compile 'com.palantir.configurationresolver:gradle-configuration-resolver-plugin'
compile 'net.ltgt.gradle:gradle-errorprone-plugin'
compile 'org.apache.maven.shared:maven-dependency-analyzer'
compile 'org.github.ngbinh.scalastyle:gradle-scalastyle-plugin_2.11'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

import com.google.common.base.Preconditions;
import com.google.common.base.Splitter;
import com.palantir.configurationresolver.ConfigurationResolverPlugin;
import com.palantir.gradle.junit.JunitReportsExtension;
import com.palantir.gradle.junit.JunitReportsPlugin;
import java.io.File;
Expand All @@ -42,9 +41,6 @@ public final class BaselineCircleCi implements Plugin<Project> {
public void apply(Project project) {
project.getPluginManager().apply(JunitReportsPlugin.class);

// the `./gradlew resolveConfigurations` task is used on CI to download all jars for convenient caching
project.getRootProject().allprojects(p -> p.getPluginManager().apply(ConfigurationResolverPlugin.class));

configurePluginsForReports(project);
configurePluginsForArtifacts(project);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,6 @@ class BaselineCircleCiIntegrationTest extends AbstractPluginTest {
new File(System.getenv('CIRCLE_ARTIFACTS')).toPath().deleteDir()
}

def 'applies the configuration resolver plugin'() {
when:
buildFile << standardBuildFile

then:
BuildResult result = with('resolveConfigurations').build()
result.task(':resolveConfigurations').outcome == TaskOutcome.SUCCESS
}

def 'collects html reports'() {
when:
buildFile << standardBuildFile
Expand Down
1 change: 0 additions & 1 deletion versions.lock
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ com.googlecode.java-diff-utils:diffutils:1.3.0 (2 constraints: 3a1dc41d)
com.googlecode.javaewah:JavaEWAH:1.1.6 (1 constraints: 480e7e50)
com.jcraft:jsch:0.1.55 (1 constraints: 7b0ef35e)
com.jcraft:jzlib:1.1.1 (1 constraints: 430e7950)
com.palantir.configurationresolver:gradle-configuration-resolver-plugin:0.4.0 (1 constraints: 0605f735)
com.palantir.javaformat:gradle-palantir-java-format:0.3.9 (1 constraints: 0e05fd35)
com.palantir.javaformat:palantir-java-format-spi:0.3.9 (1 constraints: 7b156abe)
com.palantir.safe-logging:preconditions:1.13.0 (3 constraints: ce234679)
Expand Down
1 change: 0 additions & 1 deletion versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ com.google.errorprone:error_prone_core = 2.3.4
com.google.errorprone:error_prone_refaster = 2.3.4
com.google.errorprone:error_prone_test_helpers = 2.3.4
com.google.guava:guava = 27.1-jre
com.palantir.configurationresolver:gradle-configuration-resolver-plugin = 0.4.0
com.palantir.safe-logging:* = 1.13.0
org.apache.maven.shared:maven-dependency-analyzer = 1.11.1
org.github.ngbinh.scalastyle:gradle-scalastyle-plugin_2.11 = 1.0.1
Expand Down

0 comments on commit 26ce174

Please sign in to comment.