Skip to content

Commit c0710b2

Browse files
committed
export variables expected in env, remove unnecessary secrets
1 parent 7316871 commit c0710b2

File tree

3 files changed

+4
-25
lines changed

3 files changed

+4
-25
lines changed

ci/create-ocp-cluster.sh

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,16 @@ mkdir -p installer
55
RELEASE_URL="https://mirror.openshift.com/pub/openshift-v4/clients/ocp/latest"
66
RELEASE_IMAGE=$(curl -s "${RELEASE_URL}/release.txt" | grep 'Pull From: quay.io' | awk -F ' ' '{print $3}')
77

8-
if [ -z "${OCM_TOKEN+x}" ]; then
9-
echo "Assuming the OCM token should be read from Prow";
10-
OCM_TOKEN=$(cat /usr/local/osde2e-credentials/ocm-refresh-token)
11-
fi
12-
138
if [ -z "${AWS_ACCESS_KEY_ID+x}" ]; then
149
echo "Assuming the AWS Access token should be read from Prow";
1510
AWS_ACCESS_KEY_ID=$(cat /usr/local/osde2e-credentials/aws-access-key-id)
11+
export AWS_ACCESS_KEY_ID
1612
fi
1713

1814
if [ -z "${AWS_SECRET_ACCESS_KEY+x}" ]; then
1915
echo "Assuming the AWS Secret token should be read from Prow";
2016
AWS_SECRET_ACCESS_KEY=$(cat /usr/local/osde2e-credentials/aws-secret-access-key)
17+
export AWS_SECRET_ACCESS_KEY
2118
fi
2219

2320
if [ -z "${PULL_SECRET_FILE+x}" ]; then

ci/destroy-ocp-cluster.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,13 @@ RELEASE_IMAGE=$(curl -s "${RELEASE_URL}/release.txt" | grep 'Pull From: quay.io'
66
if [ -z "${AWS_ACCESS_KEY_ID+x}" ]; then
77
echo "Assuming the AWS Access token should be read from Prow";
88
AWS_ACCESS_KEY_ID=$(cat /usr/local/osde2e-credentials/aws-access-key-id)
9+
export AWS_ACCESS_KEY_ID
910
fi
1011

1112
if [ -z "${AWS_SECRET_ACCESS_KEY+x}" ]; then
1213
echo "Assuming the AWS Secret token should be read from Prow";
1314
AWS_SECRET_ACCESS_KEY=$(cat /usr/local/osde2e-credentials/aws-secret-access-key)
15+
export AWS_SECRET_ACCESS_KEY
1416
fi
1517

1618
if [ -z "${PULL_SECRET_FILE+x}" ]; then

ci/prow-ocm-adoption.sh

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -9,26 +9,6 @@ if [ -z "${OCM_TOKEN+x}" ]; then
99
OCM_TOKEN=$(cat /usr/local/osde2e-credentials/ocm-refresh-token)
1010
fi
1111

12-
if [ -z "${AWS_ACCESS_KEY_ID+x}" ]; then
13-
echo "Assuming the AWS Access token should be read from Prow";
14-
AWS_ACCESS_KEY_ID=$(cat /usr/local/osde2e-credentials/aws-access-key-id)
15-
fi
16-
17-
if [ -z "${AWS_SECRET_ACCESS_KEY+x}" ]; then
18-
echo "Assuming the AWS Secret token should be read from Prow";
19-
AWS_SECRET_ACCESS_KEY=$(cat /usr/local/osde2e-credentials/aws-secret-access-key)
20-
fi
21-
22-
if [ -z "${PULL_SECRET_FILE+x}" ]; then
23-
echo "Assuming the Pull Secret should be read from Prow";
24-
PULL_SECRET_FILE=/usr/local/osde2e-credentials/stage-ocm-pull-secret
25-
fi
26-
27-
if [ -z "${INSTALLER_CONFIG+x}" ]; then
28-
echo "Assuming the Installer Config should be read from Prow";
29-
INSTALLER_CONFIG=/usr/local/osde2e-credentials/stage-installer-config
30-
fi
31-
3212
export OCM_CONFIG=./.ocm.json
3313
export KUBECONFIG="${SHARED_DIR}/kubeconfig"
3414

0 commit comments

Comments
 (0)