DOC: Creating step by step guide to update our forked repository with… #21
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: Kerberized Presto Integration Test | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
- 'release**' | |
- 'feature**' | |
tags: | |
- '**' | |
jobs: | |
files-changed: | |
name: Check which files changed | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 3 | |
outputs: | |
backend_presto_kerberos: ${{ steps.changes.outputs.backend_presto_kerberos }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Test which files changed | |
uses: dorny/paths-filter@v2.11.1 | |
id: changes | |
with: | |
token: ${{ github.token }} | |
filters: .github/file-paths.yaml | |
run-presto-kerberos-test: | |
needs: files-changed | |
if: needs.files-changed.outputs.backend_presto_kerberos == 'true' | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 40 | |
steps: | |
- name: Install babashka | |
run: > | |
mkdir -p /tmp/babashka-install \ | |
&& cd /tmp/babashka-install \ | |
&& curl -sLO https://raw.githubusercontent.com/babashka/babashka/master/install \ | |
&& chmod +x install \ | |
&& sudo ./install \ | |
&& cd - | |
- name: Checkout Metabase repository | |
uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Check out Presto Kerberos Docker Compose | |
uses: actions/checkout@v3 | |
with: | |
repository: metabase/presto-kerberos-docker | |
ref: master | |
token: ${{ secrets.GITHUB_TOKEN }} | |
path: presto-kerberos-docker | |
- name: Bring up Presto+Kerberos cluster | |
run: cd presto-kerberos-docker && docker-compose up -d && cd .. | |
- name: Run Presto test query from command line (sanity check) | |
run: cd presto-kerberos-docker && ./test.sh && cd .. | |
# Since we are managing the Docker containers from the GitHub action container, we need to copy all the | |
# relevant resources now, into the resources dir for later consumption by the app | |
- name: Copy Presto SSL keystore to resources | |
run: docker cp presto-kerberos:/tmp/ssl_keystore.jks resources | |
- name: Copy krb5.conf file to resources | |
run: docker cp presto-kerberos:/etc/krb5.conf resources | |
- name: Copy client.keytab file to resources | |
run: docker cp presto-kerberos:/home/presto/client.keytab resources | |
- name: Checkout mba | |
uses: actions/checkout@v3 | |
with: | |
repository: metabase/mba | |
ref: master | |
token: ${{ secrets.GITHUB_TOKEN }} | |
path: mba-src | |
- name: ls mba | |
run: ls -latr mba-src | |
- name: Symlink mba | |
run: cd mba-src && sudo ln -s $(pwd)/src/main.clj /usr/local/bin/mba && chmod +x /usr/local/bin/mba && cd .. | |
- name: Ensure mba | |
run: which mba | |
- name: Run Metabase via MBA | |
run: /home/runner/work/metabase/metabase/mba-src/src/main.clj --mb . --data-db postgres-data -n example.com up | |
- name: Run test script in MBA instance | |
run: > | |
mba --mb . --data-db postgres-data -n example.com \ | |
run .github/scripts/run-presto-kerberos-integration-test.sh |