-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
60 lines (52 loc) · 1.3 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
#include:
# - template: SAST.gitlab-ci.yml
# - template: Dependency-Scanning.gitlab-ci.yml
# - template: License-Management.gitlab-ci.yml
image: docker:git
services:
- docker:dind
before_script:
- echo "$CI_REGISTRY_PASSWORD" | docker login -u "$CI_REGISTRY_USER" "$CI_REGISTRY" --password-stdin
stages:
# - build
- test
- release
- deploy
variables:
# CONTAINER_TEST_IMAGE: $CI_REGISTRY_IMAGE:$CI_BUILD_REF_NAME
CONTAINER_RELEASE_IMAGE: $CI_REGISTRY_IMAGE:latest
release-image:
stage: release
script:
# - docker pull $CONTAINER_TEST_IMAGE
# - docker tag $CONTAINER_TEST_IMAGE $CONTAINER_RELEASE_IMAGE
- cd api
- docker run --rm -v "$PWD":/api -w /api maven:3-jdk-8 mvn clean install
- cd ../item
- docker run --rm -v "$PWD":/item -w /item maven:3-jdk-8 mvn clean install
- cd ..
- docker build -t $CONTAINER_RELEASE_IMAGE .
- docker push $CONTAINER_RELEASE_IMAGE
# tags:
# - docker
only:
- master
pages:
image: ubuntu:latest
stage: deploy
before_script:
- apt-get update
- apt-get install doxygen -y
- apt-get install graphviz -y
script:
- cd api/docs
- doxygen Doxyfile
- mv html ../../public/docs/api
- cd item/docs
- doxygen Doxyfile
- mv html ../../public/docs/item
artifacts:
paths:
- public
# only:
# - master