-
Notifications
You must be signed in to change notification settings - Fork 70
Fail nicely if user does not provide artifact files within Nulecule. #532
Fail nicely if user does not provide artifact files within Nulecule. #532
Conversation
|
@cdrage about bug#438, it still does not fails if I keep the directory artifact and change the files name in the directory (venv) [centos@atomic ~]$ cd nulecule-postgresql/
(venv) [centos@atomic nulecule-postgresql]$ sudo atomicapp run .
2016-02-01 09:13:52,238 - atomicapp.cli.main - INFO - Action/Mode Selected is: run
2016-02-01 09:13:52,246 - atomicapp.plugin - WARNING - Configuration option 'providerconfig' not found
2016-02-01 09:13:52,246 - atomicapp.plugin - WARNING - Configuration option 'providerconfig' not found
2016-02-01 09:13:52,246 - kubernetes - INFO - Using namespace default
2016-02-01 09:13:52,246 - kubernetes - INFO - trying kubectl at /usr/bin/kubectl
2016-02-01 09:13:52,246 - kubernetes - INFO - found kubectl at /usr/bin/kubectl
2016-02-01 09:13:52,246 - kubernetes - INFO - Deploying to Kubernetes
Your application resides in .
Please use this directory for managing your application
(venv) [centos@atomic nulecule-postgresql]$
(venv) [centos@atomic nulecule-postgresql]$ cat Nulecule
---
specversion: 0.0.2
id: postgresql-atomicapp
metadata:
name: PostgreSQL Atomic App
appversion: 1.0.0
description: This is PostgreSQL
graph:
- name: postgresql-atomicapp
params:
- name: db_user
description: Database User
- name: db_pass
description: Database Password
- name: db_name
description: Database Name
artifacts:
kubernetes:
- file://artifacts/kubernetes/postgresql-pod.yaml
- file://artifacts/kubernetes/postgresql-service.yaml
docker:
- file://artifacts/docker/postgresql-app-pod_run
(venv) [centos@atomic nulecule-postgresql]$
(venv) [centos@atomic nulecule-postgresql]$ ls artifacts/
docker_bak kubernetes_bak
(venv) [centos@atomic nulecule-postgresql]$
|
|
@surajssd I haven't update this PR yet since I've been at FOSDEM && cfg mgmt camp, but I will when I'm back in the land of maple syrup and igloos (canada) :) then I'll ping ya! |
|
@cdrage ping? |
|
@rtnpro workin' on it :) |
7ddd187 to
686166b
Compare
|
Hey @surajssd I'm going to leave this PR as is for if the user does not specify an artifact within the Nulecule file. I'll open up another PR relating to if the folder names are not correct (ex. if provided /foo/bar and only /foo/bar2 exists, etc.) Otherwise, added tests for this. Good for review! |
|
If you are going to leave it like it is then remove Fixes 435 from the description please. |
|
@dustymabe done! |
686166b to
96045ab
Compare
|
LGTM and ci.centos.org tests pass. Merging. |
|
Also would like to note that we could get by with not having checks all over the place in our code if we implemented something like #349 to validate the nulecule spec file before it got to the rest of the code. |
Fail nicely if user does not provide artifact files within Nulecule.
Instead of erroring out:
It will error out with:
Suggestions on wording is welcome.