Skip to content

Commit

Permalink
Make CI use maven m2 cache instead of downloading (#720)
Browse files Browse the repository at this point in the history
  • Loading branch information
birdstorm committed Jun 4, 2019
1 parent 46743ce commit 0f327f8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .ci/build.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ def call(ghprbActualCommit, ghprbPullId, ghprbPullTitle, ghprbPullLink, ghprbPul
container("java") {
stage('Checkout') {
dir("/home/jenkins/git/tispark") {
sh """
archive_url=http://172.16.30.25/download/builds/pingcap/tiflash/cache/tiflash-m2-cache_latest.tar.gz
if [ ! "\$(ls -A /maven/.m2/repository)" ]; then curl -sL \$archive_url | tar -zx -C /maven || true; fi
"""
if (sh(returnStatus: true, script: '[ -d .git ] && [ -f Makefile ] && git rev-parse --git-dir > /dev/null 2>&1') != 0) {
deleteDir()
}
Expand Down
4 changes: 4 additions & 0 deletions .ci/integration_test.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ def call(ghprbActualCommit, ghprbCommentBody, ghprbPullId, ghprbPullTitle, ghprb
dir("go/src/github.com/pingcap/tispark") {
deleteDir()
sh """
archive_url=http://172.16.30.25/download/builds/pingcap/tiflash/cache/tiflash-m2-cache_latest.tar.gz
if [ ! "\$(ls -A /maven/.m2/repository)" ]; then curl -sL \$archive_url | tar -zx -C /maven || true; fi
"""
sh """
cp -R /home/jenkins/git/tispark/. ./
git checkout -f ${ghprbActualCommit}
find core/src -name '*Suite*' > test
Expand Down

0 comments on commit 0f327f8

Please sign in to comment.