Replace BASE64_OS with BASE_IMAGE #225
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: DS Tests | |
on: [push, pull_request] | |
jobs: | |
init: | |
name: Initialization | |
uses: ./.github/workflows/init.yml | |
secrets: inherit | |
build: | |
name: Waiting for build | |
needs: init | |
runs-on: ubuntu-latest | |
steps: | |
- name: Wait for build | |
uses: lewagon/[email protected] | |
with: | |
ref: ${{ github.ref }} | |
check-name: 'Building LDAP SDK' | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
wait-interval: 30 | |
if: github.event_name == 'push' | |
- name: Wait for build | |
uses: lewagon/[email protected] | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
check-name: 'Building LDAP SDK' | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
wait-interval: 30 | |
if: github.event_name == 'pull_request' | |
ds-test: | |
name: Testing DS | |
needs: [init, build] | |
runs-on: ubuntu-latest | |
env: | |
SHARED: /tmp/workdir/ldapjdk | |
steps: | |
- name: Clone the repository | |
uses: actions/checkout@v3 | |
- name: Retrieve ldapjdk-runner image | |
uses: actions/cache@v3 | |
with: | |
key: ldapjdk-runner-${{ github.sha }} | |
path: ldapjdk-runner.tar | |
- name: Load ldapjdk-runner image | |
run: docker load --input ldapjdk-runner.tar | |
- name: Run container | |
run: | | |
IMAGE=ldapjdk-runner \ | |
NAME=ds \ | |
HOSTNAME=ds.example.com \ | |
tests/bin/runner-init.sh | |
- name: Install DS package | |
run: docker exec ds dnf install -y 389-ds-base | |
- name: Create DS instance | |
run: docker exec ds ${SHARED}/tests/bin/ds-create.sh | |
- name: Verify LDAP tools | |
run: docker exec ds ${SHARED}/tests/bin/tools-test.sh | |
- name: Gather artifacts | |
if: always() | |
run: | | |
tests/bin/ds-artifacts-save.sh ds | |
- name: Remove DS instance | |
run: docker exec ds ${SHARED}/tests/bin/ds-remove.sh | |
- name: Upload artifacts | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ds | |
path: | | |
/tmp/artifacts/ds | |
ds-ssl-test: | |
name: Testing DS with SSL | |
needs: [init, build] | |
runs-on: ubuntu-latest | |
env: | |
SHARED: /tmp/workdir/ldapjdk | |
steps: | |
- name: Clone the repository | |
uses: actions/checkout@v3 | |
- name: Retrieve ldapjdk-runner image | |
uses: actions/cache@v3 | |
with: | |
key: ldapjdk-runner-${{ github.sha }} | |
path: ldapjdk-runner.tar | |
- name: Load ldapjdk-runner image | |
run: docker load --input ldapjdk-runner.tar | |
- name: Run container | |
run: | | |
IMAGE=ldapjdk-runner \ | |
NAME=server \ | |
HOSTNAME=server.example.com \ | |
tests/bin/runner-init.sh | |
- name: Install DS package | |
run: docker exec server dnf install -y 389-ds-base dogtag-pki | |
- name: Create DS instance | |
run: docker exec server ${SHARED}/tests/bin/ds-create.sh | |
- name: Create signing cert | |
run: docker exec server ${SHARED}/tests/bin/ds-cert-signing-create.sh | |
- name: Create server cert | |
run: docker exec server ${SHARED}/tests/bin/ds-cert-server-create.sh | |
- name: Enable SSL connection | |
run: docker exec server ${SHARED}/tests/bin/ds-ssl-enable.sh | |
- name: Verify LDAP tools with SSL | |
run: | | |
# TODO: use SSL | |
docker exec server ${SHARED}/tests/bin/tools-test.sh | |
- name: Remove DS instance | |
run: docker exec server ${SHARED}/tests/bin/ds-remove.sh | |
- name: Gather artifacts | |
if: always() | |
run: | | |
tests/bin/ds-artifacts-save.sh server | |
- name: Upload artifacts | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ds-ssl | |
path: | | |
/tmp/artifacts/server |