Skip to content

Commit

Permalink
moved openldap and solr to separate test ymls
Browse files Browse the repository at this point in the history
  • Loading branch information
alondhe committed Sep 8, 2023
1 parent 2299740 commit ca79fa0
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 8 deletions.
10 changes: 2 additions & 8 deletions .github/workflows/default.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Broadsea Non-Perseus (Linux and Mac)
name: default profile (Linux and Mac)
on: push
jobs:
default:
Expand Down Expand Up @@ -51,10 +51,4 @@ jobs:
- name: Test WebAPI info endpoint
run: |
sleep 30
curl -s -k --retry 10 --retry-connrefused ${{matrix.httpType}}://127.0.0.1/WebAPI/info
- name: Build empty SOLR instance
run: docker-compose --env-file .env --profile solr-vocab-no-import up -d
- name: Test SOLR
run: curl -s -k --retry 10 --retry-connrefused ${{matrix.httpType}}://127.0.0.1/solr
- name: Build OpenLDAP
run: docker-compose --env-file .env --profile openldap up -d
curl -s -k --retry 10 --retry-connrefused ${{matrix.httpType}}://127.0.0.1/WebAPI/info
33 changes: 33 additions & 0 deletions .github/workflows/openldap.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: openldap profile (Linux and Mac)
on: push
jobs:
default:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
httpType: [http]
runs-on: ${{ matrix.os }}
steps:
- name: Setup Docker on macOS
if: runner.os == 'macOS'
uses: douglascamata/setup-docker-macos-action@v1-alpha
- name: Checkout
uses: actions/checkout@v3
- name: Create certs folder
run: mkdir -p ./certs
- name: Build traefik container
run: docker-compose --env-file .env up -d
- name: Build atlasdb profile
run: docker-compose --env-file .env --profile atlasdb up -d
- name: Build webapi profile with ldap enabled
run: SECURITY_AUTH_LDAP_ENABLED=true docker-compose --env-file .env --profile webapi-from-image up -d
- name: Test WebAPI info endpoint
run: |
sleep 30
curl -s -k --retry 10 --retry-connrefused ${{matrix.httpType}}://127.0.0.1/WebAPI/info
- name: Build OpenLDAP
run: docker-compose --env-file .env --profile openldap up -d
- name: Test openldap auth in WebAPI
run: |
sleep 30
curl -d "login=user1&password=$(<./secrets/openldap/OPENLDAP_ACCOUNT_PASSWORDS)" -H "Content-Type: application/x-www-form-urlencoded" -X POST ${{matrix.httpType}}://127.0.0.1/WebAPI/user/login/ldap
42 changes: 42 additions & 0 deletions .github/workflows/solr-vocab.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: solr-vocab-no-import profile (Linux and Mac)
on: push
jobs:
default:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
httpType: [http, https]
runs-on: ${{ matrix.os }}
steps:
- name: Setup Docker on macOS
if: runner.os == 'macOS'
uses: douglascamata/setup-docker-macos-action@v1-alpha
- name: Checkout
uses: actions/checkout@v3
- name: Create certs folder
run: mkdir -p ./certs
- name: Replace HTTP_TYPE if https (Linux)
if: matrix.httpType == 'https' && runner.os == 'Linux'
run: sed -i 's/HTTP_TYPE=\"http\"/HTTP_TYPE=\"https\"/g' .env
- name: Replace HTTP_TYPE if https (Mac)
if: matrix.httpType == 'https' && runner.os == 'macOS'
run: sed -i '' 's/HTTP_TYPE=\"http\"/HTTP_TYPE=\"https\"/g' .env
- name: Create and trust self signed certs
if: matrix.httpType == 'https'
run: |
openssl req -x509 -out ./certs/broadsea.crt -keyout ./certs/broadsea.key \
-newkey rsa:2048 -nodes -sha256 \
-subj '/CN=127.0.0.1' -extensions EXT -config <( \
printf "[dn]\nCN=127.0.0.1\n[req]\ndistinguished_name = dn\n[EXT]\nsubjectAltName=DNS:127.0.0.1\nkeyUsage=digitalSignature\nextendedKeyUsage=serverAuth")
- name: Build traefik container
run: docker-compose --env-file .env up -d
- name: Build empty SOLR instance
run: docker-compose --env-file .env --profile solr-vocab-no-import up -d
- name: Build webapi profile with SOLR_VOCAB enabled
run: SOLR_VOCAB_ENDPOINT=http://broadsea-solr-vocab:8983/solr docker-compose --env-file .env --profile webapi-from-image up -d
- name: Test WebAPI info endpoint
run: |
sleep 30
curl -s -k --retry 10 --retry-connrefused ${{matrix.httpType}}://127.0.0.1/WebAPI/info
- name: Test SOLR endpoint
run: curl -s -k --retry 10 --retry-connrefused ${{matrix.httpType}}://127.0.0.1/solr/

0 comments on commit ca79fa0

Please sign in to comment.