forked from hungvv-1301/Book-shop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.sun-ci.yml
38 lines (37 loc) · 1.24 KB
/
.sun-ci.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
stages:
- check
jobs:
- name: detekt
stage: check
image: 30121999/sunci-detekt:latest
cache:
- key: jars-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }}
paths:
- ./gradle
before_script:
- chmod +x ./gradlew
- echo "failed (pray)(sweat);(" > .build_status
- echo "(devil)" > .build_icon
script:
- java -jar /usr/local/bin/detekt-cli-all.jar --all-rules
- status1=$?
- if [[ "$status1" = 0 ]] ; then
- echo "*******************************************************"
- echo " Detekt runs successfully " > .build_status
- echo " (handshake) " > .build_icon
- echo "*******************************************************"
- else
- echo "*******************************************************"
- echo " Detekt failed "
- echo " Please fix the reported issues before commit. "
- echo "*******************************************************"
- exit status1
- fi
only:
branches:
- develop
- main
- master
events:
- pull_request
-