diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0bd8da681d..0f916d8f9a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -91,7 +91,7 @@ jobs: runs-on: ${{ matrix.platform }} steps: - # Configure longpath names if on Windows + # Configure longpath names if on Windows - name: Enable Longpaths if on Windows if: ${{ runner.os == 'Windows' }} run: git config --system core.longpaths true diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index eb11d0e478..f3b18fca65 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -15,12 +15,44 @@ jobs: test-run: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] steps: + # Configure longpath names if on Windows + - name: Enable Longpaths if on Windows + if: ${{ runner.os == 'Windows' }} + run: git config --system core.longpaths true + shell: pwsh + - uses: actions/setup-java@v3 with: distribution: temurin # Temurin is a distribution of adoptium java-version: ${{ matrix.jdk }} - - uses: actions/checkout@v4 + - name: Checkout Security Repo + uses: actions/checkout@v4 + + - name: Insert Admin Credential on Linux + if: ${{ runner.os == 'Linux' }} + run: | + cat <> /home/runner/work/security/security/config/internal_users.yml + admin: + hash: "$2a$12$VcCDgh2NDk07JGN0rjGbM.Ad41qVR/YFJcgHp0UGns5JDymv..TOG" + reserved: true + backend_roles: + - "admin" + description: "Demo admin user" + EOL + shell: bash + + - name: Add Admin Credential on Windows + if: ${{ runner.os == 'Windows' }} + run: | + $filePath = "D:\a\security\security\config\internal_users.yml" + Add-Content -Path $filePath -Value "admin:" + Add-Content -Path $filePath -Value " hash: `"$2a$12$VcCDgh2NDk07JGN0rjGbM.Ad41qVR/YFJcgHp0UGns5JDymv..TOG`"" + Add-Content -Path $filePath -Value " reserved: true" + Add-Content -Path $filePath -Value " backend_roles:" + Add-Content -Path $filePath -Value " - `"admin`"" + Add-Content -Path $filePath -Value " description: `"Demo admin user`"" + shell: pwsh - run: OPENDISTRO_SECURITY_TEST_OPENSSL_OPT=true ./gradlew test