Skip to content

Commit

Permalink
ci(Gubbins): add extension workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Loxeris committed Aug 28, 2024
1 parent aea2f06 commit 8a0e50b
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/extension.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Gubbins extension

on:
push:
branches-ignore:
- dependabot/**
- release-please-**
pull_request:
branches-ignore:
- release-please-**

defaults:
run:
shell: bash -el {0}

jobs:
run-demo:
runs-on: ubuntu-latest
if: github.event_name != 'push' || github.repository == 'DIRACGrid/diracx-web'
steps:
- uses: actions/checkout@v4

- name: Clone source
run: |
cd ..
git clone https://github.com/DIRACGrid/diracx-charts.git
- name: Start demo
run: |
cd ..
diracx-charts/run_demo.sh --exit-when-done diracx-web/packages/extensions
- name: Debugging information
run: |
cd ../diracx-charts
export KUBECONFIG=$PWD/.demo/kube.conf
.demo/kubectl get pods
for pod_name in $(.demo/kubectl get pods -o json | jq -r '.items[] | .metadata.name' | grep -vE '(dex|minio|mysql|rabbitmq|opensearch)'); do
echo "${pod_name}"
.demo/kubectl describe pod/"${pod_name}" || true
for container_name in $(.demo/kubectl get pods $pod_name -o jsonpath='{.spec.initContainers[*].name} {.spec.containers[*].name}'); do
echo $pod_name $container_name
.demo/kubectl logs "${pod_name}" -c "${container_name}" || true
done
done
- name: Check for success
run: |
cd ../diracx-charts
if [ ! -f ".demo/.success" ]; then
echo "Demo failed"
cat ".demo/.failed"
exit 1
fi
- name: Set DIRACX_URL
run: echo "DIRACX_URL=https://$(ifconfig | grep 'inet ' | awk '{ print $2 }' | grep -v '^127' | head -n 1 | cut -d '/' -f 1).nip.io:8000" >> $GITHUB_ENV

- name: Start Cypress
uses: cypress-io/github-action@v6
with:
browser: chrome
config: baseUrl=${{ env.DIRACX_URL }}

0 comments on commit 8a0e50b

Please sign in to comment.