-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
79 lines (69 loc) · 1.81 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
# This YAML file demonstrates building a gradle console app and deploying it to your
# Timberlea account via secure copy.
# NOTE: It does not upload your test results to GitLab, you will need
# to figure that out still.
# NOTE: You will need to adjust the following variable to the build output of your app
# right now it's configured to deploy an Android APK file from another class I taught.
# variables:
# EXECUTABLE_TO_DEPLOY: "app/build/outputs/apk/debug/app-debug.apk"
# DESTINATION_FILE: "App-${CI_PROJECT_NAME}-${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHORT_SHA}.apk"
stages:
- build
- test
- deploy
build-backend:
stage: build
image: maven:latest
script:
- cd backend
- echo "Building backend"
- mvn clean install
artifacts:
paths:
- backend/target/*.jar
tags:
- dalfcs_docker_autoscale
build-frontend:
stage: build
image: node:latest
script:
- cd frontend
- echo "Building frontend"
- npm install
- npm install -g @vue/cli-service
- npm install @vue/cli-plugin-babel
- npm install resize-observer-polyfill
- npm run build
tags:
- dalfcs_docker_autoscale
test-backend:
stage: test
image: maven:latest
script:
- cd backend
- echo "Testing backend"
- mvn clean test
tags:
- dalfcs_docker_autoscale
deploy-backend:
stage: deploy
script:
- echo "Deploying Success"
- apt update
- apt -y install curl
- curl -s https://api.render.com/deploy/srv-ci6gjtdiuieb62u17e5g?key=-fU8hgE5Ymw
tags:
- dalfcs_docker_autoscale
only:
- Release
deploy-frontend:
stage: deploy
script:
- echo "Deploying Success"
- apt update
- apt -y install curl
- curl -k -X POST -d {} https://api.netlify.com/build_hooks/648d24e694a8663c58b939b0
tags:
- dalfcs_docker_autoscale
only:
- Release