Skip to content

Commit

Permalink
oh yeah, now I remember why I was using CircleCI workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
robfletcher committed May 16, 2018
1 parent 8651009 commit f08475a
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 46 deletions.
71 changes: 70 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
paths:
- ~/.gradle
key: v1-dependencies-{{ checksum "build.gradle" }}
- run: ./gradle/circle.sh
- run: ./gradlew build
- run:
name: Archive test results
command: |
Expand All @@ -35,3 +35,72 @@ jobs:
path: ~/junit
- store_artifacts:
path: ~/junit

candidate:
<<: *defaults
steps:
- checkout
- restore_cache:
keys:
- v1-dependencies-{{ checksum "build.gradle" }}
- v1-dependencies-
- run: ./gradlew dependencies
- save_cache:
paths:
- ~/.gradle
key: v1-dependencies-{{ checksum "build.gradle" }}
- run: ./gradlew -Prelease.useLastTag=true build candidate
- run:
name: Archive test results
command: |
mkdir -p ~/junit/
find . -type f -regex ".*/build/test-results/.*xml" -exec cp {} ~/junit/ \;
when: always
- store_test_results:
path: ~/junit
- store_artifacts:
path: ~/junit

release:
<<: *defaults
steps:
- checkout
- restore_cache:
keys:
- v1-dependencies-{{ checksum "build.gradle" }}
- v1-dependencies-
- run: ./gradlew dependencies
- save_cache:
paths:
- ~/.gradle
key: v1-dependencies-{{ checksum "build.gradle" }}
- run: ./gradlew -Prelease.useLastTag=true build final
- run:
name: Archive test results
command: |
mkdir -p ~/junit/
find . -type f -regex ".*/build/test-results/.*xml" -exec cp {} ~/junit/ \;
when: always
- store_test_results:
path: ~/junit
- store_artifacts:
path: ~/junit

workflows:
version: 2
build-commit:
jobs:
- build:
filters:
branches:
ignore: gh-pages
tags:
ignore: /.*/
release-from-tag:
jobs:
- release:
filters:
branches:
ignore: /.*/
tags:
only: /^v.*/
45 changes: 0 additions & 45 deletions gradle/circle.sh

This file was deleted.

0 comments on commit f08475a

Please sign in to comment.