* [for-next PATCH 1/2] Azure: Rework world build to directly use the container
@ 2025-11-26 23:49 Tom Rini
2025-11-26 23:49 ` [for-next PATCH 2/2] Azure: Rework binman testsuite job " Tom Rini
2025-12-07 22:19 ` [for-next PATCH 1/2] Azure: Rework world build " Tom Rini
0 siblings, 2 replies; 3+ messages in thread
From: Tom Rini @ 2025-11-26 23:49 UTC (permalink / raw)
To: u-boot
While we had problems historically using buildman inside of a container
when invoked directly via Azure, rather than calling docker in our
script, that is no longer the case. We can make the job a bit easier to
understand by running it more normally. The challenge here is that our
container normally runs with an unprivileged user that we have populated
tools for and Azure creates and uses a new unprivileged user. Copy what
we need over to the new user.
Signed-off-by: Tom Rini <trini@konsulko.com>
---
.azure-pipelines.yml | 17 +++++++----------
1 file changed, 7 insertions(+), 10 deletions(-)
diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml
index 0c7c38ba7300..8774af5393e3 100644
--- a/.azure-pipelines.yml
+++ b/.azure-pipelines.yml
@@ -613,6 +613,9 @@ stages:
displayName: 'Build the World'
pool:
vmImage: $(ubuntu_vm)
+ container:
+ image: $(ci_runner_image)
+ options: $(container_option)
strategy:
# We split the world up in to 10 jobs as we can have at most 10
# parallel jobs going on the free tier of Azure.
@@ -639,18 +642,15 @@ stages:
BUILDMAN: $(everything_but_arm_and_powerpc)
steps:
- script: |
- cat << EOF > build.sh
set -ex
- cd ${WORK_DIR}
- # make environment variables available as tests are running inside a container
- export BUILDMAN="${BUILDMAN}"
- git config --global --add safe.directory ${WORK_DIR}
+ # Copy things from /home/uboot to the Azure container user
+ sudo cp -a /home/uboot/.buildman /home/uboot/.cache ~
+ sudo chown -R 1001 ~/.cache ~/.buildman
+ # Setup venv, perform build
python3 -m venv /tmp/venv
. /tmp/venv/bin/activate
pip install -r tools/binman/requirements.txt \
-r tools/buildman/requirements.txt
- EOF
- cat << "EOF" >> build.sh
if [[ "${BUILDMAN}" != "" ]]; then
ret=0;
tools/buildman/buildman -o /tmp -PEWM ${BUILDMAN} ${OVERRIDE} || ret=$?;
@@ -659,6 +659,3 @@ stages:
exit $ret;
fi;
fi
- EOF
- cat build.sh
- docker run -v $PWD:$(work_dir) $(ci_runner_image) /bin/bash $(work_dir)/build.sh
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [for-next PATCH 2/2] Azure: Rework binman testsuite job to directly use the container
2025-11-26 23:49 [for-next PATCH 1/2] Azure: Rework world build to directly use the container Tom Rini
@ 2025-11-26 23:49 ` Tom Rini
2025-12-07 22:19 ` [for-next PATCH 1/2] Azure: Rework world build " Tom Rini
1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2025-11-26 23:49 UTC (permalink / raw)
To: u-boot
Similar to the changes made for the world build job, rework the binman
testsuite job as well. There's no functional changes, but makes our CI
clearer to others familiar with Azure pipelines.
Signed-off-by: Tom Rini <trini@konsulko.com>
---
.azure-pipelines.yml | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml
index 8774af5393e3..c2500c3c58db 100644
--- a/.azure-pipelines.yml
+++ b/.azure-pipelines.yml
@@ -126,13 +126,17 @@ stages:
displayName: 'Run binman, buildman, dtoc, Kconfig and patman testsuites'
pool:
vmImage: $(ubuntu_vm)
+ container:
+ image: $(ci_runner_image)
+ options: $(container_option)
steps:
- script: |
- cat << "EOF" > build.sh
- cd $(work_dir)
+ # Copy things from /home/uboot to the Azure container user
+ sudo cp -a /home/uboot/.buildman /home/uboot/.cache ~
+ sudo chown -R 1001 ~/.cache ~/.buildman
+ # Configure git
git config --global user.name "Azure Pipelines"
git config --global user.email bmeng.cn@gmail.com
- git config --global --add safe.directory $(work_dir)
export USER=azure
python3 -m venv /tmp/venv
. /tmp/venv/bin/activate
@@ -155,11 +159,6 @@ stages:
./tools/dtoc/dtoc -t
./tools/patman/patman test
make O=${UBOOT_TRAVIS_BUILD_DIR} testconfig
- EOF
- cat build.sh
- # We cannot use "container" like other jobs above, as buildman
- # seems to hang forever with pre-configured "container" environment
- docker run -v $PWD:$(work_dir) $(ci_runner_image) /bin/bash $(work_dir)/build.sh
- job: pylint
displayName: Check for any pylint regressions
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [for-next PATCH 1/2] Azure: Rework world build to directly use the container
2025-11-26 23:49 [for-next PATCH 1/2] Azure: Rework world build to directly use the container Tom Rini
2025-11-26 23:49 ` [for-next PATCH 2/2] Azure: Rework binman testsuite job " Tom Rini
@ 2025-12-07 22:19 ` Tom Rini
1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2025-12-07 22:19 UTC (permalink / raw)
To: u-boot, Tom Rini
On Wed, 26 Nov 2025 17:49:58 -0600, Tom Rini wrote:
> While we had problems historically using buildman inside of a container
> when invoked directly via Azure, rather than calling docker in our
> script, that is no longer the case. We can make the job a bit easier to
> understand by running it more normally. The challenge here is that our
> container normally runs with an unprivileged user that we have populated
> tools for and Azure creates and uses a new unprivileged user. Copy what
> we need over to the new user.
>
> [...]
Applied to u-boot/next, thanks!
[1/2] Azure: Rework world build to directly use the container
commit: cf3d4da03f3a51615350f19094023947fd00d08a
[2/2] Azure: Rework binman testsuite job to directly use the container
commit: 57753073c1965d907f1d0fdb22b4e9b55f3ceedf
--
Tom
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-12-07 22:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-26 23:49 [for-next PATCH 1/2] Azure: Rework world build to directly use the container Tom Rini
2025-11-26 23:49 ` [for-next PATCH 2/2] Azure: Rework binman testsuite job " Tom Rini
2025-12-07 22:19 ` [for-next PATCH 1/2] Azure: Rework world build " Tom Rini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox