Only run checks in pipelines with JDK variants

This commit updates the build pipeline to only run the checks
(formatting and tests) with the build when non-JDK8 variants are used
for sanity checks.

See gh-22490
This commit is contained in:
Brian Clozel 2020-04-28 15:34:37 +02:00
parent 8ffc3334b4
commit 60725294e2
3 changed files with 35 additions and 6 deletions

View File

@ -205,11 +205,11 @@ jobs:
- put: repo-status-jdk11-build
params: { state: "pending", commit: "git-repo" }
- do:
- task: build-project
- task: check-project
privileged: true
timeout: ((task-timeout))
image: spring-framework-jdk11-ci-image
file: git-repo/ci/tasks/build-project.yml
file: git-repo/ci/tasks/check-project.yml
params:
BRANCH: ((branch))
GRADLE_ENTERPRISE_ACCESS_KEY: ((gradle_enterprise_secret_access_key))
@ -237,11 +237,11 @@ jobs:
- put: repo-status-jdk14-build
params: { state: "pending", commit: "git-repo" }
- do:
- task: build-project
- task: check-project
privileged: true
timeout: ((task-timeout))
image: spring-framework-jdk14-ci-image
file: git-repo/ci/tasks/build-project.yml
file: git-repo/ci/tasks/check-project.yml
params:
BRANCH: ((branch))
GRADLE_ENTERPRISE_ACCESS_KEY: ((gradle_enterprise_secret_access_key))
@ -269,11 +269,11 @@ jobs:
- put: repo-status-jdk15-build
params: { state: "pending", commit: "git-repo" }
- do:
- task: build-project
- task: check-project
privileged: true
timeout: ((task-timeout))
image: spring-framework-jdk15-ci-image
file: git-repo/ci/tasks/build-project.yml
file: git-repo/ci/tasks/check-project.yml
params:
BRANCH: ((branch))
GRADLE_ENTERPRISE_ACCESS_KEY: ((gradle_enterprise_secret_access_key))

8
ci/scripts/check-project.sh Executable file
View File

@ -0,0 +1,8 @@
#!/bin/bash
set -e
source $(dirname $0)/common.sh
pushd git-repo > /dev/null
./gradlew -Dorg.gradle.internal.launcher.welcomeMessageEnabled=false --no-daemon --max-workers=4 check
popd > /dev/null

View File

@ -0,0 +1,21 @@
---
platform: linux
inputs:
- name: git-repo
outputs:
- name: distribution-repository
caches:
- path: gradle
params:
BRANCH:
CI: true
GRADLE_ENTERPRISE_ACCESS_KEY:
GRADLE_ENTERPRISE_CACHE_USERNAME:
GRADLE_ENTERPRISE_CACHE_PASSWORD:
GRADLE_ENTERPRISE_URL: https://ge.spring.io
run:
path: bash
args:
- -ec
- |
${PWD}/git-repo/ci/scripts/check-project.sh