-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
33 lines (31 loc) · 994 Bytes
/
.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
include:
- project: 'polyflix-do/ci-templates'
file: '/templates/maven.yml'
ref: main
build:
stage: build
extends: .maven
script:
- mvn ${MAVEN_CLI_OPTS} clean package
- echo -e "TAG=$(cat Dockerfile | grep FROM | cut -d ':' -f2)" > build.env
after_script:
- apt update -y && apt install -y --no-install-recommends make npm unzip && rm -rf /var/lib/apt/lists/*
- npm config set @polyflix:registry https://${CI_SERVER_HOST}/api/v4/projects/1343/packages/npm/
- echo "token $CI_JOB_TOKEN"
- echo "//${CI_SERVER_HOST}/api/v4/projects/1343/packages/npm/:_authToken=${CI_JOB_TOKEN}">./keycloak-theme/.npmrc
- make build
artifacts:
expire_in: 1 day
paths:
- "**/*/target/"
reports:
dotenv: build.env
package:
stage: package
dependencies:
- build
extends: docker_build
variables:
CUSTOM_REGISTRIES_DESTINATIONS: "--destination $CI_REGISTRY_IMAGE:$TAG"
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH