Update gate for Ubuntu 18.04 and proxy
- Remove apt conf for proxy, rely on environment - Update schema to correctly support no_proxy - Update build-image stage to support a proxy Change-Id: Ie07a72ad35fde57596af88f838c8c1836b1e8510
This commit is contained in:
parent
c1e7a74c1e
commit
c52027332f
|
@ -102,7 +102,7 @@ data:
|
||||||
additional_no_proxy:
|
additional_no_proxy:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/definitions/hostname_or_ip_address'
|
type: 'string'
|
||||||
url:
|
url:
|
||||||
$ref: '#/definitions/url'
|
$ref: '#/definitions/url'
|
||||||
required:
|
required:
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
# Generated by Promenade
|
|
||||||
{% if config['KubernetesNetwork:proxy.url'] is defined -%}
|
|
||||||
Acquire::http::Proxy "{{ config['KubernetesNetwork:proxy.url'] }}";
|
|
||||||
Acquire::https::Proxy "{{ config['KubernetesNetwork:proxy.url'] }}";
|
|
||||||
{% endif -%}
|
|
|
@ -4,8 +4,28 @@ set -e
|
||||||
|
|
||||||
source "${GATE_UTILS}"
|
source "${GATE_UTILS}"
|
||||||
|
|
||||||
|
CONFIG_PROXY=${HTTP_PROXY:-}
|
||||||
|
|
||||||
log Building docker image "${IMAGE_PROMENADE}"
|
log Building docker image "${IMAGE_PROMENADE}"
|
||||||
docker build -q -t "${IMAGE_PROMENADE}" "${WORKSPACE}"
|
|
||||||
|
if [[ -z "$CONFIG_PROXY" ]]
|
||||||
|
then
|
||||||
|
docker build -q \
|
||||||
|
--network host \
|
||||||
|
-t "${IMAGE_PROMENADE}" \
|
||||||
|
"${WORKSPACE}"
|
||||||
|
else
|
||||||
|
docker build -q \
|
||||||
|
--network host \
|
||||||
|
-t "${IMAGE_PROMENADE}" \
|
||||||
|
--build-arg HTTP_PROXY=${HTTP_PROXY} \
|
||||||
|
--build-arg HTTPS_PROXY=${HTTPS_PROXY} \
|
||||||
|
--build-arg NO_PROXY=${NO_PROXY} \
|
||||||
|
--build-arg http_proxy=${http_proxy} \
|
||||||
|
--build-arg https_proxy=${https_proxy} \
|
||||||
|
--build-arg no_proxy=${no_proxy} \
|
||||||
|
"${WORKSPACE}"
|
||||||
|
fi
|
||||||
|
|
||||||
log Loading Promenade image "${IMAGE_PROMENADE}" into local registry
|
log Loading Promenade image "${IMAGE_PROMENADE}" into local registry
|
||||||
docker tag "${IMAGE_PROMENADE}" "localhost:5000/${IMAGE_PROMENADE}" &>> "${LOG_FILE}"
|
docker tag "${IMAGE_PROMENADE}" "localhost:5000/${IMAGE_PROMENADE}" &>> "${LOG_FILE}"
|
||||||
|
|
|
@ -32,9 +32,9 @@ sudo apt-get install -q -y --no-install-recommends \
|
||||||
virtinst
|
virtinst
|
||||||
|
|
||||||
log_stage_header "Joining User Groups"
|
log_stage_header "Joining User Groups"
|
||||||
for grp in docker libvirtd; do
|
for grp in docker libvirtd libvirt; do
|
||||||
if ! groups | grep $grp > /dev/null; then
|
if ! groups | grep $grp > /dev/null; then
|
||||||
sudo adduser "$(id -un)" $grp
|
sudo adduser "$(id -un)" $grp || echo "Group $grp not found, not added to user"
|
||||||
REQUIRE_RELOG=1
|
REQUIRE_RELOG=1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in New Issue