Skip to content

Commit f230ac6

Browse files
authored
Build LAM and operator in parallel (#2156)
Build LAM and operator in parallel in dev env
1 parent a99f66b commit f230ac6

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

scripts/ci-build-deps.sh

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,29 @@ function init_vars() {
1717
}
1818

1919
function local_artifact_mirror() {
20-
make -C local-artifact-mirror build-ttl.sh
20+
make -C local-artifact-mirror build-ttl.sh 2>&1 | prefix_output "LAM"
2121
cp local-artifact-mirror/build/image "local-artifact-mirror/build/image-$EC_VERSION"
2222
}
2323

2424
function operator() {
2525
make -C operator build-ttl.sh build-chart-ttl.sh \
2626
PACKAGE_VERSION="$EC_VERSION" \
27-
VERSION="$EC_VERSION"
27+
VERSION="$EC_VERSION" 2>&1 | prefix_output "OPERATOR"
2828
cp operator/build/image "operator/build/image-$EC_VERSION"
2929
cp operator/build/chart "operator/build/chart-$EC_VERSION"
3030
}
3131

3232
function main() {
3333
init_vars
34-
local_artifact_mirror
35-
operator
34+
35+
local_artifact_mirror &
36+
lam_pid=$!
37+
38+
operator &
39+
operator_pid=$!
40+
41+
wait $lam_pid
42+
wait $operator_pid
3643
}
3744

3845
main "$@"

scripts/common.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ function fail() {
99
exit 1
1010
}
1111

12+
function prefix_output() {
13+
local prefix=$1
14+
sed "s/^/[$prefix] /"
15+
}
16+
1217
function require() {
1318
if [ -z "$2" ]; then
1419
fail "validation failed: $1 unset"

0 commit comments

Comments
 (0)