Skip to content

Commit

Permalink
Only run checks in pipelines with JDK variants
Browse files Browse the repository at this point in the history
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
  • Loading branch information
bclozel committed Apr 28, 2020
1 parent 8ffc333 commit 6072529
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 6 deletions.
12 changes: 6 additions & 6 deletions ci/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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))
Expand Down Expand Up @@ -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))
Expand Down
8 changes: 8 additions & 0 deletions ci/scripts/check-project.sh
Original file line number Diff line number Diff line change
@@ -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
21 changes: 21 additions & 0 deletions ci/tasks/check-project.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 6072529

Please sign in to comment.