Skip to content

Commit c74fdef

Browse files
authored
Move bazel password into file (#9759)
1 parent 041ec57 commit c74fdef

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

.github/actions/test_ya/action.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -143,11 +143,18 @@ runs:
143143
echo "NODE_TLS_REJECT_UNAUTHORIZED=0" >> $GITHUB_ENV
144144
fi
145145
146+
- name: Setup cache
147+
shell: bash
148+
run: |
149+
export BAZEL_REMOTE_PASSWORD_FILE=$(mktemp)
150+
echo "${{ inputs.bazel_remote_password }}" > $BAZEL_REMOTE_PASSWORD_FILE
151+
echo "BAZEL_REMOTE_PASSWORD_FILE=$BAZEL_REMOTE_PASSWORD_FILE" >> $GITHUB_ENV
152+
146153
- name: ya build and test
147154
id: build
148155
shell: bash
149156
run: |
150-
set -x
157+
set -ex
151158
echo "Artifacts will be uploaded [here](${PUBLIC_DIR_URL}/index.html)" | GITHUB_TOKEN="${{ github.token }}" .github/scripts/tests/comment-pr.py
152159
153160
ORIGINAL_HEAD=$(git rev-parse HEAD)
@@ -259,7 +266,7 @@ runs:
259266

260267
if [ "${{ inputs.put_build_results_to_cache }}" = "true" ]; then
261268
params+=(--bazel-remote-username "${{ inputs.bazel_remote_username }}")
262-
params+=(--bazel-remote-password "${{ inputs.bazel_remote_password }}")
269+
params+=(--bazel-remote-password-file "$BAZEL_REMOTE_PASSWORD_FILE")
263270
params+=(--bazel-remote-put --dist-cache-max-file-size=209715200)
264271
fi
265272

@@ -377,12 +384,12 @@ runs:
377384

378385
CURRENT_JUNIT_XML_PATH=$CURRENT_PUBLIC_DIR/junit.xml
379386
CURRENT_REPORT=$CURRENT_PUBLIC_DIR/report.json
380-
set +ex
387+
set +e
381388
(./ya make $YA_MAKE_TARGET "${params[@]}" \
382389
$RERUN_FAILED_OPT --log-file "$PUBLIC_DIR/ya_log.log" \
383390
--evlog-file "$CURRENT_PUBLIC_DIR/ya_evlog.jsonl" \
384391
--junit "$CURRENT_JUNIT_XML_PATH" --build-results-report "$CURRENT_REPORT" --output "$YA_MAKE_OUT_DIR"; echo $? > exit_code) |& cat >> $YA_MAKE_OUTPUT
385-
set -ex
392+
set -e
386393
RC=`cat exit_code`
387394

388395
.github/scripts/tests/report_analyzer.py --report_file "$CURRENT_REPORT" --summary_file $CURRENT_PUBLIC_DIR/summary_report.txt || true

0 commit comments

Comments
 (0)