Newer
Older
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
stages:
- build_app
- test_app
- publish_app
- build_image
- publish_image
variables:
npm_config_registry: https://docker.ub.intern.uni-leipzig.de/npm
npm_install:
stage: build_app
image: node:8-alpine
script:
- npm install
- npm run build
cache:
key: "${CI_COMMIT_SHA}"
paths:
- node_modules
- dist
- public
tags:
- docker
npm_ci:
stage: test_app
image: node:8-alpine
script:
- npm run ci
cache:
key: "${CI_COMMIT_SHA}"
paths:
- dist
- public
tags:
- docker
stage: publish_app
only:
- master
image: node:8-alpine
script:
tags:
- docker
docker_build:
stage: build_image
only:
- master
image: docker:latest
services:
- docker:dind
script:
- docker login --username ${DOCKER_USER} --password ${DOCKER_PASSWORD}
- docker build --no-cache --pull -t bdddev/dacap:latest .
- docker tag bdddev/dacap:latest bdddev/dacap:${CI_PIPELINE_ID}
- docker push bdddev/dacap:${CI_PIPELINE_ID}
- docker push bdddev/dacap:latest
cache:
key: "${CI_COMMIT_SHA}"
paths:
- "*.tgz"