From bbfd6dd18a87ab7cd07e0456340354c908f1aa7d Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Mon, 16 Oct 2023 13:26:30 -0400 Subject: [PATCH] Avoid hardcoding username for uid 1000 on docker container (#1271) (#1273) (cherry picked from commit ca9b75cded90e0cc4435ed5c128d62e59f23aa4f) Signed-off-by: Peter Zhu Signed-off-by: github-actions[bot] Co-authored-by: github-actions[bot] --- .github/workflows/multi-node-test-workflow.yml | 4 ++-- .github/workflows/test-workflow.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/multi-node-test-workflow.yml b/.github/workflows/multi-node-test-workflow.yml index 0531ebd46..ab50db83b 100644 --- a/.github/workflows/multi-node-test-workflow.yml +++ b/.github/workflows/multi-node-test-workflow.yml @@ -41,5 +41,5 @@ jobs: uses: actions/checkout@v2 - name: Run integration tests with multi node config run: | - chown -R opensearch.opensearch `pwd` - su opensearch -c "whoami && java -version && ./gradlew integTest -PnumNodes=3" + chown -R 1000:1000 `pwd` + su `id -un 1000` -c "whoami && java -version && ./gradlew integTest -PnumNodes=3" diff --git a/.github/workflows/test-workflow.yml b/.github/workflows/test-workflow.yml index 6757d5c05..2ef1196b9 100644 --- a/.github/workflows/test-workflow.yml +++ b/.github/workflows/test-workflow.yml @@ -44,8 +44,8 @@ jobs: java-version: ${{ matrix.java }} - name: Build and run with Gradle run: | - chown -R opensearch.opensearch `pwd` - su opensearch -c "whoami && java -version && ./gradlew assemble integTest" + chown -R 1000:1000 `pwd` + su `id -un 1000` -c "whoami && java -version && ./gradlew assemble integTest" - name: Create Artifact Path run: | mkdir -p alerting-artifacts