Google Spanner jdbc credentials

I have a workflow running in github and I’m trying to authenticate to my GCP Spanner instance with a service account.


When I try this url, the workflow fails, because of a NULL in the user and password fields (which shouldn’t be needed)

Error msg = “update requires username to not be empty”

The workflow is based on the example repo here

Updating to include my workflow steps
- uses: ‘actions/checkout@v3’

- name: Get Working directory test
  run: pwd

- id: 'auth'
  name: 'Authenticate to Google Cloud'
  uses: 'google-github-actions/auth@v1'
    credentials_json: ${{ secrets.MY_KEY }}

- uses: liquibase/liquibase-github-action@v2
    operation: 'update'
    classpath: 'liquibase/changelogs'
    changeLogFile: 'span-change.h2.sql'
    url: 'jdbc:cloudspanner:${{ secrets.SP_URL }}?credentials=$GOOGLE_APPLICATION_CREDENTIALS'

Is this functionality available with Liquibase?

I need to use a service account in my workflow to authenticate to GCP. Any workarounds / suggestions?

That functionality is available in Liquibase with the liquibase-spanner Plugin, see: Integrate Spanner with Liquibase  |  Google Cloud

I’m not seeing anything on that link for authentication with CI / CD workflow. I’m still getting errors with GitHub Actions because the ‘user’ and ‘password’ are apparently required, but I don’t have a user I’m trying to connect with.

The doc you pointed to mentions (in a separate link) that you can provide a url connection string (which I’m doing in my example), but I don’t see how to use a service account for the connection (I can’t pass it in the url or the user/pwd field).

Was there something specific in that link that leads you to believe this is possible? I’m an old developer and sometimes I need multiple eyes on something see. :slight_smile:

Updating here with a screenshot of the error message (edited to hid sensitive data)