Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

local does not skip functional when commented out #42

Open
lordkage opened this issue Oct 13, 2017 · 6 comments
Open

local does not skip functional when commented out #42

lordkage opened this issue Oct 13, 2017 · 6 comments

Comments

@lordkage
Copy link

lordkage commented Oct 13, 2017

I have delivery installed via chef-dk with the following versions:

Chef Development Kit Version: 2.3.4
delivery version: master (73ebb72a6c42b3d2ff5370c476be800fee7e5427)

It is my understanding, that if the functional phase is commented out then delivery will skip it. However, when running one of the roll-up commands, it still attempts to run the functional phase resulting in this error:

Unable to execute an empty phase.
Please verify that your project.toml has a functional phase configured as follows:

[local_phases]
functional = "insert script here"
Phase failed with exit code (1)!

I built the cookbook with the generate command, so chef was kind enough to autogenerate both the project.toml and the config.json files. The autogenerated project.toml file contains the functional phase commented out. I attempted to add functional to the skip_phases in the config.json, unfortunately, this did not cause delivery to skip the phase.

What else am I missing? Or is this a legitimate bug?

@lordkage lordkage changed the title local does not skip function when commented out local does not skip functional when commented out Oct 15, 2017
@darko-mesaros
Copy link

I am also facing this issue. After the Smoke phase I get the following:

Unable to execute an empty phase.
Please verify that your project.toml has a functional phase configured as follows:

[local_phases]
functional = "insert script here"
Phase failed with exit code (1)!

My project.toml looks like so:

[local_phases]
unit = "rspec spec/"
lint = "cookstyle"
syntax = "foodcritic . -f correctness"
provision = "chef exec kitchen create"
deploy = "chef exec kitchen converge"
smoke = "chef exec kitchen verify"
cleanup = "chef exec kitchen destroy"

I've tried to remove the last two lines - but it still fails the same.

@darko-mesaros
Copy link

darko-mesaros commented Dec 5, 2017

I've made this "work"!
By adding just a dummy functional phase:

functional = "echo ==dummy test please ignore=="

@lordkage
Copy link
Author

lordkage commented Dec 6, 2017

I put a similar work around in place on my cookbook.

However, I would prefer to have the phase skipped if it is omitted, like the documentation indicates. Seeing chef autogenerates defaults are commented out. Or at the least, provide an example script that runs by default.

@lordkage
Copy link
Author

lordkage commented Sep 9, 2018

Several versions have been released. No progress? This seems like a core item that is broken, or at the least, divergent from your documented behavior.

@lordkage
Copy link
Author

I just installed the latest chef-dk and comment out my dummy functional test, and the result is still the same.

@lordkage
Copy link
Author

Ok. So, syntax is now deprecated, and it suffers from same problem. Any word on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants