action #107947
closedcoordination #104274: [epic] Enable test & release process on the container bot for BCI 15-SP3 images
Calculate dynamic value for BCI_DEVEL_REPO variable in the crb
0%
Description
When executing bci-tests, if BCI_DEVEL_REPO
is not provided to the pytest suite, the containers will use the BCI repo that comes predefined in the image.
In order to inject the BCI Repo under test in IBS we need to provide that variable.
The problem is that the variable should point to the right URL which is not static, it depends on the BUILD
number,
e.g. http://dist.nue.suse.com/ibs/SUSE:/SLE-15-SP3:/Update:/BCI/images/repo/SLE-BCI-15-SP3-x86_64-Build${BUILD}-Media1
NOTE: it also depends on the arch, but that's easier to solve, as there are only 4 possible values (x86_64, aarch64, s390x, ppc64le).
There is a hacky way to do this in bash:
# e.g. arch=x86_64
BUILD=$(curl -s https://dist.suse.de/ibs/SUSE:/SLE-15-SP3:/Update:/CR:/ToTest/images/|grep 'sles15-image'|head -1| sed 's/.*Build//'|sed 's/\.docker.*//')
BUILD_REPO=$(curl -s http://dist.nue.suse.com/ibs/SUSE:/SLE-15-SP3:/Update:/BCI/images/repo/|grep "\-Build"|tail -1| sed 's/.*Build//' | sed 's/-Media.*//')
BCI_DEVEL_REPO=http://dist.nue.suse.com/ibs/SUSE:/SLE-15-SP3:/Update:/BCI/images/repo/SLE-BCI-15-SP3-${arch}-Build${BUILD_REPO}-Media1/
The idea is that the crb
makes this calculation and injects that URL into the ISO POST so that the bci-test suite picks it up and uses it when running the containers.