summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordd <dd@wx.tnyzeq.icu>2024-06-23 18:04:20 +0200
committerdd <dd@wx.tnyzeq.icu>2024-06-23 18:04:20 +0200
commitad45e40565b1d9eee574c39bb5fe0568e6caa5e3 (patch)
tree1e90f357f257e4530d1282dead40ecde3dab1f3f
parentb52384f095324e53eaa2b0bf1309b3f6a93145f5 (diff)
downloadvyos-build-ad45e40565b1d9eee574c39bb5fe0568e6caa5e3.tar.gz
vyos-build-ad45e40565b1d9eee574c39bb5fe0568e6caa5e3.zip
vyos-build-container: added ability to use custom ELTS mirror
-rw-r--r--packages/vyos-build-container/Jenkinsfile3
-rwxr-xr-xpackages/vyos-build-container/build.sh3
2 files changed, 5 insertions, 1 deletions
diff --git a/packages/vyos-build-container/Jenkinsfile b/packages/vyos-build-container/Jenkinsfile
index eb61b5b5..1b554fff 100644
--- a/packages/vyos-build-container/Jenkinsfile
+++ b/packages/vyos-build-container/Jenkinsfile
@@ -21,6 +21,9 @@
pipeline {
agent none
+ parameters {
+ string(name: 'ELTS_MIRROR', defaultValue: 'http://172.17.17.17:3142/deb.freexian.com/extended-lts', description: 'You can apt install apt-cacher-ng and then replace 172.17.17.17 with your local IP or provide your own ELTS mirror.')
+ }
options {
disableConcurrentBuilds()
timeout(time: 240, unit: 'MINUTES')
diff --git a/packages/vyos-build-container/build.sh b/packages/vyos-build-container/build.sh
index 5a526220..f91a326a 100755
--- a/packages/vyos-build-container/build.sh
+++ b/packages/vyos-build-container/build.sh
@@ -7,7 +7,8 @@ echo "Inspecting current image of ${BRANCH_NAME}..."
previousImageId=$(docker images --filter=reference="vyos/vyos-build:${BRANCH_NAME}" --format "{{.ID}}")
echo "Building docker build container for branch ${BRANCH_NAME}..."
-docker build --no-cache -t "vyos/vyos-build:${BRANCH_NAME}" .
+docker build --build-arg "ELTS_MIRROR=${ELTS_MIRROR}" \
+ --no-cache -t "vyos/vyos-build:${BRANCH_NAME}" .
echo "Pushing ${BRANCH_NAME} image to registry ${CUSTOM_DOCKER_REPO}..."
docker tag "vyos/vyos-build:${BRANCH_NAME}" "${CUSTOM_DOCKER_REPO}/vyos/vyos-build:${BRANCH_NAME}"