This repository has been archived by the owner on Jun 2, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
81 lines (72 loc) · 2.32 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
79
80
81
#
# requires the following gitlab secret variables
#
# - NEXUS_USERNAME
# - NEXUS_PASSWORD
# - NEXUS_REPO_URL
#
image: maven:3.5.3-jdk-8
before_script:
- export BASELINE=1.16.2
- export REVISION=$BASELINE.$(date +%Y%m%d)-$(date +%H%M)-$(echo $CI_COMMIT_SHA | cut -c1-8)
#
# TODO: uncomment next 2 sections if decide to configure & build incode-examples-app as a Docker image
#
#services:
# - docker:dind
#variables:
# DOCKER_HOST: tcp://docker:2375
# DOCKER_DRIVER: overlay2
# APP_NAME: "incode-examples-app"
stages:
- build-package-push
build-package-push:
stage: build-package-push
script:
- echo "REVISION=$REVISION"
- >
mvn --batch-mode \
clean install \
-Drevision=$REVISION \
$CORE_ADDITIONAL_OPTS
- cd modules
- mvn -s .m2/settings.xml --batch-mode deploy -DskipTests -Drevision=$REVISION -Dnexus-deploy -Dnexus-deploy.repositoryUrl=$NEXUS_REPO_URL
- cd ..
#
# TODO: uncomment if we decide to configure & build the incode-examples-app app as a Docker image
#
#
# requires the additional following gitlab secret variables
#
# - DOCKER_REGISTRY_USERNAME
# - DOCKER_REGISTRY_PASSWORD
# - DOCKER_REGISTRY_EMAIL
# - DOCKER_REGISTRY_NAME # eg "registry-1.docker.io" (for docker hub)
# or "docker-dev.incode.cloud" (eg a cloud-based nexus)
# - DOCKER_REGISTRY_URL # eg "https://index.docker.io/v1/" (for docker hub)
# or "https://repo.incode.cloud/repository/docker-dev/" (eg a cloud-based nexus)
#
#
#
# - cd example/app/extended
# - >
# mvn --batch-mode \
# install \
# -Drevision=$REVISION \
# -Disis.version=$REVISION \
# -Dmavenmixin-docker \
# -Ddocker-plugin.imageName=$DOCKER_REGISTRY_NAME/$DOCKER_REGISTRY_USERNAME/$APP_NAME
# - >
# mvn -s .m2/settings.xml \
# --batch-mode \
# docker:push@push-image-tagged \
# -pl webapp \
# -Drevision=$REVISION \
# -Disis.version=$REVISION \
# -DskipTests \
# -Dskip.isis-swagger \
# -Dmavenmixin-docker \
# -Ddocker-plugin.imageName=$DOCKER_REGISTRY_NAME/$DOCKER_REGISTRY_USERNAME/$APP_NAME \
# -Ddocker-plugin.serverId=docker-registry \
# -Ddocker.registryUrl=$DOCKER_REGISTRY_URL
# - cd ../../..