-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.gitlab-ci.yml
75 lines (67 loc) · 1.76 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
# You can override the included template(s) by including variable overrides
# SAST customization: https://docs.gitlab.com/ee/user/application_security/sast/#customizing-the-sast-settings
# Secret Detection customization: https://docs.gitlab.com/ee/user/application_security/secret_detection/#customizing-settings
# Dependency Scanning customization: https://docs.gitlab.com/ee/user/application_security/dependency_scanning/#customizing-the-dependency-scanning-settings
# Note that environment variables can be set in several places
# See https://docs.gitlab.com/ee/ci/variables/#cicd-variable-precedence
variables:
GIT_STRATEGY: clone
stages:
- test
- build
#- docker
- deploy
maven-test:
image: maven:3.8.3-openjdk-17
stage: test
script:
- ./mvnw clean
- ./mvnw test
- cat target/site/jacoco/index.html
maven-package:
image: maven:3.8.3-openjdk-17
stage: build
script:
- ./mvnw clean
- ./mvnw package -DskipTests
artifacts:
paths:
- target/*.jar
npm-packag-front:
image: node:16.19.1
stage: build
script:
- cd vue-user/
- npm install .
- npm run build
- tar -zcvf dist-front.tar.gz dist/
artifacts:
paths:
- vue-user/dist-front.tar.gz
npm-packag-back:
image: node:16.19.1
stage: build
script:
- cd vue-element-admin-4.4.0/
- npm install .
- npm run build:prod
- tar -zcvf dist-back.tar.gz dist/
artifacts:
paths:
- vue-element-admin-4.4.0/dist-back.tar.gz
#docker-image:
# tags:
# - shell
# stage: docker
# script:
# - ./mvnw clean
# - ./mvnw package -DskipTests
# - docker build -t myapp:v1 .
maven-deploy:
image: maven:3.8.3-openjdk-17
stage: deploy
script:
- echo ok.
# include:
# - template: Security/Secret-Detection.gitlab-ci.yml
#- template: Security/Dependency-Scanning.gitlab-ci.yml