From 374cd23e920181985f376815764bf7f4df4ad090 Mon Sep 17 00:00:00 2001 From: Joseph Sirianni Date: Fri, 10 May 2024 16:14:58 -0400 Subject: [PATCH] fix(ci): Create initial account (#20) * fix(ci): Create initial account * wait for bindplane * use init curl command in retry loop * use tls * use client keypair for curl mtls auth --- .github/workflows/ci.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fddeafc..5cc77e5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 @@ -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 \ @@ -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.