Skip to content

Commit

Permalink
Merge branch '22-add-docs-to-drumk-it-site-on-drumkit-dir-layout-etc'…
Browse files Browse the repository at this point in the history
… into 'master'

Resolve "Add docs to drumk.it site on Drumkit dir layout, etc"

Closes #22

See merge request consensus.enterprises/drumkit!44
  • Loading branch information
Seonaid Lee committed Jun 30, 2021
2 parents d90432a + 882d2f4 commit 00cd6d4
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 55 deletions.
Empty file removed content/_index.md
Empty file.
47 changes: 47 additions & 0 deletions docs/content/development/structure.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
title: Structure of the Drumkit Project

---


Drumkit contains three kinds of make files in the `mk` directory:
[ note: we need to distinguish between `mk` and `.mk` in the documentation]
- Projects
- Tasks
- Tools

## Projects

You can use drumkit to initialize the following types of projects:
- Ansible (creates the following components)
- Inventory
- Groups
- Hosts
- Packer
- Drupal
- Hugo docs sites
- Aegir
- Openstack
- Aegir VPS


## Tasks

The "tasks" category is for ongoing building and maintenance tasks that have been automated with drumkit.

This includes:
- Running the docs server (`make docs-start` and `make docs-kill`)
- Managing git submodules
- Running drumkit tests (`make test-drumkit`)
- Running ansible playbooks

## Tools

This set of files is primarily for the installation of new tooling software. If it's a noun, it's probably in the "Tools" category. This is an evolving list, so check the `mk/tools` folder for the lastest options.

Some examples include:
- Hugo
- Gitlab-runner
- Lando (only on Linux - must be installed manually for OSX)
- Packer
- Terraform
9 changes: 4 additions & 5 deletions docs/content/development/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,15 @@ Drumkit is developed using a BDD approach with behat as the testing (suite?)

The tests are located in the `.mk/features` directory.

To run the tests locally, you need to install behat in the project.

Navigate to the root directory of the project (the one above `.mk`) and run `make init-behat`

You can test the installation by running `behat` (it just checks for correct installation of behat).
Any time you make changes to your local instance of `drumkit` you should run the tests at the drumkit level:
`make test-drumkit`.

To run the tests specific to the component you are developing, navigate to `.mk` and run `behat {filename}` for the component. For example, to run the tests for the hugo project, run `behat features/projects/hugo-docs.feature`

These are the tests most likely to break and fail when you push a change, so they should be run locally before pushing to the repo.

## Gitlab Runner

The CI process (when you push changes to the [drumkit project](https://gitlab.com/consensus.enterprises/drumkit) on gitlab) runs the complete `behat` suite on any branch, not just master. Running the tests locally before pushing changes is a relatively easy way to prevent pipeline failures.

This is not to say that you won't have pipeline failures; it will just catch the ones that break any tests associated with the code you just wrote.
Expand Down
33 changes: 0 additions & 33 deletions docs/content/structure/_index.md

This file was deleted.

16 changes: 0 additions & 16 deletions docs/content/testing/_index.md

This file was deleted.

2 changes: 1 addition & 1 deletion mk/projects/20_hugo-docs.mk
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.PHONY: init-project-hugo-docs hugo-ci-local

init-project-hugo-docs: docs docs/config.yaml docs/layouts/index.json docs/themes/learn docs/content/_index.md .gitlab-ci.yml ##@projects@hugo Initialize a hugo site
init-project-hugo-docs: docs docs/config.yaml docs/layouts/index.json docs/themes/learn docs/content/_index.md .gitlab-ci.yml ##@projects@hugo Create a new hugo docs site at the root level of the project
@echo "Initializing Hugo Docs project."
@git add docs
@git commit -m "Initialize docs site."
Expand Down

0 comments on commit 00cd6d4

Please sign in to comment.