Skip to content

Commit 18412cc

Browse files
authored
Ci (#3)
* Updated to the latest version of the CAS BACnet stack * Downloading CAS BACnet Stack libraries to build release executable
1 parent 6e9b6e1 commit 18412cc

File tree

2 files changed

+31
-8
lines changed

2 files changed

+31
-8
lines changed

.gitlab-ci.yml

Lines changed: 30 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,36 @@
11
variables:
2-
GIT_SUBMODULE_STRATEGY: normal
3-
GIT_STRATEGY: fetch
4-
GIT_DEPTH: 1
5-
6-
cache:
7-
key: ${CI_JOB_NAME}
2+
GIT_SUBMODULE_STRATEGY: recursive
83

94
stages:
5+
- download
106
- build
117

8+
#
9+
# Download CBACnet Stack libaries
10+
# -----------------------------------------------------------------------------
11+
# How to download artifacts from jobs in Gitlab CI https://docs.gitlab.com/ee/api/jobs.html#download-the-artifacts-archive
12+
# Note: the SETTING_PRIVATE_TOKEN parameter is a enviment variable, generated by Steven's user.
13+
#
14+
Download BACnet Stack Libaries Windows:
15+
stage: download
16+
tags:
17+
- docker
18+
image: alpine:latest
19+
only:
20+
- pushes
21+
variables:
22+
GIT_SUBMODULE_STRATEGY: none
23+
script:
24+
# Install Zip and curl
25+
- "apk --no-cache add unzip curl"
26+
- 'curl --location --output CASBACnetStackLibs.zip --header "PRIVATE-TOKEN: $SETTING_PRIVATE_TOKEN" "https://gitlab.com/api/v4/projects/7281208/jobs/artifacts/master/download?job=Windows%20Release%20Win32%20CASBACnetStack%20LIB&job_token=$CI_JOB_TOKEN"'
27+
- unzip CASBACnetStackLibs.zip && rm -f CASBACnetStackLibs.zip
28+
- ls -ls bin/
29+
artifacts:
30+
paths:
31+
- bin/*.lib
32+
33+
# Build the windows version
1234
Windows Win32 Release:
1335
stage: build
1436
tags:
@@ -32,4 +54,5 @@ Windows Win32 Release:
3254
artifacts:
3355
paths:
3456
- bin\BACnetServerExample_Win32_Release.exe
35-
57+
dependencies:
58+
- Download BACnet Stack Libaries Windows

submodules/cas-bacnet-stack

0 commit comments

Comments
 (0)