Skip to content

Commit 1540733

Browse files
authored
Preparation for http proxy caching (#8281)
* always use http for apt repos * pass possible proxy arguments to docker * populate lower-case env variables with upper-case ones if not set otherwise
1 parent 0e388bb commit 1540733

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed

extensions/apa.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ function extension_prepare_config__apa() {
55
}
66

77
function custom_apt_repo__add_apa() {
8-
run_host_command_logged echo "deb [signed-by=${APT_SIGNING_KEY_FILE}] https://github.armbian.com/apa current main" "|" tee "${SDCARD}"/etc/apt/sources.list.d/armbian-apa.list
8+
run_host_command_logged echo "deb [signed-by=${APT_SIGNING_KEY_FILE}] http://github.armbian.com/apa current main" "|" tee "${SDCARD}"/etc/apt/sources.list.d/armbian-apa.list
99
}
1010

1111
function post_armbian_repo_customize_image__install_from_apa() {

extensions/armbian-config.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
function custom_apt_repo__add_armbian-github-repo() {
66
cat <<- EOF > "${SDCARD}"/etc/apt/sources.list.d/armbian-config.sources
77
Types: deb
8-
URIs: https://github.armbian.com/configng
8+
URIs: http://github.armbian.com/configng
99
Suites: stable
1010
Components: main
1111
Signed-By: ${APT_SIGNING_KEY_FILE}

lib/functions/host/docker.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,13 @@ function docker_cli_prepare_launch() {
409409
"--env" "GITHUB_SHA=${GITHUB_SHA}"
410410
"--env" "GITHUB_WORKFLOW=${GITHUB_WORKFLOW}"
411411
"--env" "GITHUB_WORKSPACE=${GITHUB_WORKSPACE}"
412+
413+
# Pass proxy args
414+
"--env" "http_proxy=${http_proxy:-${HTTP_PROXY}}"
415+
"--env" "https_proxy=${https_proxy:-${HTTPS_PROXY}}"
416+
"--env" "HTTP_PROXY=${HTTP_PROXY}"
417+
"--env" "HTTPS_PROXY=${HTTPS_PROXY}"
418+
"--env" "APT_PROXY_ADDR=${APT_PROXY_ADDR}"
412419
)
413420

414421
# This env var is used super early (in entrypoint.sh), so set it as an env to current value.

lib/functions/rootfs/distro-specific.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ function create_sources_list_and_deploy_repo_key() {
196196
fi
197197
cat <<- EOF > "${basedir}"/etc/apt/sources.list.d/armbian.sources
198198
Types: deb
199-
URIs: https://${armbian_mirror}
199+
URIs: http://${armbian_mirror}
200200
Suites: $RELEASE
201201
Components: ${components[*]}
202202
Signed-By: ${APT_SIGNING_KEY_FILE}

0 commit comments

Comments
 (0)