Skip to content

Commit

Permalink
Only load local secrets if it exists
Browse files Browse the repository at this point in the history
  • Loading branch information
wdbasson committed Jul 24, 2024
1 parent 7967c91 commit b889131
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 12 deletions.
20 changes: 11 additions & 9 deletions .github/workflows/continuous-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -894,14 +894,16 @@ jobs:
type=registry,ref=ghcr.io/${{ github.repository_owner }}/xk6:latest
cache-to: type=gha,mode=max,scope=build-xk6

- name: Run k6
- name: Run k6 tests
run: |
docker run --rm \
-v $(pwd)/scripts/k6:/scripts \
-e CLOUDAPI_URL=${{ secrets.CLOUDAPI_URL }} \
-e CLIENT_ID=${{ secrets.CLIENT_ID }} \
-e CLIENT_SECRET=${{ secrets.CLIENT_SECRET }} \
-e OAUTH_ENDPOINT=${{ secrets.OAUTH_ENDPOINT }} \
-e SKIP_DELETE_ISSUERS=true \
ghcr.io/${{ github.repository_owner }}/xk6:${{ steps.meta.outputs.version }} \
run /scripts/main.js
-v $(pwd)/scripts/k6:/scripts \
-e CLIENT_ID=${{ secrets.CLIENT_ID }} \
-e GOVERNANCE_CLIENT_ID=${{ secrets.GOVERNANCE_CLIENT_ID }} \
-e CLIENT_SECRET=${{ secrets.CLIENT_SECRET }} \
-e GOVERNANCE_CLIENT_SECRET=${{ secrets.GOVERNANCE_CLIENT_SECRET }} \
-e CLOUDAPI_URL=${{ secrets.CLOUDAPI_URL }} \
-e OAUTH_ENDPOINT=${{ secrets.OAUTH_ENDPOINT }} \
-e GOVERNANCE_OAUTH_ENDPOINT=${{ secrets.GOVERNANCE_OAUTH_ENDPOINT }} \
ghcr.io/${{ github.repository_owner }}/xk6:${{ steps.meta.outputs.version }} \
bash /scripts/run_tests.sh
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,13 @@ celerybeat.pid

# Environments
.env
.env.local
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
secret.sh

# Spyder project settings
.spyderproject
Expand Down
8 changes: 6 additions & 2 deletions scripts/k6/env.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
#!/bin/bash
source ./secret.sh
# Source secret if it exists
if [ -f "./.env.local" ]; then
source ./.env.local
fi

export K6_STATSD_ENABLE_TAGS=true
export SKIP_DELETE_ISSUERS=true
export VUS=10
export VUS=5
export ITERATIONS=5
export ISSUER_PREFIX=k6_issuer_dev1
export HOLDER_PREFIX=k6_holder_dev
Expand Down
File renamed without changes.

0 comments on commit b889131

Please sign in to comment.