-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
51 lines (45 loc) · 1.18 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
image: docker:latest
stages:
- build
- post
services:
- docker:dind
variables:
DOCKER_DRIVER: overlay2
before_script:
- if [ "$CI_COMMIT_REF_NAME" != "master" ]; then BRANCH="/$CI_COMMIT_REF_NAME"; fi
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" "$CI_REGISTRY"
build_x86:
stage: build
tags:
- docker
script:
- docker build -t "$CI_REGISTRY_IMAGE$BRANCH:latest" .
- docker run --rm "$CI_REGISTRY_IMAGE$BRANCH:latest" ./node_modules/.bin/mocha
- docker push "$CI_REGISTRY_IMAGE$BRANCH:latest"
- docker run --name=demo "$CI_REGISTRY_IMAGE$BRANCH:latest" ./node_modules/.bin/webpack --env.demo
- docker cp demo:/usr/src/app/dist public
artifacts:
paths:
- public
expire_in: 1 week
# build_arm7:
# stage: build
# #when: manual
# tags:
# - docker
# script:
# - docker build -t "$CI_REGISTRY_IMAGE$BRANCH:arm7" -f Dockerfile-qemu-arm7 .
# - docker run --rm "$CI_REGISTRY_IMAGE$BRANCH:arm7" ./node_modules/.bin/mocha
# - docker push "$CI_REGISTRY_IMAGE$BRANCH:arm7"
pages:
stage: post
tags:
- docker
script:
- echo nothing to do!
artifacts:
paths:
- public
only:
- master