Skip to content

Commit

Permalink
Updates CI workflows to adapt to admin password changes
Browse files Browse the repository at this point in the history
Signed-off-by: Darshit Chanpura <[email protected]>
  • Loading branch information
DarshitChanpura committed Jan 3, 2024
1 parent a889429 commit e6b5fcf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
10 changes: 2 additions & 8 deletions .github/workflows/cypress-test-oidc-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ env:
PLUGIN_NAME: opensearch-security
# This is the SHA256 checksum of the known good kc.sh script for Keycloak version 21.0.1.
KNOWN_CHECKSUM_OF_KEYCLOAK_SCRIPT: 'f825ea1a9ffa5ad91673737c06857ababbb69b6b8f09e0c637b4c998517f9608'
OPENSEARCH_INITIAL_ADMIN_PASSWORD: myStrongPassword123!

jobs:
tests:
Expand Down Expand Up @@ -157,13 +158,6 @@ jobs:
echo "THIS IS THE SECURITY CONFIG FILE: "
cat config.yml
# TODO: REMOVE THIS ONCE ADMIN JAVA TOOL SUPPORT IT
- name: Write password to opensearch_initial_admin_password.txt
if: ${{ runner.os == 'Linux'}}
run:
echo admin >> ./opensearch-${{ env.OPENSEARCH_VERSION }}-SNAPSHOT/config/opensearch_initial_admin_password.txt
shell: bash

# Run any configuration scripts
- name: Run Setup Script for Linux
if: ${{ runner.os == 'Linux' }}
Expand All @@ -189,7 +183,7 @@ jobs:
# Verify that the server is operational
- name: Check OpenSearch Running on Linux
if: ${{ runner.os != 'Windows'}}
run: curl https://localhost:9200/_cat/plugins -u 'admin:admin' -k -v
run: curl https://localhost:9200/_cat/plugins -u 'admin:${{ env.OPENSEARCH_INITIAL_ADMIN_PASSWORD}}' -k -v
shell: bash

- if: always()
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/cypress-test-saml-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ env:
# avoid warnings like "tput: No value for $TERM and no -T specified"
TERM: xterm
PLUGIN_NAME: opensearch-security

OPENSEARCH_INITIAL_ADMIN_PASSWORD: myStrongPassword123!

jobs:
tests:
name: Run Cypress E2E SAML tests
Expand Down Expand Up @@ -145,7 +146,7 @@ jobs:
# Verify that the server is operational
- name: Check OpenSearch Running on Linux
if: ${{ runner.os != 'Windows'}}
run: curl https://localhost:9200/_cat/plugins -u 'admin:admin' -k -v
run: curl https://localhost:9200/_cat/plugins -u 'admin:${{ env.OPENSEARCH_INITIAL_ADMIN_PASSWORD}}' -k -v
shell: bash

- if: always()
Expand Down

0 comments on commit e6b5fcf

Please sign in to comment.