question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot find directory (when run inside the project)

See original GitHub issue

Hi,

I’m using Taskcat version 2017.908.112800 on MacOS.

My project is:

  • Path: /Users/abc/sample-taskcat-project
  • Subfolders:
.
├── ci
│   ├── config.yml
│   ├── debug-input.json
│   ├── taskcat-autobucket.yml
│   └── taskcat.yml
├── scripts
│   └── scripts_userdata.sh
└── templates
    ├── debug-yaml.template
    └── debug.template

  • Config.yml:
global:
  owner: abc@abc.com
  qsname: sample-taskcat-project
  regions:
    - ap-southeast-1

  reporting: true
tests:
  taskcat-test1:
    parameter_input: debug-input.json
    regions:
      - ap-southeast-1
    template_file: debug.template
``

The When I ran `taskcat -c ci/config.yml`. I got this error.

[taskcat] :Reading Config form: ci/config.yml [taskcat] |Queing test => taskcat-test1 [INFO ] :Creating bucket taskcat-sample-taskcat-project-f3cab85a in us-east-1 [INFO ] :Staging Bucket => [taskcat-sample-taskcat-project-f3cab85a] Hint: The name specfied as value of qsname (sample-taskcat-project) must match the root directory of your project [ERROR ] :!Cannot find directory [sample-taskcat-project] in /Users/cduong13/GDrive/Workspace/sample-taskcat-project [INFO ] :Please cd to where you project is located


Another confusion is, in README, you say the `config.yml` file use the key `project` for the PROJECT NAME but in the example (the `taskcat.yml` use `qsname` key).
After the above error, I tried to use `project`, it would complain that **global: qsname missing from ci/config.yml**.

Best,

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
chrisduongcommented, Nov 20, 2017

Hi @avattathil,

I have read your explanation, it is wonderful. Thank you 😃.

0reactions
tonynvcommented, Nov 17, 2017

This tool was specifically made to test quickstart projects. you can see more details here

https://aws-quickstart.github.io/
and see the catalog of projects here:
https://aws.amazon.com/quickstart/

After you review the content above you will notice that quickstart are portable projects that can be linked together (as nested templates) so each project contains a specific structure which follow our development standards.

Each project is contained in its own repo. This way we can submodule quickstarts. For example a VPC or Bastion template can be nested in a master template as a subproject. Each project will be tested as changes are made to the upstream branch. When used as part of a larger CFN template they are treated as snapshotted assets (specific release or commit) within that quickstart.

See example of nesting here: https://github.com/aws-quickstart/quickstart-linux-bastion/blob/master/templates/linux-bastion-master.template#L260

We use taskcat as a tool to assist us in developing quickstarts and make them available to partners and customers for the purpose of testing quickstarts.

taskcat is meant to be use in the following work flow in a CI pipeline: (

  1. Git clone project repo
  2. Run test

Taskcat will upload the repo contents to a specified s3 bucket s3://sometest-bucket/quickstart-project. In each test run the contents of the project are synced to s3. Due to the fact that cfn templates are often nested the master template will be pointing to the s3 location not you local filesystem copy see the following link for more info https://aws-quickstart.github.io/design.html#modularity. Its important to test quickstarts from a bucket to make sure they are modular This is the main reason for forcing taskcat to run from the cloned location. Taskcat will search and index by looking for the project or qsname. - test using the inputs provided in the regions specified - generate a report that shows the results of the test.

For example

git clone https://github.com/aws-quickstart/quickstart-linux-bastion
taskcat -c quickstart-linux-bastion/ci/config.yaml
#open taskcat_outputs in a browser to see results 

In a CI pipeline your testing should be automated, meaning you check in code into git and your pipeline should trigger - pull the commit and kick off a test ,then clean up. If CI is indeed testing your code you will not be in the template dir. Once you check in the code a remote process should be testing your code. (git clone url-to-repo && taskcat -c qsname/ci/config.yml).

Options for advanced testing: Within the ci dir you can define multiple scenarios which test only specific templates or run tests with diffrent inputs example here: https://github.com/aws-quickstart/quickstart-linux-bastion/blob/master/ci/config.yml#L21

We have used this tools to test hundreds of templates. With that said it may not suit your needs. We appreciate the feedback. Please check back as we will make future improvements that may be a better fit for what you are looking to accomplish.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot find module when importing from project in python
Try this: import sys sys.path.insert(0, '../') from util.misc import *. You may also want to take a look at this post: How to...
Read more >
here - R Project
here. The here package enables easy file referencing by using the top-level directory of a file project to easily build file paths.
Read more >
Chapter 8 – Reading and Writing Files
After running the previous code on Windows, you will see three new files in the current working directory: mydata.bak, mydata.dat, and mydata.dir. On...
Read more >
Vivado - How can I find the Working Directory and project ...
I have noticed that issuing pwd or dir commands within the Tcl Console gives the application launch directory (e.g., C:/Users/joesmith/AppData/ ...
Read more >
RStudio Projects and Working Directories: A Beginner's Guide
When your RStudio session is running through the project file (.Rproj), the current working directory points to the root folder where that ....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found