Build Config Validation: Using `api_key` breaks npm deployments

Relevant deployment config:

deploy:
  skip_cleanup: true
  provider: npm
  email: "email removed"
  api_key:
    secure: "secure value removed"
  on:
    tags: true
    condition: $(node -e 'console.log("v" + require("./package.json").version)') = ${TRAVIS_TAG}

When build config validation is enabled it reports something along the lines of "api_key is alias for api_token, using api_token". The build then fails at deployment time with:

Installing deploy dependencies
Successfully installed dpl-npm-1.10.14
1 gem installed

Preparing deploy
NPM version: 6.13.4
missing api_key

failed to deploy

Disabling build config validation makes the deployment to npm work as expected.

Note:

  1. Copy-pasting log content into this community is ugly, so I may have borked the whitespaces there.
  2. Disabling build config validation also disables it for all previous builds, so I could not go back and copy-paste the exact messages. I think you guys should keep the output of the validation results per-build …
  3. If needed: Failing build is https://travis-ci.com/Collaborne/collaborne-polaris-content/jobs/271793747, passing build was manually triggered after disabling the validation through the UI and is https://travis-ci.com/Collaborne/collaborne-polaris-content/builds/142868814

EDIT: Reverse api_key/_token

Duplicate of

@native-api: Try disabling “Build Config Validation” in the Travis settings, and trigger a new build. Indeed you are likely seeing exactly the problem I described above.

1 Like

I had the same issue and disabling “Build Config Validation” did in fact do the trick

Hello, there. We’ve released dpl 1.10.15, which fixes this issue (for those staying on v1.x at the moment).

Imprint