Skip to content

Commit bdeeb20

Browse files
authored
ci: fixing missing 'workspace/librarian' error (#1700)
The librarian repository is checked out as /workspace. There's no /workspace/librarian folder. Replaced long sed,grep,tr command with one sed command.
1 parent 4ec1d75 commit bdeeb20

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

infra/test/token-access-test.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,19 @@ steps:
2626
# "-o pipefail" stops execution of the piped command fails, especially
2727
# the body of the while loop in this case.
2828
set -eo pipefail
29-
echo "Your project ID is $PROJECT_ID"
29+
echo "gcloud config get-value project:"
30+
gcloud config get-value project
3031
echo "gcloud config get-value core/account:"
3132
gcloud config get-value core/account
3233
echo "pwd is $(pwd)"
3334
echo "ls -la ."
3435
ls -la .
35-
echo "Finding YAML files:"
36-
find /workspace/librarian -name '*.yaml'
3736
ROBOT_ACCOUNT=cloud-sdk-librarian-robot
3837
if [[ $- == *x* ]]; then
3938
echo "xtrace is ON. Exiting to avoid credentials showing up in logs."
4039
exit 1
4140
fi
42-
cat infra/prod/repositories.yaml | grep '^\s*-\s*name:' |awk '{print $NF}' |tr -d '"' | while read -r repo_name; do
41+
sed -n 's/.* - name: \"\(.*\)".*/\1/p' infra/prod/repositories.yaml | while read -r repo_name; do
4342
echo "Validating credentials for repository: ${repo_name}"
4443
GITHUB_TOKEN=$(gcloud secrets versions access latest --secret="${repo_name}-github-token")
4544
if [[ -z "${GITHUB_TOKEN}" ]]; then

0 commit comments

Comments
 (0)