Skip to content

CI ignores failed publish #958

@schani

Description

@schani

See, for example here.

This is the code that calls it in appcenter-post-build.sh. It seems that the npm run pub does exit with an error, but the script keeps running.

if [ "$APPCENTER_BRANCH" == "master" ]; then

    #####################
    ### Deploy to npm ###
    #####################

    echo '//registry.npmjs.org/:_authToken=${NPM_TOKEN}' > ~/.npmrc
    npm run pub
    
    slack_notify_deployed

This is the relevant part of the log:

> quicktype@15.0.0 pub /Users/vsts/agent/2.136.1/work/1/s
> script/publish.sh

* package.json version is 15.0.0 but 15.0.57 is published. Patching...
v15.0.58

> quicktype@15.0.58 build /Users/vsts/agent/2.136.1/work/1/s
> script/build.ts

npm WARN notice Due to a recent security incident, all *** tokens have been invalidated. Please see https://status.npmjs.org/incidents/dn7c1fgrr7ng for more details. To generate a new token, visit https://www.npmjs.com/settings/~/tokens or run "npm login".
npm ERR! publish Failed PUT 401
npm ERR! code E401
npm ERR! 404 You must be logged in to publish packages. : quicktype
npm ERR! 404 
npm ERR! 404  'quicktype' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404 
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/vsts/.npm/_logs/2018-07-13T11_06_02_573Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! quicktype@15.0.0 pub: `script/publish.sh`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the quicktype@15.0.0 pub script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/vsts/.npm/_logs/2018-07-13T11_06_02_606Z-debug.log
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100   593    0     2  100   591     10   3228 --:--:-- --:--:-- --:--:--  3247
ok  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  4975    0  4618  100   357   7348    568 --:--:-- --:--:-- --:--:--  7341
{
  "id": "b99605d3-1fa5-4243-9a55-8ad78fcdb6fa",
  "url": "https://api.buildkite.com/v2/organizations/typeguard/pipelines/app-dot-quicktype-dot-io/builds/58",
  "web_url": "https://buildkite.com/typeguard/app-dot-quicktype-dot-io/builds/58",
  "number": 58,
  "state": "scheduled",
  "blocked": false,
  "message": "Deploy :rocket:",

Note that it posts to Slack.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions