-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
87 lines (75 loc) · 4.11 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
stages:
- distribute
Azure master:
stage: distribute
image: mcr.microsoft.com/azure-cli:2.62.0-cbl-mariner2.0
tags:
- docker
- amd64
only:
- main
script:
- yum update -y
- yum install tar xz -y
- tar cf /tmp/asab-maestro-library.tar --exclude='.git' --exclude='./.git' --exclude='./.gitignore' --exclude='./.gitlab-ci.yml' --exclude='./README.md' --exclude='./CHANGELOG' --exclude='./CONTRIBUTING.md' --exclude='./LICENSE' .
- xz -9 -e -T 0 /tmp/asab-maestro-library.tar
- mv /tmp/asab-maestro-library.tar.xz asab-maestro-library.tar.xz
# Calculate the checksum
- sha256sum asab-maestro-library.tar.xz > asab-maestro-library.tar.xz.sha256
- az storage blob upload --overwrite --file asab-maestro-library.tar.xz --container-name "\$web" --name "asab-maestro-library/asab-maestro-library-main.tar.xz" --connection-string "$AZURE_STORAGE_CONNECTION_STRING"
- az storage blob upload --overwrite --file asab-maestro-library.tar.xz.sha256 --container-name "\$web" --name "asab-maestro-library/asab-maestro-library-main.tar.xz.sha256" --connection-string "$AZURE_STORAGE_CONNECTION_STRING"
artifacts:
paths:
- asab-maestro-library.tar.xz
- asab-maestro-library.tar.xz.sha256
Azure branch:
stage: distribute
image: mcr.microsoft.com/azure-cli:2.62.0-cbl-mariner2.0
tags:
- docker
- amd64
only:
- production
- main
script:
- yum update -y
- yum install tar xz -y
- echo ${CI_COMMIT_BRANCH}
- tar cf /tmp/asab-maestro-library.tar --exclude='.git' --exclude='./.git' --exclude='./.gitignore' --exclude='./.gitlab-ci.yml' --exclude='./README.md' --exclude='./CHANGELOG' --exclude='./CONTRIBUTING.md' --exclude='./LICENSE' .
- xz -9 -e -T 0 /tmp/asab-maestro-library.tar
- ls /tmp
- mv /tmp/asab-maestro-library.tar.xz asab-maestro-library-${CI_COMMIT_BRANCH}.tar.xz
# Calculate the checksum
- sha256sum asab-maestro-library-${CI_COMMIT_BRANCH}.tar.xz > asab-maestro-library-${CI_COMMIT_BRANCH}.tar.xz.sha256
- az storage blob upload --overwrite --file asab-maestro-library-${CI_COMMIT_BRANCH}.tar.xz --container-name "\$web" --name "asab-maestro-library/asab-maestro-library-${CI_COMMIT_BRANCH}.tar.xz" --connection-string "$AZURE_STORAGE_CONNECTION_STRING"
- az storage blob upload --overwrite --file asab-maestro-library-${CI_COMMIT_BRANCH}.tar.xz.sha256 --container-name "\$web" --name "asab-maestro-library/asab-maestro-library-${CI_COMMIT_BRANCH}.tar.xz.sha256" --connection-string "$AZURE_STORAGE_CONNECTION_STRING"
artifacts:
paths:
- asab-maestro-library-${CI_COMMIT_BRANCH}.tar.xz
- asab-maestro-library-${CI_COMMIT_BRANCH}.tar.xz.sha256
Azure tag:
stage: distribute
image: mcr.microsoft.com/azure-cli:2.62.0-cbl-mariner2.0
tags:
- docker
- amd64
only:
- tags
except:
- branches
script:
- yum update -y
- yum install tar xz -y
- echo ${CI_COMMIT_REF_NAME}
- tar cf /tmp/asab-maestro-library.tar --exclude='.git' --exclude='./.git' --exclude='./.gitignore' --exclude='./.gitlab-ci.yml' --exclude='./README.md' --exclude='./CHANGELOG' --exclude='./CONTRIBUTING.md' --exclude='./LICENSE' .
- xz -9 -e -T 0 /tmp/asab-maestro-library.tar
- ls /tmp
- mv /tmp/asab-maestro-library.tar.xz asab-maestro-library-${CI_COMMIT_REF_NAME}.tar.xz
# Calculate the checksum
- sha256sum asab-maestro-library-${CI_COMMIT_REF_NAME}.tar.xz > asab-maestro-library-${CI_COMMIT_REF_NAME}.tar.xz.sha256
- az storage blob upload --overwrite --file asab-maestro-library-${CI_COMMIT_REF_NAME}.tar.xz --container-name "\$web" --name "asab-maestro-library/asab-maestro-library-${CI_COMMIT_REF_NAME}.tar.xz" --connection-string "$AZURE_STORAGE_CONNECTION_STRING"
- az storage blob upload --overwrite --file asab-maestro-library-${CI_COMMIT_REF_NAME}.tar.xz.sha256 --container-name "\$web" --name "asab-maestro-library/asab-maestro-library-${CI_COMMIT_REF_NAME}.tar.xz.sha256" --connection-string "$AZURE_STORAGE_CONNECTION_STRING"
artifacts:
paths:
- asab-maestro-library-${CI_COMMIT_REF_NAME}.tar.xz
- asab-maestro-library-${CI_COMMIT_REF_NAME}.tar.xz.sha256