-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.gitlab-ci.yml
67 lines (53 loc) · 1.39 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
stages:
- build
- distribute
yarn:
stage: build
image: node:lts-alpine3.19
tags:
# The shell Gitlab runner has to be used for this
- docker
- amd64
script:
# Install GIT and the submodules
- apk update
- apk add git
- apk add curl
- apk add xz
- apk add build-base
- git submodule init
- git submodule update
# Install all dependencies
- yarn install
# Build the distribtion
- yarn build
# Compress the distribution in the artefact file
- tar cf seacat-admin-webui.tar dist
- lzma -9 -e -T 0 seacat-admin-webui.tar
artifacts:
paths:
- seacat-admin-webui.tar.lzma
azure main:
stage: distribute
image: mcr.microsoft.com/azure-cli
tags:
- docker
- amd64
dependencies:
- yarn
only:
- main
script:
- az storage blob upload --overwrite --file seacat-admin-webui.tar.lzma --container-name "\$web" --name "seacat-admin/master/seacat-admin-webui.tar.lzma" --connection-string "$AZURE_STORAGE_CONNECTION_STRING"
azure tags:
stage: distribute
image: mcr.microsoft.com/azure-cli
tags:
- docker
- amd64
dependencies:
- yarn
only:
- tags
script:
- az storage blob upload --overwrite --file seacat-admin-webui.tar.lzma --container-name "\$web" --name "seacat-admin/${CI_COMMIT_TAG}/seacat-admin-webui.tar.lzma" --connection-string "$AZURE_STORAGE_CONNECTION_STRING"