forked from archived-codacy/codacy-eslint-legacy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
circle.yml
executable file
·42 lines (39 loc) · 1.95 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
machine:
pre:
- echo 'DOCKER_OPTS="-s btrfs -e lxc -D --userland-proxy=false"' | sudo tee -a /etc/default/docker
- sudo curl -L -o /usr/bin/docker 'https://s3-external-1.amazonaws.com/circle-downloads/docker-1.9.0-circleci-cp-workaround'
- sudo chmod 0755 /usr/bin/docker
- mkdir -p $HOME/.sbt/.lib/0.13.13 && wget https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt-launch/0.13.13/sbt-launch.jar -O $HOME/.sbt/.lib/0.13.13/sbt-launch.jar
- (cd $HOME; rm -f codacy-plugins-test; git clone https://github.com/codacy/codacy-plugins-test.git)
java:
version: oraclejdk8
services:
- docker
dependencies:
override:
- (cd $HOME/codacy-plugins-test && sbt compile)
- (cd $HOME/$CIRCLE_PROJECT_REPONAME && sbt "set version in Docker := \"latest\"" "set name := \"$CIRCLE_PROJECT_REPONAME\"" docker:publishLocal)
cache_directories:
- "~/.ivy2"
- "~/.m2"
- "~/.sbt"
- "~/codacy-plugins-test/target"
- "~/codacy-plugins-test/project/target"
- "~/codacy-plugins-test/project/project"
- "~/$CIRCLE_PROJECT_REPONAME/target"
- "~/$CIRCLE_PROJECT_REPONAME/project/target"
- "~/$CIRCLE_PROJECT_REPONAME/project/project"
test:
pre:
- (cd $HOME/codacy-plugins-test; git fetch --all; git reset --hard origin/master)
override:
- (cd $HOME/codacy-plugins-test && sbt -Dcodacy.tests.ignore.descriptions=true "run-main codacy.plugins.DockerTest json $CIRCLE_PROJECT_REPONAME:latest")
- (cd $HOME/codacy-plugins-test && sbt -Dcodacy.tests.noremove=true -Dcodacy.tests.threads=8 "run-main codacy.plugins.DockerTest pattern $CIRCLE_PROJECT_REPONAME:latest")
deployment:
hub:
branch: master
commands:
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
- docker tag $CIRCLE_PROJECT_REPONAME codacy/$CIRCLE_PROJECT_REPONAME
- docker tag $CIRCLE_PROJECT_REPONAME codacy/$CIRCLE_PROJECT_REPONAME:1.0.$CIRCLE_BUILD_NUM
- docker push codacy/$CIRCLE_PROJECT_REPONAME