forked from palantir/encrypted-config-value
-
Notifications
You must be signed in to change notification settings - Fork 0
/
circle.yml
43 lines (43 loc) · 1.22 KB
/
circle.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
version: 2
jobs:
build:
working_directory: /root/encrypted-config-value
environment:
TESTS_DIR: /tmp/tests
TERM: dumb
docker:
- image: nmiyake/java:alpine-oracle-jdk-8-t3
cmd: ["/bin/bash"]
steps:
- type: checkout
- type: cache-restore
key: gradle-{{ checksum "/root/encrypted-config-value/gradle/wrapper/gradle-wrapper.properties" }}-v2
- type: shell
name: "Resolve Gradle configurations"
command: ./gradlew resolveConfigurations
- type: cache-save
key: gradle-{{ checksum "/root/encrypted-config-value/gradle/wrapper/gradle-wrapper.properties" }}-v2
paths:
- /root/.gradle
- type: shell
name: "Run checks"
command: ./gradlew check
- type: test-results-store
path: /tmp/tests
- type: deploy
name: "Publish on release tags"
command: |
set -eu
TAG=$(git describe --tags)
if [[ $TAG =~ ^[0-9]+(\.[0-9]+)+$ ]]; then
./gradlew -i bintrayUpload
fi
workflows:
version: 2
build-and-deploy:
jobs:
- build:
filters:
# run on all branches and tags
tags:
only: /.*/