forked from blocknetdx/block-dx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
68 lines (62 loc) · 3.19 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
before_script:
- docker info
build_linux:
stage: build
script:
- mkdir -p $CI_PROJECT_DIR/linux
- docker build -f Dockerfile-linux --build-arg GIT_BRANCH=$CI_COMMIT_REF_NAME -t blocknetdx/blockdx-ui-devbuilds:$CI_COMMIT_REF_NAME-$CI_COMMIT_SHA-linux .
- if [ ! -z "$(docker ps -qa -f name=$CI_COMMIT_REF_NAME-$CI_COMMIT_SHA-linux)" ]; then docker rm $CI_COMMIT_REF_NAME-$CI_COMMIT_SHA-linux; fi
- docker run --name=$CI_COMMIT_REF_NAME-$CI_COMMIT_SHA-linux blocknetdx/blockdx-ui-devbuilds:$CI_COMMIT_REF_NAME-$CI_COMMIT_SHA-linux
- docker stop $CI_COMMIT_REF_NAME-$CI_COMMIT_SHA-linux
- docker cp $CI_COMMIT_REF_NAME-$CI_COMMIT_SHA-linux:/opt/blockdx-ui/dist-native/. $CI_PROJECT_DIR/linux
- if [ ! -z "$(docker ps -qa -f name=$CI_COMMIT_REF_NAME-$CI_COMMIT_SHA-linux)" ]; then docker rm $CI_COMMIT_REF_NAME-$CI_COMMIT_SHA-linux; fi
artifacts:
name: "BLOCKDX-$CI_COMMIT_REF_NAME-linux"
paths:
- linux/*.tar.gz
- linux/*.AppImage
- linux/*.deb
test_linux:
stage: test
script:
- "[[ \"$CI_PROJECT_DIR/linux/*.tar.gz\" =~ \\.tar.gz$ ]]"
- "[[ \"$CI_PROJECT_DIR/linux/*.AppImage\" =~ \\.AppImage$ ]]"
- "[[ \"$CI_PROJECT_DIR/linux/*.deb\" =~ \\.deb$ ]]"
build_win:
stage: build
script:
- mkdir -p $CI_PROJECT_DIR/win
- docker build -f Dockerfile-win --build-arg GIT_BRANCH=$CI_COMMIT_REF_NAME -t blocknetdx/blockdx-ui-devbuilds:$CI_COMMIT_REF_NAME-$CI_COMMIT_SHA-win .
- if [ ! -z "$(docker ps -qa -f name=$CI_COMMIT_REF_NAME-$CI_COMMIT_SHA-win)" ]; then docker rm $CI_COMMIT_REF_NAME-$CI_COMMIT_SHA-win; fi
- docker run --name=$CI_COMMIT_REF_NAME-$CI_COMMIT_SHA-win blocknetdx/blockdx-ui-devbuilds:$CI_COMMIT_REF_NAME-$CI_COMMIT_SHA-win
- docker stop $CI_COMMIT_REF_NAME-$CI_COMMIT_SHA-win
- docker cp $CI_COMMIT_REF_NAME-$CI_COMMIT_SHA-win:/opt/blockdx-ui/dist-native/. $CI_PROJECT_DIR/win
- if [ ! -z "$(docker ps -qa -f name=$CI_COMMIT_REF_NAME-$CI_COMMIT_SHA-win)" ]; then docker rm $CI_COMMIT_REF_NAME-$CI_COMMIT_SHA-win; fi
artifacts:
name: "BLOCKDX-$CI_COMMIT_REF_NAME-win"
paths:
- win/*.exe
- win/*.zip
test_win:
stage: test
script:
- "[[ \"$CI_PROJECT_DIR/win/*.exe\" =~ \\.exe$ ]]"
- "[[ \"$CI_PROJECT_DIR/win/*.zip\" =~ \\.zip$ ]]"
build_mac:
stage: build
script:
- mkdir -p $CI_PROJECT_DIR/mac
- docker build -f Dockerfile-mac --build-arg GIT_BRANCH=$CI_COMMIT_REF_NAME -t blocknetdx/blockdx-ui-devbuilds:$CI_COMMIT_REF_NAME-$CI_COMMIT_SHA-mac .
- if [ ! -z "$(docker ps -qa -f name=$CI_COMMIT_REF_NAME-$CI_COMMIT_SHA-mac)" ]; then docker rm $CI_COMMIT_REF_NAME-$CI_COMMIT_SHA-mac; fi
- docker run --name=$CI_COMMIT_REF_NAME-$CI_COMMIT_SHA-mac blocknetdx/blockdx-ui-devbuilds:$CI_COMMIT_REF_NAME-$CI_COMMIT_SHA-mac
- docker stop $CI_COMMIT_REF_NAME-$CI_COMMIT_SHA-mac
- docker cp $CI_COMMIT_REF_NAME-$CI_COMMIT_SHA-mac:/opt/blockdx-ui/dist-native/. $CI_PROJECT_DIR/mac
- if [ ! -z "$(docker ps -qa -f name=$CI_COMMIT_REF_NAME-$CI_COMMIT_SHA-mac)" ]; then docker rm $CI_COMMIT_REF_NAME-$CI_COMMIT_SHA-mac; fi
artifacts:
name: "BLOCKDX-$CI_COMMIT_REF_NAME-mac"
paths:
- mac/*.zip
test_mac:
stage: test
script:
- "[[ \"$CI_PROJECT_DIR/mac/*.zip\" =~ \\.zip$ ]]"