Disabled Proxy by default and added custom proxy option to jeninsfile
This commit is contained in:
@@ -8,6 +8,7 @@ pipeline {
|
|||||||
booleanParam description: 'Only build specified variant', name: 'OneRun'
|
booleanParam description: 'Only build specified variant', name: 'OneRun'
|
||||||
string defaultValue: 'VariantName', description: 'Variant for OneBuild', name: 'OneRunVariant'
|
string defaultValue: 'VariantName', description: 'Variant for OneBuild', name: 'OneRunVariant'
|
||||||
booleanParam description: 'Disable of Proxy server for package repos ', name: 'DisProxy'
|
booleanParam description: 'Disable of Proxy server for package repos ', name: 'DisProxy'
|
||||||
|
string defaultValue: '192.168.200.11', description: 'Proxy server for packages, (when enabled) ', name: 'ProxyServer'
|
||||||
}
|
}
|
||||||
options {
|
options {
|
||||||
skipDefaultCheckout()
|
skipDefaultCheckout()
|
||||||
@@ -31,6 +32,9 @@ pipeline {
|
|||||||
script{
|
script{
|
||||||
if (env.DisProxy == 'true') {
|
if (env.DisProxy == 'true') {
|
||||||
sh '''bash Scripts/UpdateIMGBuildFile-CacheAndRepo.sh -d'''
|
sh '''bash Scripts/UpdateIMGBuildFile-CacheAndRepo.sh -d'''
|
||||||
|
} else {
|
||||||
|
env.ProxyServer = ProxyServer
|
||||||
|
sh '''bash Scripts/UpdateIMGBuildFile-CacheAndRepo.sh -e $ProxyServer'''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ source:
|
|||||||
same_as: 3.12
|
same_as: 3.12
|
||||||
keyserver: keys.openpgp.org
|
keyserver: keys.openpgp.org
|
||||||
#InitDownloadREPO
|
#InitDownloadREPO
|
||||||
url: http://192.168.200.11/alpine/
|
url: http://dl-4.alpinelinux.org/alpine/
|
||||||
keys:
|
keys:
|
||||||
# 0482D84022F52DF1C4E7CD43293ACD0907D9495A
|
# 0482D84022F52DF1C4E7CD43293ACD0907D9495A
|
||||||
- |-
|
- |-
|
||||||
@@ -581,8 +581,8 @@ packages:
|
|||||||
- name: /etc/apk/repositories
|
- name: /etc/apk/repositories
|
||||||
url: |-
|
url: |-
|
||||||
#StartREPOS
|
#StartREPOS
|
||||||
http://192.168.200.11/alpine/v{{ image.release }}/main
|
http://dl-4.alpinelinux.org/alpine/v{{ image.release }}/main
|
||||||
http://192.168.200.11/alpine/v{{ image.release }}/community
|
http://dl-4.alpinelinux.org/alpine/v{{ image.release }}/community
|
||||||
#EndREPOS
|
#EndREPOS
|
||||||
{% if image.variant == "ddns" %}@TestingEdge http://dl-4.alpinelinux.org/alpine/edge/testing{% endif %}
|
{% if image.variant == "ddns" %}@TestingEdge http://dl-4.alpinelinux.org/alpine/edge/testing{% endif %}
|
||||||
{% if image.variant == "vouchproxy" %}@CommunityEdge http://dl-4.alpinelinux.org/alpine/edge/community{% endif %}
|
{% if image.variant == "vouchproxy" %}@CommunityEdge http://dl-4.alpinelinux.org/alpine/edge/community{% endif %}
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ pipeline {
|
|||||||
booleanParam description: 'Only build specified variant', name: 'OneRun'
|
booleanParam description: 'Only build specified variant', name: 'OneRun'
|
||||||
string defaultValue: 'VariantName', description: 'Variant for OneBuild', name: 'OneRunVariant'
|
string defaultValue: 'VariantName', description: 'Variant for OneBuild', name: 'OneRunVariant'
|
||||||
booleanParam description: 'Disable of Proxy server for package repos ', name: 'DisProxy'
|
booleanParam description: 'Disable of Proxy server for package repos ', name: 'DisProxy'
|
||||||
|
string defaultValue: '192.168.200.11', description: 'Proxy server for packages, (when enabled) ', name: 'ProxyServer'
|
||||||
}
|
}
|
||||||
options {
|
options {
|
||||||
skipDefaultCheckout()
|
skipDefaultCheckout()
|
||||||
@@ -31,6 +32,9 @@ pipeline {
|
|||||||
script{
|
script{
|
||||||
if (env.DisProxy == 'true') {
|
if (env.DisProxy == 'true') {
|
||||||
sh '''bash Scripts/UpdateIMGBuildFile-CacheAndRepo.sh -d'''
|
sh '''bash Scripts/UpdateIMGBuildFile-CacheAndRepo.sh -d'''
|
||||||
|
} else {
|
||||||
|
env.ProxyServer = ProxyServer
|
||||||
|
sh '''bash Scripts/UpdateIMGBuildFile-CacheAndRepo.sh -e $ProxyServer'''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ image:
|
|||||||
source:
|
source:
|
||||||
downloader: debootstrap
|
downloader: debootstrap
|
||||||
#InitDownloadREPO
|
#InitDownloadREPO
|
||||||
url: http://192.168.200.11/deb.debian.org/debian
|
url: http://deb.debian.org/debian
|
||||||
keyserver: keys.openpgp.org
|
keyserver: keys.openpgp.org
|
||||||
keys:
|
keys:
|
||||||
# 0x126C0D24BD8A2942CC7DF8AC7638D0442B90D010
|
# 0x126C0D24BD8A2942CC7DF8AC7638D0442B90D010
|
||||||
@@ -1412,7 +1412,7 @@ actions:
|
|||||||
echo 'APT::Install-Recommends "false";' > /etc/apt/apt.conf.d/01Recommends
|
echo 'APT::Install-Recommends "false";' > /etc/apt/apt.conf.d/01Recommends
|
||||||
echo 'APT::Install-Suggests "false";' > /etc/apt/apt.conf.d/01Suggests
|
echo 'APT::Install-Suggests "false";' > /etc/apt/apt.conf.d/01Suggests
|
||||||
#ProxyCacheSetting
|
#ProxyCacheSetting
|
||||||
echo 'Acquire::http::Proxy "http://192.168.200.11:80";' > /etc/apt/apt.conf.d/01prox
|
echo '#CacheServer not set' > /etc/apt/apt.conf.d/01prox
|
||||||
- trigger: post-packages
|
- trigger: post-packages
|
||||||
action: |-
|
action: |-
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|||||||
@@ -1,22 +1,28 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#Allow for external definiton of status of cache
|
#Allow for external definiton of status of cache
|
||||||
StatusFlag=$1
|
StatusFlag=$1
|
||||||
|
ProxyFlag=$2
|
||||||
#UserSettings
|
#UserSettings
|
||||||
ThisScriptConfigured=no
|
ThisScriptConfigured=no
|
||||||
UseCache=no
|
UseCache=no
|
||||||
|
|
||||||
#Cache enable (using apt-cacher-NG)
|
#Cache server if flag not set enable (using apt-cacher-NG)
|
||||||
CacheAlpineRepo="http://192.168.200.11/alpine/"
|
ConfigProxyServer="192.168.200.11"
|
||||||
CacheDebianCache="http://192.168.200.11:80"
|
|
||||||
CacheDebianCore="http://192.168.200.11/deb.debian.org/debian"
|
|
||||||
|
|
||||||
#Cache enable (using Official MirrorServers)
|
#Cache enable (using Official MirrorServers)
|
||||||
DefaultAlpineRepo="http://dl-4.alpinelinux.org/alpine/"
|
DefaultAlpineRepo="http://dl-4.alpinelinux.org/alpine/"
|
||||||
DefaultDebianCore="http://deb.debian.org/debian"
|
DefaultDebianCore="http://deb.debian.org/debian"
|
||||||
|
|
||||||
###Do not Edit underneath###
|
###Do not Edit underneath###
|
||||||
|
|
||||||
|
if [ -n "$ProxyFlag" ]; then
|
||||||
|
UseServer="$ProxyFlag"
|
||||||
|
else
|
||||||
|
UseServer="$ConfigProxyServer"
|
||||||
|
fi
|
||||||
|
|
||||||
|
CacheAlpineRepo="http://$UseServer/alpine/"
|
||||||
|
CacheDebianCache="http://$UseServer:80"
|
||||||
|
CacheDebianCore="http://$UseServer/deb.debian.org/debian"
|
||||||
|
|
||||||
#Check if using StatusFlag if not chek if scipt is configured
|
#Check if using StatusFlag if not chek if scipt is configured
|
||||||
if [ -n "$StatusFlag" ]; then
|
if [ -n "$StatusFlag" ]; then
|
||||||
@@ -33,7 +39,7 @@ fi
|
|||||||
|
|
||||||
#Check if using Cache
|
#Check if using Cache
|
||||||
if [ $UseCache = yes ]; then
|
if [ $UseCache = yes ]; then
|
||||||
echo "Using cache server"
|
echo "Using cache server $UseServer"
|
||||||
AlpineRepo=$CacheAlpineRepo
|
AlpineRepo=$CacheAlpineRepo
|
||||||
DebianCache='Acquire::http::Proxy "'$CacheDebianCache'";'
|
DebianCache='Acquire::http::Proxy "'$CacheDebianCache'";'
|
||||||
DebianCore=$CacheDebianCore
|
DebianCore=$CacheDebianCore
|
||||||
|
|||||||
Reference in New Issue
Block a user