bump-sh / bump-sh/cli

Try to deploy all files from a directory deployment (Hub) even if there's an error

Open
#556 0 comments 0 reactions 0 assignees View on GitHub
backend enhancement internal technical typescript
Dominant language
TypeScript
Stars
71
Forks
9
Avg merge
7m
Merged PRs (30d)
4

Description

## Current behavior

When using the `bump deploy my/directory` to deploy multiple API documents to a Bump.sh Hub, the command fails as soon as one of the deployment fails.

Currently with a directory containing 2 files, the (successful) output is:
```
> npx bump-cli deploy apis/ --auto-create --hub demo-examples -t $BUMP_TOKEN

We've found 2 valid API definitions to deploy
└─ /home/paul/devel/bump-sh/examples/apis
├─ aws-backup-api.yml (OpenAPI spec version 3.0.0)
└─ payfit-partner-api.json (OpenAPI spec version 3.0.0)

We've found 2 valid API definitions to deploy
└─ /home/paul/devel/bump-sh/examples/apis
├─ aws-backup-api.yml (OpenAPI spec version 3.0.0)
└─ payfit-partner-api.json (OpenAPI spec version 3.0.0)

Your aws-backup documentation...has received a new deployment which will soon be ready at:
http://localhost:3000/paul-gh/hub/demo-examples/doc/aws-backup/version/4c314586-d204-493a-9a4e-5c0a4fcab2ca
Your payfit-partner documentation...has received a new deployment which will soon be ready at:
http://localhost:3000/paul-gh/hub/demo-examples/doc/payfit-partner/version/7cd3e6d0-ee0d-4f4f-a248-7c503d71544c
Let's deploy on Bump.sh... done
```

If the first deploy fails, the output is:
```
> npx bump-cli deploy apis/ --auto-create --hub demo-examples -t $BUMP_TOKEN

We've found 2 valid API definitions to deploy
└─ /home/paul/devel/bump-sh/examples/apis
├─ aws-backup-api.yml (OpenAPI spec version 3.0.0)
└─ payfit-partner-api.json (OpenAPI spec version 3.0.0)

We've found 2 valid API definitions to deploy
└─ /home/paul/devel/bump-sh/examples/apis
├─ aws-backup-api.yml (OpenAPI spec version 3.0.0)
└─ payfit-partner-api.json (OpenAPI spec version 3.0.0)

Let's deploy on Bump.sh... !
› Error: raw_definition property '/info' is missing required keys: title

```

## Suggested behavior

It would be nice if the “multiple deploy” command doesn't stop on first error. Instead it would be nice if it gathers all potential errors by trying to deploy all the files from the directory, and at the end fail if any of the deployment failed.

The output could be:
```
> npx bump-cli deploy apis/ --auto-create --hub demo-examples -t $BUMP_TOKEN

We've found 2 valid API definitions to deploy
└─ /home/paul/devel/bump-sh/examples/apis
├─ aws-backup-api.yml (OpenAPI spec version 3.0.0)
└─ payfit-partner-api.json (OpenAPI spec version 3.0.0)

Let's deploy on Bump.sh... !
› Error: The file aws-backup-api.yml (OpenAPI spec version 3.0.0) failed to deploy
› Error: raw_definition property '/info' is missing required keys: title

Your payfit-partner documentation...has received a new deployment which will soon be ready at:
http://localhost:3000/paul-gh/hub/demo-examples/doc/payfit-partner/version/7cd3e6d0-ee0d-4f4f-a248-7c503d71544c
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.