summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordd <dd@wx.tnyzeq.icu>2024-08-06 06:54:55 +0200
committerdd <dd@wx.tnyzeq.icu>2024-08-06 06:54:55 +0200
commit953ff119441d97472e3b518172c5be092b7f1a2e (patch)
tree8ebdf37afe9300592b3d4c421448d9cb51ac4dc2
parentde104e50efbc7ec0902a2d71dc6b1b0cefca7d6c (diff)
downloadvyos-jenkins-953ff119441d97472e3b518172c5be092b7f1a2e.tar.gz
vyos-jenkins-953ff119441d97472e3b518172c5be092b7f1a2e.zip
added easy method how to change custom package
-rwxr-xr-xbuild-iso.sh10
-rw-r--r--readme.md5
2 files changed, 12 insertions, 3 deletions
diff --git a/build-iso.sh b/build-iso.sh
index 56905af..eb5cbb6 100755
--- a/build-iso.sh
+++ b/build-iso.sh
@@ -87,6 +87,10 @@ function GetLatestTag {
rm -rf temp-git-tag
}
+customPackages="vyos-1x-smoketest"
+customPackages=${CUSTOM_PACKAGES:-$customPackages}
+echo "Using CUSTOM_PACKAGES=$customPackages"
+
echo "Building the ISO..."
if [ "$BRANCH" == "equuleus" ]; then
LATEST=`GetLatestTag equuleus`
@@ -102,7 +106,7 @@ if [ "$BRANCH" == "equuleus" ]; then
--vyos-mirror http://172.17.17.17/equuleus \
--debian-elts-mirror http://172.17.17.17:3142/deb.freexian.com/extended-lts \
--custom-apt-key /opt/apt.gpg.key \
- --custom-package vyos-1x-smoketest
+ --custom-package "$3"
docker run --rm --privileged --name="vyos-build" -v ./vyos-build/:/vyos -v "/tmp/apt.gpg.key:/opt/apt.gpg.key" -w /vyos --sysctl net.ipv6.conf.lo.disable_ipv6=0 -e GOSU_UID=$(id -u) -e GOSU_GID=$(id -g) -w /vyos vyos/vyos-build:equuleus \
sudo make iso
@@ -121,14 +125,14 @@ elif [ "$BRANCH" == "sagitta" ]; then
--version "$2" \
--vyos-mirror http://172.17.17.17/sagitta \
--custom-apt-key /opt/apt.gpg.key \
- --custom-package vyos-1x-smoketest
+ --custom-package "$3"
}
else
>&2 echo -e "${RED}Invalid branch${NOCOLOR}"
exit 1
fi
-dockerBuild="DockerBuild $BUILD_BY $RELEASE_NAME"
+dockerBuild="DockerBuild $BUILD_BY $RELEASE_NAME $customPackages"
if ! IsFlagSet "-v" "$@"; then
dockerBuild="RunWithLazyStdout \"$dockerBuild\""
fi
diff --git a/readme.md b/readme.md
index fac01c5..e65af88 100644
--- a/readme.md
+++ b/readme.md
@@ -116,6 +116,11 @@ If all went well, then all steps should complete successfully and then you can:
- It asks you to specify branch equuleus or sagitta, after you do then confirm.
- At least, it asks you to specify build-by, after you do then confirm and wait. This identifier is used
as the `--build-by` parameter, this can be e-mail or any other identifier.
+ - There is also option to change what custom packages you want to include. By default, the only additional package
+ is `vyos-1x-smoketest`. If you want more or different custom packages
+ then you can override the default value via the `CUSTOM_PACKAGES` env variable, for example:
+ `export CUSTOM_PACKAGES="vyos-1x-smoketest emacs"`.
+ If you want to use this then please set this variable always before you build ISO.
Now you should have the ISO(s) in current directory (`/opt/vyos-jenkins`).