CircleCI-Public / CircleCI-Public/circleci-cli

`circleci config validate` doesn't return error when the deploy step use a shortcut like `deploy: my command`

Open
#438 1 comment 0 reactions 1 assignee Claimed by @abdelDriowya View on GitHub
Dominant language
Go
Stars
459
Forks
255
Avg merge
1d 4h
Merged PRs (30d)
59

Description

- [*] I have read [Contribution Guidelines](https://github.com/CircleCI-Public/circleci-cli/blob/master/CONTRIBUTING.md).
- [*] I have checked for similar issues and haven't found anything relevant.
- [*] This is not a security issue (which should be reported here: https://circleci.com/security/)

**Do you want to request a *feature* or report a *bug*?**
> bug

**What is the current behavior?**
circleci config validate command return the config valid message when the config has `deploy` step which uses a shortcut like `deploy: my command`. Then, in the CI, the build is failed in the Spin up environment step.

Here is an example error message.
```
* In step 8 definition: '' expected a map, got 'string'
```

CircleCI doc says `deploy` step can't use a shortcut like `run` step, the deploy step needs `command` option.
> https://circleci.com/docs/2.0/configuration-reference/#example-4

Can you provide an example?

You can make the following config, then `circleci config validate` command shows the valid message.

config.yml
```
version: 2
jobs:
build:
machine: true
steps:
deploy: echo "hello"
```

```
$ circleci config validate config.yml
Config file at test.yml is valid.
```
**What is the expected behavior?**

That configuration should be marked as invalidate.

**Which version of the CLI and OS are you using? Did this work in previous versions?**

Please provide the output of `circleci version` and `circleci diagnostic`.

```
circleci version
0.1.8599+d6e83e7 (release)
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.