-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.gitlab-ci.yml
44 lines (35 loc) · 1.11 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
# based on example from: https://docs.gitlab.com/ee/ci/examples/artifactory_and_gitlab/index.html
# reference: https://docs.gitlab.com/ee/ci/yaml/
# other article that helped: https://about.gitlab.com/blog/2016/12/14/continuous-delivery-of-a-spring-boot-application-with-gitlab-ci-and-kubernetes/
image: docker:latest
services:
- docker:dind
# stages defined in this pipeline
stages:
- build
- deploy
# 1st job - build code
# make sure to use maven image with jdk 11
build:
image: maven:3.6.2-jdk-11
stage: build
script:
- cd pom && mvn clean install
- cd ../build && mvn clean install
- cd ../third-party && for d in * ; do cd $d; mvn clean install; cd .. ; done
- cd ../core && mvn clean install
- cd ../modules && mvn clean install
- cd ../deploy && mvn clean install && mvn pax:directory && ./prepare-bundles.sh
- cd ..
artifacts:
paths:
- deploy/*
# create docker image
# and deploy it to my test repo
# does not work yet
docker-build:
stage: deploy
script:
- cd deploy
- docker build . -t crce-11
- docker push cajovahouba/crce-test-repo:crce-11-gl