-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
85 lines (79 loc) · 1.82 KB
/
.gitlab-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
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
83
84
85
stages:
- springbuild
- springtest
- springdeploy
- androidbuild
- androidtest
spring-build: #this is a JOB
stage: springbuild
tags:
- springboot_tag # this is LINK to the shell runner on the remote-server
script:
- cd Backend/scribbleshare
- chmod +x gradlew
- ./gradlew build
artifacts:
paths:
- Backend/scribbleshare/build/libs/*.jar
rules:
- changes:
- Backend
- .gitlab-ci.yml
spring-test:
stage: springtest
tags:
- springboot_tag
script:
- cd Backend/scribbleshare
- chmod +x gradlew
- ./gradlew test
rules:
- changes:
- Backend
- .gitlab-ci.yml
spring-deploy:
stage: springdeploy #do make a stage with same name!
tags:
- springboot_tag
script:
- cd Backend/scribbleshare
- chmod +x gradlew
- ./gradlew build
- sudo mv build/libs/*-SNAPSHOT.jar /target/web-demo.jar
- sudo systemctl stop system-web-demo
- sudo systemctl start system-web-demo
only:
- master #only deploy when on master branch
android-build: #this is another job
image: javiersantos/android-ci:latest # this is a directive to DOCKER
stage: androidbuild
tags:
- android_tag #this is LINK to the docker runner on the remote-server
before_script:
- export GRADLE_USER_HOME=`pwd`/.gradle
- chmod +x ./Frontend/gradlew
script:
- cd Frontend
- ./gradlew assemble
artifacts:
paths:
- Android_test/app/build/outputs/
rules:
- changes:
- Frontend
- .gitlab-ci.yml
android-test:
image: javiersantos/android-ci:latest
stage: androidtest
before_script:
- export GRADLE_USER_HOME=`pwd`/.gradle
- chmod +x ./Frontend/gradlew
tags:
- android_tag
script:
- cd Frontend
- ./gradlew test
rules:
- changes:
- Frontend
- .gitlab-ci.yml