Skip to content

Commit 4b094ef

Browse files
Add quench when building the application
1 parent 83a090e commit 4b094ef

File tree

8 files changed

+37
-2
lines changed

8 files changed

+37
-2
lines changed

.env.sample

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ SALT=f1nd1ngn3m0
55
# * telio
66
# * drop
77
# * moose - internal builds only
8+
# * quench - internal builds only
89
# * internal - internal builds only
910
FEATURES=telio drop
1011
# Used for mage targets, when set to 1, fetching docker images will be skipped if it is already fetched.

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,6 @@
44
[submodule "third-party/moose-worker"]
55
path = third-party/moose-worker
66
url = ../../../../moose/moose-events.git
7+
[submodule "third-party/libquench-go"]
8+
path = third-party/libquench-go
9+
url = ../../libquench-go

ci/add_private_bindings.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
3+
bindings_name=$1
4+
bindings_path=$2
5+
6+
go mod edit -require="$bindings_name"@v0.0.0
7+
go mod edit -replace="$bindings_name"="$bindings_path"
8+
9+
function revert_private_bindings {
10+
go mod edit -droprequire="$bindings_name"
11+
go mod edit -dropreplace="$bindings_name"
12+
}
13+
14+
trap revert_private_bindings EXIT

ci/check_dependencies.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ libmoose_worker_artifact_url="${LIBMOOSE_WORKER_ARTIFACTS_URL}/${LIBMOOSE_WORKER
2323
libmoose_worker_zipfile="${temp_dir}/libmoose-worker-${LIBMOOSE_WORKER_VERSION}.zip"
2424
libmoose_worker_dst="${temp_dir}/libmoose-worker-${LIBMOOSE_WORKER_VERSION}"
2525

26+
libquench_artifact_url="${LIBQUENCH_ARTIFACTS_URL}/${LIBQUENCH_VERSION}/linux.zip"
27+
libquench_zipfile="${temp_dir}/libquench-${LIBQUENCH_VERSION}.zip"
28+
libquench_dst="${temp_dir}/libquench-${LIBQUENCH_VERSION}"
29+
2630
lib_versions_file="${WORKDIR}/lib-versions.env"
2731
checkout_completed_flag_file="${lib_root}/checkout-completed-flag"
2832

@@ -109,6 +113,7 @@ fetch_gitlab_artifact "${libdrop_artifact_url}" "${libdrop_zipfile}"
109113
if [[ "${FEATURES:-""}" == *internal* ]]; then
110114
fetch_gitlab_artifact "${libmoose_nordvpnapp_artifact_url}" "${libmoose_nordvpnapp_zipfile}"
111115
fetch_gitlab_artifact "${libmoose_worker_artifact_url}" "${libmoose_worker_zipfile}"
116+
fetch_gitlab_artifact "${libquench_artifact_url}" "${libquench_zipfile}"
112117
fi
113118

114119
# ====================[ Unzip files ]=========================
@@ -119,6 +124,7 @@ unzip -o "${libdrop_zipfile}" -d "${temp_dir}" && mv "${temp_dir}/libdrop" "${li
119124
if [[ "${FEATURES:-""}" == *internal* ]]; then
120125
unzip -o "${libmoose_nordvpnapp_zipfile}" -d "${temp_dir}" && mv "${temp_dir}/out" "${libmoose_nordvpnapp_dst}"
121126
unzip -o "${libmoose_worker_zipfile}" -d "${temp_dir}" && mv "${temp_dir}/out" "${libmoose_worker_dst}"
127+
unzip -o "${libquench_zipfile}" -d "${temp_dir}" && mv "${temp_dir}/dist" "${libquench_dst}"
122128
fi
123129

124130
# ====================[ Copy to bin/deps/libs ]=========================
@@ -140,6 +146,9 @@ if [[ "${FEATURES:-""}" == *internal* ]]; then
140146

141147
# moose worker
142148
copy_to_libs "${libmoose_worker_dst}/worker/bin/worker/linux" "libmooseworker.so"
149+
150+
# libquench
151+
copy_to_libs "${libquench_dst}/linux/release" "libquench.so"
143152
fi
144153

145154
# remove leftovers

ci/compile.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,12 @@ if [[ $tags == *"moose"* ]]; then
7474
-X 'main.EventsDomain=${events_domain:-""}' \
7575
-X 'main.EventsSubdomain=${EVENTS_SUBDOMAIN:-""}'"
7676

77-
source "${WORKDIR}"/ci/add_moose.sh
77+
source "${WORKDIR}"/ci/add_private_bindings.sh moose/events ./third-party/moose-events/moosenordvpnappgo/v14
78+
source "${WORKDIR}"/ci/add_private_bindings.sh moose/worker ./third-party/moose-worker/mooseworkergo/v14
79+
fi
80+
81+
if [[ $tags == *"quench"* ]]; then
82+
source "${WORKDIR}"/ci/add_private_bindings.sh quench ./third-party/libquench-go
7883
fi
7984

8085
for program in ${!names_map[*]}; do # looping over keys

ci/test.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ tags="internal"
1818
# everything
1919
if [ "${1:-""}" = "full" ]; then
2020
# Apply moose patch in case compiling with moose
21-
source "${WORKDIR}"/ci/add_moose.sh
21+
source "${WORKDIR}"/ci/add_private_bindings.sh moose/events ./third-party/moose-events/moosenordvpnappgo/v14
22+
source "${WORKDIR}"/ci/add_private_bindings.sh moose/worker ./third-party/moose-worker/mooseworkergo/v14
2223

2324
excluded_packages="thisshouldneverexist"
2425
excluded_categories="root,link"

lib-versions.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ LIBTELIO_VERSION=v5.0.3
77
LIBDROP_VERSION=v8.1.1
88
LIBMOOSE_NORDVPNAPP_VERSION=v14.3.0-nordVpnApp
99
LIBMOOSE_WORKER_VERSION=v14.3.0-worker
10+
LIBQUENCH_VERSION=v0.0.16

third-party/libquench-go

Submodule libquench-go added at 76bb132

0 commit comments

Comments
 (0)