Skip to content

Commit

Permalink
Add: smoketest to workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
jjnicola committed Sep 7, 2023
1 parent e3314ca commit fac5f89
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions .github/workflows/helm-build-chart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
branches: [main]
workflow_dispatch:

env:
API_KEY: changeme
OPENVASD: 127.0.0.1:8080

jobs:
openvasd:
runs-on: ubuntu-latest
Expand All @@ -21,12 +25,25 @@ jobs:
helm uninstall openvasd || true
helm install openvasd charts/openvasd/ --values charts/openvasd/values.yaml
kubectl rollout status --watch --timeout 600s deployment/openvasd
helm test openvasd
sleep 5
#helm test openvasd
#echo "POD_NAME=$(kubectl get pods --namespace default -l 'app.kubernetes.io/name=openvasd,app.kubernetes.io/instance=openvasd' -o jsonpath='{.items[0].metadata.name}')"
- id: smoketest
run: echo "POD_NAME=$(kubectl get pods |grep openvasd | awk '{print $1;}')" >> $GITHUB_OUTPUT
- name: forward port
run: |
echo "POD_NAME: ${{ steps.smoketest.outputs.POD_NAME }}"
echo "$(kubectl get pods)"
kubectl --namespace default port-forward ${{ steps.smoketest.outputs.POD_NAME }} 8080:3000
- name: smoketest
working-directory: rust/smoketest
run: |
make build run
- uses: greenbone/actions/helm-build-push@v3
if: github.event_name == 'workflow_dispatch'
with:
chart-name: openvasd
registry: ${{ vars.IMAGE_REGISTRY }}
registry-subpath: helm-charts/
registry-user: ${{ secrets.GREENBONE_BOT }}
registry-token: ${{ secrets.GREENBONE_BOT_PACKAGES_WRITE_TOKEN }}
registry-token: ${{ secrets.GREENBONE_BOT_PACKAGES_WRITE_TOKEN }}

0 comments on commit fac5f89

Please sign in to comment.