Skip to content

Commit 37368db

Browse files
committed
Change build
1 parent 6b8491f commit 37368db

File tree

4 files changed

+177
-22
lines changed

4 files changed

+177
-22
lines changed

.circleci/config.yml

Lines changed: 174 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,174 @@
1+
# CircleCI 2.0 configuration file
2+
version: 2
3+
4+
# Re-usable blocks to reduce boilerplate in job definitions.
5+
references:
6+
7+
sbt_jvm_defaults: &sbt_jvm_defaults
8+
JAVA_OPTS: -Xmx3200m
9+
10+
default_sbt_job: &default_sbt_job
11+
machine: true
12+
working_directory: ~/workdir
13+
environment:
14+
<<: *sbt_jvm_defaults
15+
16+
default_aws_job: &default_aws_job
17+
docker:
18+
- image: codacy/ci-aws:3.0.2
19+
working_directory: ~/workdir/.aws
20+
21+
setup_aws_credentials: &setup_aws_credentials
22+
run:
23+
name: Setup AWS Credentials
24+
command: |
25+
mkdir -p ~/.aws && touch ~/.aws/credentials
26+
cat >> ~/.aws/credentials << EOF
27+
[default]
28+
aws_access_key_id=$ACCESS_KEY_ID
29+
aws_secret_access_key=$SECRET_ACCESS_KEY
30+
[integration]
31+
source_profile = default
32+
role_arn = arn:aws:iam::$AWS_ACCOUNT_ID_INTEGRATION:role/$CONTINUOUS_DELIVERY_ROLE
33+
region=eu-west-1
34+
35+
restore_sbt_cache: &restore_sbt_cache
36+
restore_cache:
37+
keys:
38+
- sbt-cache-{{ .Branch }}-{{ checksum "build.sbt" }}-{{ .Environment.CIRCLE_SHA1 }}
39+
- sbt-cache-{{ .Branch }}-{{ checksum "build.sbt" }}
40+
- sbt-cache-{{ .Branch }}
41+
- sbt-cache
42+
43+
clean_sbt_cache: &clean_sbt_cache
44+
run:
45+
name: CleanCache
46+
command: |
47+
find $HOME/.sbt -name "*.lock" | xargs rm | true
48+
find $HOME/.ivy2 -name "ivydata-*.properties" | xargs rm | true
49+
50+
save_sbt_cache: &save_sbt_cache
51+
save_cache:
52+
key: sbt-cache-{{ .Branch }}-{{ checksum "build.sbt" }}-{{ .Environment.CIRCLE_SHA1 }}
53+
paths:
54+
- "~/.ivy2/cache"
55+
- "~/.sbt"
56+
- "~/.m2"
57+
58+
jobs:
59+
60+
checkout_and_version:
61+
docker:
62+
- image: codacy/git-version:latest
63+
working_directory: ~/workdir
64+
steps:
65+
- checkout
66+
- run:
67+
name: Set version
68+
command: /bin/git-version > .version
69+
- run:
70+
name: Set Sbt version
71+
command: echo "version in ThisBuild := \"$(cat .version)\"" > version.sbt
72+
- run:
73+
name: Current version
74+
command: cat .version
75+
- persist_to_workspace:
76+
root: ~/
77+
paths:
78+
- workdir/*
79+
80+
checkfmt:
81+
<<: *default_sbt_job
82+
steps:
83+
- attach_workspace:
84+
at: ~/
85+
- *restore_sbt_cache
86+
- run:
87+
name: Check formatting
88+
command: sbt ";scalafmt::test;test:scalafmt::test;sbt:scalafmt::test"
89+
- *clean_sbt_cache
90+
- *save_sbt_cache
91+
92+
compile:
93+
<<: *default_sbt_job
94+
steps:
95+
- attach_workspace:
96+
at: ~/
97+
- *restore_sbt_cache
98+
- run:
99+
name: Compile
100+
command: sbt +compile
101+
- *clean_sbt_cache
102+
- *save_sbt_cache
103+
104+
test:
105+
<<: *default_sbt_job
106+
steps:
107+
- attach_workspace:
108+
at: ~/
109+
- *restore_sbt_cache
110+
- run:
111+
name: Compile
112+
command: |
113+
sbt +test
114+
115+
publish:
116+
<<: *default_sbt_job
117+
steps:
118+
- attach_workspace:
119+
at: ~/
120+
- *restore_sbt_cache
121+
- run:
122+
name: Publish
123+
command: |
124+
sbt ";retrieveGPGKeys"
125+
sbt ";+publishSigned;sonatypeReleaseAll"
126+
- *clean_sbt_cache
127+
- *save_sbt_cache
128+
129+
tag_version:
130+
<<: *default_sbt_job
131+
steps:
132+
- attach_workspace:
133+
at: ~/
134+
- add_ssh_keys:
135+
fingerprints:
136+
- "df:83:d7:c7:d5:79:06:c2:3b:d1:fd:e2:a3:d1:12:c5"
137+
- run:
138+
name: Tag
139+
command: git tag $(cat .version) && git push --tags
140+
141+
workflows:
142+
version: 2
143+
compile_deploy:
144+
jobs:
145+
- checkout_and_version:
146+
context: CodacyAWS
147+
- checkfmt:
148+
context: CodacyAWS
149+
requires:
150+
- checkout_and_version
151+
- compile:
152+
context: CodacyAWS
153+
requires:
154+
- checkout_and_version
155+
- test:
156+
context: CodacyAWS
157+
requires:
158+
- compile
159+
- publish:
160+
filters:
161+
branches:
162+
only:
163+
- master
164+
context: CodacyAWS
165+
requires:
166+
- test
167+
- tag_version:
168+
filters:
169+
branches:
170+
only:
171+
- master
172+
context: CodacyAWS
173+
requires:
174+
- publish

circle.yml

Lines changed: 0 additions & 12 deletions
This file was deleted.

project/build.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sbt.version=1.1.6
1+
sbt.version=1.2.8

project/plugins.sbt

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
1-
import sbt.Keys.resolvers
21
import sbt._
32

4-
resolvers := Seq(Resolver.bintrayIvyRepo("typesafe", "ivy-releases"),
5-
Resolver.bintrayRepo("typesafe", "maven-releases"),
6-
Resolver.bintrayRepo("sbt", "maven-releases")) ++ resolvers.value
7-
8-
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "2.3")
9-
10-
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.1")
11-
123
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.2.0")
4+
5+
addSbtPlugin("com.codacy" % "codacy-sbt-plugin" % "13.0.2")

0 commit comments

Comments
 (0)