Skip to content

Commit

Permalink
dev: move to semantic versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
greenpau committed Jan 18, 2017
1 parent f26fe43 commit 4d49d27
Show file tree
Hide file tree
Showing 11 changed files with 266 additions and 95 deletions.
11 changes: 11 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,17 @@ git remote add upstream [email protected]:greenpau/ndmtk.git
Thereafter, the contributor follows the Initial Github Commit and Pull Request
guidance.

:warning: In some instances, a user's fork does not sync with its **upstream**
automatically. In those cases, the user must manually sync the fork:

```
git checkout master
git remote add upstream git://github.com/greenpau/ndmtk.git
git fetch upstream
git merge upstream/master master
git push
```

:arrow_up: [Back to top](#top)

*****
Expand Down
2 changes: 1 addition & 1 deletion MAINTAINERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Next, the maintainer tags the release with an appropriate version and name.
The maintainer pushes the tags to upstream.

```
git tag -a v0.1 -m "Flamingo Release"
git tag -a v0.1.1 -m "Robin Release"
git push
git push --tags
```
Expand Down
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
export USER
PLUGIN_NAME="ndmtk"
PLUGIN_NAME_EGG := $(subst -,_,$(PLUGIN_NAME))
PLUGIN_VER=0.1
PLUGIN_VER=0.1.1
DOCKER_IMAGE_NAME="greenpau/ndmtk"
DOCKER_CONTAINER_NAME="ndmtk"
DOCKER_CONTAINER_SHELL="/bin/sh"
Expand Down Expand Up @@ -45,9 +45,11 @@ connect:
package:
@sed -i 's/ VERSION:.*/ VERSION: \x27${PLUGIN_VER}\x27/' circle.yml
@sed -i 's/pkg_ver =.*/pkg_ver = \x27${PLUGIN_VER}\x27;/' setup.py
@sed -i 's/-[0-9]\.[0-9].tar.gz/-${PLUGIN_VER}.tar.gz/;' docker/alpine/Dockerfile
@sed -i 's/-[0-9]\.[0-9]\.[0-9].tar.gz/-${PLUGIN_VER}.tar.gz/;' docker/alpine/Dockerfile
@sed -i 's/-[0-9]\.[0-9]\.[0-9].tar.gz/-${PLUGIN_VER}.tar.gz/;' docker/centos/Dockerfile
@sed -i 's/^version =.*/version = u\x27${PLUGIN_VER}\x27/' ./docs/conf.py
@sed -i 's/^release =.*/release = u\x27${PLUGIN_VER}\x27/' ./docs/conf.py
@docs/markdown.sh
@pandoc --from=markdown --to=rst --output=${PLUGIN_NAME}/README.rst README.md
@sed -i 's/:arrow._up: //' ${PLUGIN_NAME}/README.rst
@sed -i 's/images\/ndmtk\.png/images\/ndmtk_pypi.png/' ${PLUGIN_NAME}/README.rst
Expand All @@ -64,6 +66,7 @@ docs:
@docs/markdown.sh
@pandoc --from=markdown --to=rst --output=${PLUGIN_NAME}/README.rst README.md
@sed -i 's/:arrow._up: //' ${PLUGIN_NAME}/README.rst
@sed -i 's/images\/ndmtk\.png/images\/ndmtk_pypi.png/' ${PLUGIN_NAME}/README.rst
@cp LICENSE.txt ${PLUGIN_NAME}/LICENSE.txt
@cd docs && eval ${DOCKER_BINARY} build -t greenpau/ndmtk-docs .
@echo "run 'docker run --rm -p 8000:8000 greenpau/ndmtk-docs' and review documentation at 'http://localhost:8000'"
2 changes: 1 addition & 1 deletion circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ machine:
version: 2.7.5
environment:
PACKAGE: ndmtk
VERSION: '0.1'
VERSION: '0.1.1'
TAG1: ${VERSION}-$(date +%Y%m%dT%H%M)-git-${CIRCLE_SHA1:0:7}
TAG2: ${CIRCLE_PR_USERNAME}_${CIRCLE_BRANCH/pull\//pr_}
services:
Expand Down
4 changes: 2 additions & 2 deletions docker/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ COPY demo/firewall/files/ndmtk/spec/*.yml /etc/ansible/files/ndmtk/spec/
COPY demo/firewall/files/ndmtk/os/*.yml /etc/ansible/files/ndmtk/os/
COPY demo/firewall/files/ndmtk/host/*.yml /etc/ansible/files/ndmtk/host/
COPY demo/firewall/files/ndmtk/exceptions.yml /etc/ansible/files/ndmtk/
COPY dist/ndmtk-0.1.tar.gz /usr/local/src/
RUN pip install /usr/local/src/ndmtk-0.1.tar.gz
COPY dist/ndmtk-0.1.1.tar.gz /usr/local/src/
RUN pip install /usr/local/src/ndmtk-0.1.1.tar.gz

ENTRYPOINT ["/bin/sh"]
25 changes: 25 additions & 0 deletions docker/centos/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
FROM centos:latest
MAINTAINER Paul Greenberg @greenpau

RUN yum -y update && yum -y install curl git gcc vim make python-devel libffi-devel openssl-devel && \
curl -s https://bootstrap.pypa.io/get-pip.py -o get-pip.py && python get-pip.py

RUN pip install --upgrade pip
RUN pip install ansible==2.2.0.0

WORKDIR /etc/ansible

COPY demo/firewall/ansible.vault.yml /root/.ansible.vault.yml
COPY demo/firewall/ansible.vault.key /root/.ansible.vault.key
COPY demo/firewall/hosts /etc/ansible/
COPY demo/firewall/ansible.cfg /etc/ansible/
COPY demo/firewall/README.md /etc/ansible/
COPY demo/firewall/playbooks/*.yml /etc/ansible/playbooks/
COPY demo/firewall/files/ndmtk/spec/*.yml /etc/ansible/files/ndmtk/spec/
COPY demo/firewall/files/ndmtk/os/*.yml /etc/ansible/files/ndmtk/os/
COPY demo/firewall/files/ndmtk/host/*.yml /etc/ansible/files/ndmtk/host/
COPY demo/firewall/files/ndmtk/exceptions.yml /etc/ansible/files/ndmtk/
COPY dist/ndmtk-0.1.1.tar.gz /usr/local/src/
RUN pip install /usr/local/src/ndmtk-0.1.1.tar.gz

ENTRYPOINT ["/bin/bash"]
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@
# built documents.
#
# The short X.Y version.
version = u'0.1'
version = u'0.1.1'
# The full version, including alpha/beta/rc tags.
release = u'0.1'
release = u'0.1.1'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
21 changes: 21 additions & 0 deletions docs/userguide.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,3 +247,24 @@ This playbook shows how to collecte data via the chaing of devices, i.e
```

:arrow_up: [Back to top](#top)

*****

## Common Errors

A user may receive the following error:

``` {.sourceCode .shell}
fatal: [ny-fw01]: FAILED! => {
"failed": true,
"msg": "The module ndmtk was not found in configured module paths.
Additionally, core modules are missing.
If this is a checkout, run 'git submodule update --init --recursive'
to correct this problem."
}
```

This is the indication that something is broken with setup.py. The issue
maybe caused by the lack of permissions. Please open an issue.

:arrow_up: [Back to top](#top)
21 changes: 21 additions & 0 deletions docs/userguide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -243,3 +243,24 @@ This playbook shows how to collecte data via the chaing of devices, i.e
no_host_key_check=yes
|Back to Top|_ `Back to Top`_

Common Errors
-------------

A user may receive the following error:

.. code-block:: shell
fatal: [ny-fw01]: FAILED! => {
"failed": true,
"msg": "The module ndmtk was not found in configured module paths.
Additionally, core modules are missing.
If this is a checkout, run 'git submodule update --init --recursive'
to correct this problem."
}
This is the indication that something is broken with `setup.py`.
The issue maybe caused by the lack of permissions.
Please open an issue.

|Back to Top|_ `Back to Top`_
2 changes: 1 addition & 1 deletion ndmtk/plugins/action/ndmtk.j2
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ log_commit;
set loop_counter 0;
while 1 {
incr loop_counter;
if { $loop_counter > 20 } {
if { $loop_counter > 250 } {
send_status "connected:no";
exit $ERROR_CONNECTION_TIMEOUT;
}
Expand Down
Loading

0 comments on commit 4d49d27

Please sign in to comment.