3535
3636 For security, this checkout-ref should generally be a commit hash
3737 for untrusted content.
38+ secrets :
39+ # TODO: Refactor cluster-api-server as it's not actually a secret but must
40+ # be because it's listed in-repo as a secret.
41+ cluster-api-server :
42+ required : true
43+ description : |
44+ Base64 encoded API server URL for the cluster. Not technically a secret.
45+
46+ cluster-token :
47+ required : true
48+ description : Token for authenticating with the cluster
3849jobs :
3950 run-functional-tests :
4051 runs-on : ubuntu-latest
@@ -113,17 +124,19 @@ jobs:
113124 env :
114125 KUBECONFIG : /tmp/ci-kubeconfig
115126 EVENT_NUMBER : ${{ inputs.event-identifier }}
127+ CLUSTER_API_SERVER : ${{ secrets.cluster-api-server }}
128+ CLUSTER_TOKEN : ${{ secrets.cluster-token }}
116129 run : |
117130 # oc login
118- API_SERVER=$( echo -n ${{ secrets.API_SERVER }} | base64 -d)
131+ API_SERVER=$( echo -n "${CLUSTER_API_SERVER}" | base64 -d)
119132 gpg --version
120133 curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash
121134 if [ $GITHUB_REPOSITORY == "redhat-certification/chart-verifier" ]; then
122135 # TODO: temporarily allow for skipping TLS verification as the new cluster uses local-only certificates
123136 # This if logic isn't removed to remind us to come back and swap this out when a valid cert is put in place.
124- oc login --insecure-skip-tls-verify --token="${{ secrets. CLUSTER_TOKEN } }" --server="${API_SERVER}"
137+ oc login --insecure-skip-tls-verify --token="${CLUSTER_TOKEN}" --server="${API_SERVER}"
125138 else
126- oc login --insecure-skip-tls-verify --token="${{ secrets. CLUSTER_TOKEN } }" --server="${API_SERVER}"
139+ oc login --insecure-skip-tls-verify --token="${CLUSTER_TOKEN}" --server="${API_SERVER}"
127140 fi
128141 ve1/bin/sa-for-chart-testing --create "charts-${EVENT_NUMBER}" --token token.txt --server "${API_SERVER}"
129142
@@ -142,8 +155,10 @@ jobs:
142155 env :
143156 KUBECONFIG : /tmp/ci-kubeconfig
144157 EVENT_NUMBER : ${{ inputs.event-identifier }}
158+ CLUSTER_API_SERVER : ${{ secrets.cluster-api-server }}
159+ CLUSTER_TOKEN : ${{ secrets.cluster-token }}
145160 run : |
146161 # delete the namespace
147- API_SERVER=$( echo -n ${{ secrets.API_SERVER }} | base64 -d)
148- oc login --token="${{ secrets. CLUSTER_TOKEN } }" --server="${API_SERVER}"
162+ API_SERVER=$( echo -n "${CLUSTER_API_SERVER}" | base64 -d)
163+ oc login --token="${CLUSTER_TOKEN}" --server="${API_SERVER}"
149164 ve1/bin/sa-for-chart-testing --delete "charts-${EVENT_NUMBER}"
0 commit comments