@@ -65,32 +65,34 @@ jobs:
6565 with :
6666 provider : lxd
6767 juju-channel : 3.0/stable
68- - name : Set proxy in controller
69- run : |
70- set -euxo pipefail
71- # build a squid config file
72- CONTROLLER_IP=$(juju list-controllers --format yaml | yq '.controllers[.current-controller].recent-server' | awk -F '[:]' '{print $1}');
73- echo "Controller IP is: $CONTROLLER_IP"
74- PROXY=$CONTROLLER_IP:3128
75- echo "Proxy address is: $PROXY"
76- echo "acl all src all" > squid.conf
77- echo "http_access allow all" >> squid.conf
78- echo "http_port $PROXY" >> squid.conf
79- cat squid.conf
80- # copy to the controller and reconfigure it
81- juju status -m controller
82- juju switch controller
83- juju ssh 0 "sudo apt-get install squid -y"
84- juju scp squid.conf 0:/tmp/squid.conf
85- juju ssh 0 "sudo mv /tmp/squid.conf /etc/squid/squid.conf"
86- juju ssh 0 "sudo squid -k reconfigure"
87- # Test curl after waiting
88- sleep 10
89- echo "Test proxy access"
90- curl -s -o /dev/null -w "%{http_code}" --proxy http://$PROXY https://charmhub.io
91- # set model defaults
92- juju model-defaults apt-http-proxy=$PROXY apt-https-proxy=$PROXY juju-http-proxy=$PROXY juju-https-proxy=$PROXY snap-http-proxy=$PROXY snap-https-proxy=$PROXY
93- juju model-defaults
68+ # 2023-01-11 Commented until we discover a
69+ # clear approach for this.
70+ # - name: Set proxy in controller
71+ # run: |
72+ # set -euxo pipefail
73+ # # build a squid config file
74+ # CONTROLLER_IP=$(juju list-controllers --format yaml | yq '.controllers[.current-controller].recent-server' | awk -F '[:]' '{print $1}');
75+ # echo "Controller IP is: $CONTROLLER_IP"
76+ # PROXY=$CONTROLLER_IP:3128
77+ # echo "Proxy address is: $PROXY"
78+ # echo "acl all src all" > squid.conf
79+ # echo "http_access allow all" >> squid.conf
80+ # echo "http_port $PROXY" >> squid.conf
81+ # cat squid.conf
82+ # # copy to the controller and reconfigure it
83+ # juju status -m controller
84+ # juju switch controller
85+ # juju ssh 0 "sudo apt-get install squid -y"
86+ # juju scp squid.conf 0:/tmp/squid.conf
87+ # juju ssh 0 "sudo mv /tmp/squid.conf /etc/squid/squid.conf"
88+ # juju ssh 0 "sudo squid -k reconfigure"
89+ # # Test curl after waiting
90+ # sleep 10
91+ # echo "Test proxy access"
92+ # curl -s -o /dev/null -w "%{http_code}" --proxy http://$PROXY https://charmhub.io
93+ # # set model defaults
94+ # juju model-defaults apt-http-proxy=$PROXY apt-https-proxy=$PROXY juju-http-proxy=$PROXY juju-https-proxy=$PROXY snap-http-proxy=$PROXY snap-https-proxy=$PROXY
95+ # juju model-defaults
9496 - name : Setup Python
9597 uses : actions/setup-python@v4
9698 with :
0 commit comments