-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'bugfix/restore-ci-in-offline-mode' into q/2.8
- Loading branch information
Showing
7 changed files
with
179 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.terraform | ||
.terraform.tfstate* | ||
ssh_config | ||
terraform.tfstate* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
eve/workers/openstack-terraform/terraform/scripts/proxy-setup.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
PROXY_HOST=${1:-} | ||
PROXY_PORT=${2:-3128} | ||
PROXY_URL=http://$PROXY_HOST:$PROXY_PORT | ||
PROXY_CA_URL=https://eve.devsca.com/vault/v1/release_engineering_root_CA_prod/cert/ca | ||
PROXY_CA_PATH=/etc/pki/ca-trust/source/anchors/scality_internal_ca.crt | ||
|
||
|
||
if ! [[ $PROXY_HOST ]]; then | ||
echo "No proxy host provided, exiting" | ||
exit | ||
fi | ||
|
||
if ! [ -f /etc/redhat-release ]; then | ||
echo "The proxy script only handle RedHat family dists." | ||
exit 1 | ||
fi | ||
|
||
curl -skx "$PROXY_URL" -L "$PROXY_CA_URL" \ | ||
| sed -e 's/.*"certificate":"\(.*\)","revocation_time".*/\1/' \ | ||
-e 's/\\n/\n/g' \ | ||
> "$PROXY_CA_PATH" | ||
|
||
update-ca-trust force-enable | ||
update-ca-trust extract | ||
|
||
yum-config-manager --save --setopt proxy="$PROXY_URL" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters