From 6215052c5b15e749ba9ec877bc2109f4e4f87a4c Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Fri, 24 Jul 2020 12:53:41 +0100 Subject: [PATCH 1/4] Polish integration of Gradle Enterprise in CI builds --- ci/pipeline.yml | 23 +++++++++++++++++++++++ ci/scripts/build-project.sh | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/ci/pipeline.yml b/ci/pipeline.yml index b18c14f904..f83240878e 100644 --- a/ci/pipeline.yml +++ b/ci/pipeline.yml @@ -8,10 +8,16 @@ anchors: username: ((docker-hub-username)) password: ((docker-hub-password)) tag: ((milestone)) + gradle-enterprise-task-params: &gradle-enterprise-task-params + GRADLE_ENTERPRISE_ACCESS_KEY: ((gradle_enterprise_secret_access_key)) + GRADLE_ENTERPRISE_CACHE_USERNAME: ((gradle_enterprise_cache_user.username)) + GRADLE_ENTERPRISE_CACHE_PASSWORD: ((gradle_enterprise_cache_user.password)) build-project-task-params: &build-project-task-params privileged: true timeout: ((task-timeout)) file: git-repo/ci/tasks/build-project.yml + params: + <<: *gradle-enterprise-task-params github-task-params: &github-task-params GITHUB_REPO: spring-boot GITHUB_ORGANIZATION: spring-projects @@ -245,14 +251,20 @@ jobs: image: spring-boot-ci-image file: git-repo/ci/tasks/build-samples.yml timeout: ((task-timeout)) + params: + <<: *gradle-enterprise-task-params - task: build-integration-tests image: spring-boot-ci-image file: git-repo/ci/tasks/build-integration-tests.yml timeout: ((task-timeout)) + params: + <<: *gradle-enterprise-task-params - task: build-deployment-tests image: spring-boot-ci-image file: git-repo/ci/tasks/build-deployment-tests.yml timeout: ((task-timeout)) + params: + <<: *gradle-enterprise-task-params on_failure: do: - put: repo-status-build @@ -332,14 +344,20 @@ jobs: image: spring-boot-jdk11-ci-image file: git-repo/ci/tasks/build-samples.yml timeout: ((task-timeout)) + params: + <<: *gradle-enterprise-task-params - task: build-integration-tests image: spring-boot-jdk11-ci-image file: git-repo/ci/tasks/build-integration-tests.yml timeout: ((task-timeout)) + params: + <<: *gradle-enterprise-task-params - task: build-deployment-tests image: spring-boot-jdk11-ci-image file: git-repo/ci/tasks/build-deployment-tests.yml timeout: ((task-timeout)) + params: + <<: *gradle-enterprise-task-params on_failure: do: - put: repo-status-jdk11-build @@ -366,6 +384,8 @@ jobs: tags: - WIN64 timeout: ((task-timeout)) + params: + <<: *gradle-enterprise-task-params on_failure: do: - put: slack-alert @@ -385,6 +405,7 @@ jobs: file: git-repo/ci/tasks/stage.yml params: RELEASE_TYPE: M + GRADLE_ENTERPRISE_ACCESS_KEY: ((gradle_enterprise_secret_access_key)) - put: artifactory-repo params: <<: *artifactory-repo-put-params @@ -403,6 +424,7 @@ jobs: file: git-repo/ci/tasks/stage.yml params: RELEASE_TYPE: RC + GRADLE_ENTERPRISE_ACCESS_KEY: ((gradle_enterprise_secret_access_key)) - put: artifactory-repo params: <<: *artifactory-repo-put-params @@ -421,6 +443,7 @@ jobs: file: git-repo/ci/tasks/stage.yml params: RELEASE_TYPE: RELEASE + GRADLE_ENTERPRISE_ACCESS_KEY: ((gradle_enterprise_secret_access_key)) - put: artifactory-repo params: <<: *artifactory-repo-put-params diff --git a/ci/scripts/build-project.sh b/ci/scripts/build-project.sh index da3c44e472..af694d0057 100755 --- a/ci/scripts/build-project.sh +++ b/ci/scripts/build-project.sh @@ -5,6 +5,6 @@ source $(dirname $0)/common.sh repository=$(pwd)/distribution-repository pushd git-repo > /dev/null -run_maven -N clean verify +run_maven -N clean verify -Dscan=false run_maven -f spring-boot-project/pom.xml clean deploy -U -Dfull -DaltDeploymentRepository=distribution::default::file://${repository} popd > /dev/null From 04940078939d3ab2997ca041a78c1aac8e0c691c Mon Sep 17 00:00:00 2001 From: Nelson Osacky Date: Fri, 24 Jul 2020 15:13:07 +0200 Subject: [PATCH 2/4] Disable extra scans for full profile. The extra scans were not disabled for the full profile, only the regular profile. See gh-22550 --- .../spring-boot-tools/spring-boot-maven-plugin/pom.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/pom.xml b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/pom.xml index cf43bc61ca..acbad25153 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/pom.xml +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/pom.xml @@ -233,6 +233,9 @@ true ${skipTests} true + + false + From 585aed8f8fc77900fbdd8d7d8e31f60d078b68a9 Mon Sep 17 00:00:00 2001 From: Nelson Osacky Date: Fri, 24 Jul 2020 17:46:53 +0200 Subject: [PATCH 3/4] Add generated-snippets as output to test goal The generated snippets were not declared as an output to the `spring-boot-actuator-autoconfigure` test goal so when the test was pulled from the cache, it did not contain the `generated-snippets` directory. This directory is required as an input to the Asciidoctor plugin. See gh-22555 --- .../pom.xml | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/pom.xml b/spring-boot-project/spring-boot-actuator-autoconfigure/pom.xml index b079e67c47..e48c86b767 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/pom.xml +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/pom.xml @@ -734,4 +734,56 @@ + + + + com.gradle + gradle-enterprise-maven-extension + + + + + maven-surefire-plugin + + + default-test + + + + generated-snippets + ${project.basedir}/target/generated-snippets + + + + + + + + asciidoctor-maven-plugin + + + generate-html-documentation + + + + generated-snippets + + ${project.basedir}/target/generated-snippets + + + **/* + + RELATIVE_PATH + + + + + + + + + + + + From d1ea5befea381982b20cc151680c1ee61dc91153 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Sat, 25 Jul 2020 08:27:05 +0100 Subject: [PATCH 4/4] Polish "Add generated-snippets as output to test goal" See gh-22555 --- pom.xml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8e0ebeddfc..adf5416ea3 100644 --- a/pom.xml +++ b/pom.xml @@ -248,13 +248,17 @@ + + com.gradle + gradle-enterprise-maven-extension + 1.5.3 + com.gradle gradle-enterprise-maven-extension - 1.5.3