Skip to content

Commit

Permalink
fix(ci): Create initial account (#20)
Browse files Browse the repository at this point in the history
* fix(ci): Create initial account

* wait for bindplane

* use init curl command in retry loop

* use tls

* use client keypair for curl mtls auth
  • Loading branch information
jsirianni authored May 10, 2024
1 parent efe80be commit 374cd23
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ jobs:
# When writing back to the repo, we write to directories based
# on the bindplane version.
bindplane_versions:
- 1.37.0
- 1.45.0
- 1.55.0
- latest
steps:
- name: Checkout
Expand Down Expand Up @@ -80,7 +80,6 @@ jobs:
-e BINDPLANE_PASSWORD=admin \
-e BINDPLANE_REMOTE_URL=https://${MAIN_IP}:3001 \
-e BINDPLANE_SESSION_SECRET=2c23c9d3-850f-4062-a5c8-3f9b814ae144 \
-e BINDPLANE_SECRET_KEY=8a5353f7-bbf4-4eea-846d-a6d54296b781 \
-e BINDPLANE_LOG_OUTPUT=stdout \
-e BINDPLANE_ACCEPT_EULA=true \
-e BINDPLANE_TLS_CERT=/bindplane.crt \
Expand All @@ -94,14 +93,19 @@ jobs:
env:
BINDPLANE_LICENSE: ${{ secrets.BINDPLANE_LICENSE }}

- name: Wait for BindPlane
- name: Init BindPlane Account
uses: nick-fields/retry@v2
with:
timeout_minutes: 1
polling_interval_seconds: 2
max_attempts: 3
shell: bash
command: docker exec bindplane /bindplane get agent --tls-ca /ca.crt
command: |
curl -kv \
-u admin:admin https://localhost:3001/v1/accounts \
-X POST -d '{"displayName": "init"}' -v \
--key step/bindplane.key \
--cert step/bindplane.crt
- name: Run BindPlane Action
# This should be replaced with a release action.
Expand Down

0 comments on commit 374cd23

Please sign in to comment.