-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathbuild-internal-containers.xsh
65 lines (55 loc) · 1.46 KB
/
build-internal-containers.xsh
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
#!/usr/bin/env xonsh
# Copyright (c) 2025 Toradex
# SPDX-License-Identifier: MIT
##
# This script is used to build the utils containers in the right order.
# WARNING:
# This script is not meant to be run manually. It's make part of the internal
# validation process from CI/CD.
##
# use the xonsh environment to update the OS environment
$UPDATE_OS_ENVIRON = True
# always return if a cmd fails
$RAISE_SUBPROC_ERROR = True
import os
import sys
from torizon_templates_utils.errors import Error,Error_Out,last_return_code
from torizon_templates_utils.colors import Color,BgColor,print
if len(sys.argv) != 2:
print(f"Usage: {sys.argv[0]} <branch>")
sys.exit(1)
$BRANCH = sys.argv[1]
$UUID = $(id -u)
$SHA_DIR = 0
# # run the build command
print(f"🔨 :: XONSH :: 🔨", color=Color.GREEN)
docker compose \
-f ./container/docker-compose.yml \
build \
--no-cache \
--push \
xonsh
# # run the build command
print(f"🔨 :: TASKS :: 🔨", color=Color.GREEN)
docker compose \
-f ./container/docker-compose.yml \
build \
--no-cache \
--push \
tasks
# # run the build command
print(f"🔨 :: XONSH-WRAPPER :: 🔨", color=Color.GREEN)
docker compose \
-f ./container/docker-compose.yml \
build \
--no-cache \
--push \
xonsh-wrapper
# run the build command
print(f"🔨 :: TORIZON-DEV :: 🔨", color=Color.GREEN)
docker compose \
-f ./container/docker-compose.yml \
build \
--no-cache \
--push \
torizon-dev