File tree Expand file tree Collapse file tree 3 files changed +15
-11
lines changed
Expand file tree Collapse file tree 3 files changed +15
-11
lines changed Original file line number Diff line number Diff line change @@ -737,6 +737,7 @@ jobs:
737737 file : bosh-windows-stemcell-builder-ci/ci/tasks/firewall-rules/configure-windows-firewall-rules.yml
738738 image : bosh-windows-stemcell-builder-ci-image
739739 params :
740+ CONFIGURE_GCP : true
740741 COMMERCIAL_AWS_ACCESS_KEY_ID : ((aws-stemcells_aws_access_key.username))
741742 COMMERCIAL_AWS_DEFAULT_REGION : ((AWS_PACKER_REGION))
742743 COMMERCIAL_AWS_ROLE_ARN : ((aws-stemcells_aws_access_key.role_arn))
Original file line number Diff line number Diff line change 22set -eu -o pipefail
33set -x
44
5- # We have firewall rules that are necessary when creating Windows stemcells in AWS and GCP.
5+ # We have firewall rules that are necessary when creating Windows stemcells in AWS and GCP (if needed) .
66# This script ensures that the concourse worker egress IPs have access on the
77# WinRM port (5985).
8- # Set firewall rules in the GCP project
9- comma_separated_external_ips=" "
10- for external_ip in $ALLOWED_IP_ADDRESSES ; do
11- comma_separated_external_ips=" ${external_ip} /32,${comma_separated_external_ips} "
12- done
13- comma_separated_external_ips=" ${comma_separated_external_ips% ,} "
8+ # Set firewall rules in the GCP project if needed
9+ if [ -n " ${CONFIGURE_GCP} " ]; then
10+ comma_separated_external_ips=" "
11+ for external_ip in $ALLOWED_IP_ADDRESSES ; do
12+ comma_separated_external_ips=" ${external_ip} /32,${comma_separated_external_ips} "
13+ done
14+ comma_separated_external_ips=" ${comma_separated_external_ips% ,} "
1415
15- set +x
16- echo " ${WINDOWS_STEMCELLS_GCP_CREDENTIALS_JSON} " | gcloud auth activate-service-account --key-file - --project cff-bosh-windows-stemcells
17- set -x
18- gcloud compute firewall-rules update default-allow-winrm --project cff-bosh-windows-stemcells --source-ranges=" ${comma_separated_external_ips} "
16+ set +x
17+ echo " ${WINDOWS_STEMCELLS_GCP_CREDENTIALS_JSON} " | gcloud auth activate-service-account --key-file - --project cff-bosh-windows-stemcells
18+ set -x
19+ gcloud compute firewall-rules update default-allow-winrm --project cff-bosh-windows-stemcells --source-ranges=" ${comma_separated_external_ips} "
20+ fi
1921
2022# Set firewall rules in the AWS project
2123aws_ip_ranges=" "
Original file line number Diff line number Diff line change 55 - name : bosh-windows-stemcell-builder-ci
66
77params :
8+ CONFIGURE_GCP :
89 COMMERCIAL_AWS_ACCESS_KEY_ID :
910 COMMERCIAL_AWS_DEFAULT_REGION :
1011 COMMERCIAL_AWS_ROLE_ARN :
You can’t perform that action at this time.
0 commit comments