-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathcircle.yml
More file actions
83 lines (78 loc) · 2.73 KB
/
circle.yml
File metadata and controls
83 lines (78 loc) · 2.73 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
version: 2
jobs:
build:
docker:
- image: circleci/openjdk:17-jdk
- image: circleci/mariadb:latest
working_directory: ~/repo
environment:
MAVEN_OPTS: -Xmx3200m
steps:
- checkout
# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ checksum "pom.xml" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-
- run: sudo apt-get update -qq
#- run: sudo apt -y install software-properties-common dirmngr apt-transport-https lsb-release ca-certificates
# - run: sudo add-apt-repository ppa:builds/sphinxsearch-rel22
# - run: sudo apt-get update -qq
# - run: sudo apt-get install libmysqlclient20 unixodbc libpq5
# - run: sudo apt-get install sphinxsearch
- run: ./install/install.sh
- run:
name: install dockerize
command: wget https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz && sudo tar -C /usr/local/bin -xzvf dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz && rm dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz
environment:
DOCKERIZE_VERSION: v0.3.0
- run:
name: Wait for db
command: dockerize -wait tcp://localhost:3306 -timeout 1m
- run:
name: Install MySQL CLI
command: |
sudo apt-get install default-mysql-client
- run: mysql -h 127.0.0.1 -uroot < srvlog-sql/db/create_srvlog_db.sql
#- run: wget https://sphinxsearch.com/files/sphinxsearch_2.3.2-beta-1~xenial_amd64.deb
#- run: sudo dpkg -i sphinxsearch_2.3.2-beta-1~xenial_amd64.deb
- run:
name: Test
command: |
# mvn clean verify -Pintegration-test
mvn clean verify
- persist_to_workspace:
root: .
paths:
- target/*
- save_cache:
paths:
- ~/.m2
key: v1-dependencies-{{ checksum "pom.xml" }}
sonar:
docker:
- image: circleci/openjdk:17-jdk
steps:
- checkout
# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ checksum "pom.xml" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-
- run: ./install/install.sh
- attach_workspace:
at: .
- run:
name: Run Sonar Report
command: |
mvn sonar:sonar -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=vzarubin-github -Dsonar.login=${SONAR_TOKEN}
workflows:
version: 2
work:
jobs:
- build
- sonar:
requires:
- build