-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
67 lines (57 loc) · 1.62 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
stages:
- buildntest
- deploy
- sonarwithoutdocker
- e2etestingwithoutdocker
buildntest:
image: gradle:7.4.2-jdk17
stage: buildntest
script:
- echo "the ci pipline works" > test.txt
- ls
- cd djigitbet
- chmod +x gradlew
- sed -i -e 's/\r$//' gradlew
- ./gradlew assemble
- ./gradlew test
tags:
- docker
artifacts:
paths:
- test.txt
deploy:
stage: deploy
before_script:
- chmod 400 $SSH_KEY
- ls -l
script:
- ssh -o StrictHostKeyChecking=no -i $SSH_KEY [email protected] "
cd djgitbet/djigitbet && echo CDintoDjigitbet && git pull && echo PULLEDfromGit &&
echo Zzax9js2Erfevvv | sudo docker login --username raga70 --password-stdin &&
echo LOGGED IN TO DOCKER &&
chmod +x gradlew && sed -i -e 's/\r$//' gradlew && ./gradlew assemble &&
sudo docker pull raga70/djigitbetfe:latest &&
sudo docker-compose down && sudo docker-compose up -d --build"
tags:
- docker
#reserved for a windows runner
sonarqube:
stage: sonarwithoutdocker
script:
- cd djigitbet
#- chmod +x gradlew
- ./gradlew assemble
- ./gradlew test jacocoTestReport sonarqube
- echo "DONE- job finished successfully"
tags:
- shell
e2etest:
stage: e2etestingwithoutdocker
script:
- cd E2Etesting
#- chmod +x gradlew
- ./gradlew assemble -x test
- ./gradlew test
- echo "DONE- job finished successfully"
tags:
- shell