@@ -33,7 +33,12 @@ if [ -z "$DANGER_RUN_CI_ON_HOST" ]; then
33
33
34
34
# the name isn't important, so long as we use the same UID
35
35
LOCAL_USER=nonroot
36
- ${CI_RETRY_EXE} docker pull " $CI_IMAGE_NAME_TAG "
36
+ DOCKER_BUILDKIT=1 ${CI_RETRY_EXE} docker build \
37
+ --file " ${BASE_ROOT_DIR} /ci/test_imagefile" \
38
+ --build-arg " CI_IMAGE_NAME_TAG=${CI_IMAGE_NAME_TAG} " \
39
+ --build-arg " FILE_ENV=${FILE_ENV} " \
40
+ --tag=" ${CONTAINER_NAME} " \
41
+ " ${BASE_ROOT_DIR} "
37
42
38
43
if [ -n " ${RESTART_CI_DOCKER_BEFORE_RUN} " ] ; then
39
44
echo " Restart docker before run to stop and clear all containers started with --rm"
@@ -49,7 +54,7 @@ if [ -z "$DANGER_RUN_CI_ON_HOST" ]; then
49
54
-w $BASE_ROOT_DIR \
50
55
--env-file /tmp/env \
51
56
--name $CONTAINER_NAME \
52
- $CI_IMAGE_NAME_TAG )
57
+ $CONTAINER_NAME )
53
58
export CI_CONTAINER_ID
54
59
55
60
# Create a non-root user inside the container which matches the local user.
@@ -63,6 +68,7 @@ if [ -z "$DANGER_RUN_CI_ON_HOST" ]; then
63
68
export CI_EXEC_CMD_PREFIX=" docker exec -u $LOCAL_UID $CI_CONTAINER_ID "
64
69
else
65
70
echo " Running on host system without docker wrapper"
71
+ " ${BASE_ROOT_DIR} /ci/test/01_base_install.sh"
66
72
fi
67
73
68
74
CI_EXEC () {
@@ -76,29 +82,6 @@ export -f CI_EXEC_ROOT
76
82
77
83
CI_EXEC mkdir -p " ${BINS_SCRATCH_DIR} "
78
84
79
- if [ -n " $DPKG_ADD_ARCH " ]; then
80
- CI_EXEC_ROOT dpkg --add-architecture " $DPKG_ADD_ARCH "
81
- fi
82
-
83
- if [[ $CI_IMAGE_NAME_TAG == * centos* ]]; then
84
- ${CI_RETRY_EXE} CI_EXEC_ROOT dnf -y install epel-release
85
- ${CI_RETRY_EXE} CI_EXEC_ROOT dnf -y --allowerasing install " $CI_BASE_PACKAGES " " $PACKAGES "
86
- elif [ " $CI_USE_APT_INSTALL " != " no" ]; then
87
- if [[ " ${ADD_UNTRUSTED_BPFCC_PPA} " == " true" ]]; then
88
- # Ubuntu 22.04 LTS and Debian 11 both have an outdated bpfcc-tools packages.
89
- # The iovisor PPA is outdated as well. The next Ubuntu and Debian releases will contain updated
90
- # packages. Meanwhile, use an untrusted PPA to install an up-to-date version of the bpfcc-tools
91
- # package.
92
- # TODO: drop this once we can use newer images in GCE
93
- CI_EXEC_ROOT add-apt-repository ppa:hadret/bpfcc
94
- fi
95
- if [[ -n " ${APPEND_APT_SOURCES_LIST} " ]]; then
96
- CI_EXEC_ROOT echo " ${APPEND_APT_SOURCES_LIST} " \>\> /etc/apt/sources.list
97
- fi
98
- ${CI_RETRY_EXE} CI_EXEC_ROOT apt-get update
99
- ${CI_RETRY_EXE} CI_EXEC_ROOT apt-get install --no-install-recommends --no-upgrade -y " $PACKAGES " " $CI_BASE_PACKAGES "
100
- fi
101
-
102
85
if [ -n " $PIP_PACKAGES " ]; then
103
86
if [ " $CI_OS_NAME " == " macos" ]; then
104
87
sudo -H pip3 install --upgrade pip
0 commit comments