Sync
All checks were successful
Deployment Verification Ubuntu / deploy-and-test (push) Successful in 2m16s

This commit is contained in:
Hubert Cornet 2025-04-27 11:23:26 +02:00
parent b39e4b49c1
commit 60b2e9877f
2 changed files with 27 additions and 6 deletions

View File

@ -1,5 +1,5 @@
#
name: Deployment Verification
name: Deployment Verification Ubuntu
on:
push:

View File

@ -29,14 +29,35 @@ Acquire::http::Proxy "http://username:password@proxy.example.com:8080/";
Acquire::https::Proxy "http://username:password@proxy.example.com:8080/";
# For APT to use the system's proxy settings
Acquire::http::Proxy "http://$HTTP_PROXY";
Acquire::https::Proxy "http://$HTTPS_PROXY";
Acquire::ftp::proxy "http://$FTP_PROXY";
Acquire::http::Proxy "http://${HTTP_PROXY}";
Acquire::https::Proxy "http://${HTTPS_PROXY}";
Acquire::ftp::proxy "ftp://${FTP_PROXY}";
# To disable proxy for specific hosts
Acquire::http::Proxy::hostname.example.com "DIRECT";
EOF
apt-get update
if [ $? -eq 0 ]; then
log_message "SUCCESS" "Package lists updated successfully"
else
cat > "$PROXY_FILE" << EOF
Acquire::http::Proxy "http://$HTTP_PROXY";
Acquire::https::Proxy "http://$HTTPS_PROXY";
Acquire::ftp::proxy "ftp://$FTP_PROXY";
EOF
apt-get update
if [ $? -eq 0 ]; then
log_message "SUCCESS" "Package lists updated successfully with proxy"
else
log_message "ERROR" "Failed to update package lists with proxy"
fi
return 1
fi
log_message "SUCCESS" "APT proxy documentation created. Edit $PROXY_FILE to configure proxies if needed"
}
@ -49,6 +70,7 @@ update_upgrade_packages() {
log_message "SUCCESS" "Package lists updated successfully"
else
log_message "ERROR" "Failed to update package lists"
return 1
fi
@ -59,6 +81,7 @@ update_upgrade_packages() {
log_message "SUCCESS" "Packages upgraded successfully"
else
log_message "ERROR" "Failed to upgrade packages"
return 1
fi
}
@ -72,8 +95,6 @@ install_essential_packages() {
"software-properties-common"
"curl"
"wget"
# "ufw"
# "unattended-upgrades"
"apt-listchanges"
)