diff --git a/.Makefile.swp b/.Makefile.swp
new file mode 100644
index 0000000..5ee136a
Binary files /dev/null and b/.Makefile.swp differ
diff --git a/.gitignore b/.gitignore
index f2ba980..f13c795 100644
--- a/.gitignore
+++ b/.gitignore
@@ -21,8 +21,5 @@ perun
# Local perun configuration:
.perun
-# This is a temporary file which is being created when FixFunctions is called from intrinsicsolver package.
-.preprocessed.yml
-
# Internal Visual Studio Code config
.vscode
diff --git a/.travis.yml b/.travis.yml
index 2c1a84b..e3bfae0 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,9 +1,18 @@
language: go
+sudo: required
+
go:
- 1.9.x
-install: make config-install get-deps
+env:
+ global:
+ - secure: "roiMALXQRkKKlPP+cbtac795XeHHnPrKvc6M8HjVa5gzL1SZXHDn/zvcvTc//AAMBFxZXb9+V+USrU3vNyzULIoh5j7nTOutPtik4WYLIfwADVgSxpiEG9jDBYp3DLlXMAMb5uJWRuG4DSSxpUGPFujQr9+aaUa0Lz6tsPUpE2/yaQfR5GmrAVteevkEZ0h18BxiRKsf4cRIGEQpwOSAQ+x66MlaEAn/kkprS4K9imniHeDRnz4TM75SAI7VZh9Fglv6gf8HTZ73EV1sGzsbG8+k1eO53UxMYR7YneB86ihKjRFuXSXzT8K0RdoACY6Muf81kwP5JUP3SLMaNgRTrdGmzOZ+yhJzfuey0b7i2llvGHrfKCmEIUzTYC5KZgvwblqwU97u55baJpAwQJgwPOKBO2RUvyzdK00t39kj+PpGrmyrW9evQ7mGk7o7txn4K1LJfCTn/fll1Y3B1poyiflYfQ4vlj7RgKSwAgIs36+yPhYF/m1K9I+jy8BRHPCZek3JJIMnKaW3OEBzpCRBoxxmMFomN8tq2Ygde5TUVxukAbZNIrlaPPWB5ZB6ZQ1hKol0yddkqOKxivGPQJaZthlt7eHpx4rAG+ZY1e706pG3iqYcTEVJTjPPzCaKdSpbFg3oKGet3ClimF0ycNpJRFQs2eveI3AkhVCN2Z4IWX8=" #Github
+
+install:
+ - 'mkdir -p $HOME/.config/perun'
+ - 'cp defaults/main.yaml $HOME/.config/perun/main.yaml'
+ - make get-deps
script:
- make code-analysis
@@ -13,12 +22,8 @@ before_deploy:
- 'mkdir -p release'
- 'GOOS=linux GOARCH=amd64 go build -o release/perun-linux-amd64'
- 'GOOS=darwin GOARCH=amd64 go build -o release/perun-darwin-amd64'
- - 'GOOS=windows GOARCH=amd64 go build -o release/perun-windows-amd64.exe'
- - 'GOOS=windows GOARCH=386 go build -o release/perun-windows-386.exe'
- 'tar -C release -czf release/perun-linux-amd64.tar.gz perun-linux-amd64'
- 'tar -C release -czf release/perun-darwin-amd64.tar.gz perun-darwin-amd64'
- - 'tar -C release -czf release/perun-windows-amd64.tar.gz perun-windows-amd64.exe'
- - 'tar -C release -czf release/perun-windows-386.tar.gz perun-windows-386.exe'
deploy:
provider: releases
@@ -27,8 +32,10 @@ deploy:
file:
- release/perun-linux-amd64.tar.gz
- release/perun-darwin-amd64.tar.gz
- - release/perun-windows-amd64.tar.gz
- - release/perun-windows-386.tar.gz
skip_cleanup: true
on:
tags: true
+
+after_deploy:
+ - chmod +x release.sh
+ - ./release.sh $TRAVIS_TAG $Github
\ No newline at end of file
diff --git a/LICENSE b/LICENSE
index a00a133..59bdc2d 100644
--- a/LICENSE
+++ b/LICENSE
@@ -186,14 +186,22 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.
- Copyright 2017 Appliscale
+ Copyright 2018 Appliscale
Maintainers and Contributors:
- Piotr Figwer (piotr.figwer@appliscale.io)
- - Wojciech Gawroński (wojciech.gawronski@appliscale.io)
- Kacper Patro (kacper.patro@appliscale.io)
-
+ - Maksymilian Wojczuk (max.wojczuk@appliscale.io)
+ - Sylwia Gargula (sylwia.gargula@appliscale.io)
+ - Mateusz Piwowarczyk (mateusz.piwowarczyk@appliscale.io)
+ - Jakub Lamparski (jakub.lamparski@appliscale.io)
+ - Michał Połcik (michal.polcik@appliscale.io)
+ - Tomasz Raus (tomasz.raus@appliscale.io)
+ - Aleksander Mamla
+ - Paweł Pikuła
+ - Wojciech Gawroński
+
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
diff --git a/Makefile b/Makefile
index 95b8bf9..7a0118e 100644
--- a/Makefile
+++ b/Makefile
@@ -1,11 +1,7 @@
-.PHONY: config-install get-deps code-analysis test all
+.PHONY: get-deps code-analysis test all
all: get-deps code-analysis test
-config-install:
- mkdir -p "$(HOME)/.config/perun"
- cp defaults/main.yaml "$(HOME)/.config/perun/main.yaml"
-
get-deps:
go get -t -v ./...
go install ./...
@@ -15,5 +11,13 @@ get-deps:
code-analysis: get-deps
go vet -v ./...
-test: get-deps
- go test -v -cover ./...
+test: get-deps create-mocks
+ go test -cover ./...
+
+create-mocks: get-mockgen
+ `go env GOPATH`/bin/mockgen -source=./awsapi/cloudformation.go -destination=./stack/stack_mocks/mock_aws_api.go -package=stack_mocks CloudFormationAPI
+ `go env GOPATH`/bin/mockgen -source=./logger/logger.go -destination=./checkingrequiredfiles/mocks/mock_logger.go -package=mocks LoggerInt
+
+get-mockgen:
+ go get github.com/golang/mock/gomock
+ go install github.com/golang/mock/mockgen
diff --git a/README.md b/README.md
index 6f0e048..b76c1a6 100644
--- a/README.md
+++ b/README.md
@@ -1,19 +1,57 @@
-# Perun [![Build Status](https://travis-ci.org/Appliscale/perun.svg?branch=master)](https://travis-ci.org/Appliscale/perun) [![GoDoc](https://godoc.org/github.com/Appliscale/perun?status.svg)](https://godoc.org/github.com/Appliscale/perun)
+# Perun [![Release](https://img.shields.io/github/release/Appliscale/perun.svg?style=flat-square)](https://github.com/Appliscale/perun/releases/latest) [![Build_Status](https://travis-ci.org/Appliscale/perun.svg?branch=master)](https://travis-ci.org/Appliscale/perun) [![License](https://img.shields.io/badge/License-Apache%202.0-orange.svg)](https://github.com/Appliscale/perun/blob/master/LICENSE.md) [![Go_Report_Card](https://goreportcard.com/badge/github.com/Appliscale/perun?style=flat-square&fuckgithubcache=1)](https://goreportcard.com/report/github.com/Appliscale/perun) [![GoDoc](https://godoc.org/github.com/Appliscale/perun?status.svg)](https://godoc.org/github.com/Appliscale/perun)
-A swiss army knife for *AWS CloudFormation* templates - validation, conversion, generators and other various stuff.
+
+
+
-## Goal
+A command-line validation tool for *AWS Cloud Formation* that allows to conquer the cloud faster!
-Perun was created to support work with CloudFormation templates. CloudFormation works in a way that it runs template online in AWS infrastructure and fails after first error - in many cases it is related with particular name length (e.g. maximum length is 64 characters). Instead of doing a round-trip, we would like to detect such cases locally.
+## Goal
+Perun was created to improve work experience with CloudFormation. The idea came from the team constantly using AWS CloudFormation - it runs a template online in AWS infrastructure and fails after first error - which in many cases is trivial (e.g. maximum name length is 64 characters). Instead of doing a round-trip, we would like to detect such cases locally.
## Building and Installation
### OSX
+#### Homebrew:
+```bash
+$ brew install Appliscale/tap/perun
+```
+#### From binaries:
+* Go to Perun’s releases https://github.com/Appliscale/perun/releases
+* Find and download perun-darwin-amd64.tar.gz
+* Unpack the archive
+
+### Debian
+#### Dpkg package manager:
+* Go to https://github.com/Appliscale/perun-dpkg
+* Download perun.deb
+* Install:
+```bash
+$ dpkg -i perun.deb
+```
+#### From binaries:
+* Go to Perun’s releases https://github.com/Appliscale/perun/releases
+* Find and download perun-linux-amd64.tar.gz
+* Unpack:
+```bash
+$ tar xvzf perun-linux-amd64.tar.gz
+```
-If you are using *homebrew* just run:
+### Linux
+#### Rpm package manager:
+* Go to: https://github.com/Appliscale/rpmbuild/tree/master/RPMS/x86_64
+* Download perun-linux-amd64-1.2.0-1.x86_64.rpm
+* Install:
+```bash
+$ rpm -ivh perun-linux-amd64-1.2.0-1.x86_64.rpm
+```
+#### From binaries:
+* Go to Perun’s releases https://github.com/Appliscale/perun/releases
+* Find and download perun-linux-amd64.tar.gz
+* Unpack:
```bash
-brew install Appliscale/tap/perun
+tar xvzf perun-linux-amd64.tar.gz
```
### Building from sources
@@ -28,57 +66,158 @@ $GOPATH $ cd perun
Then build and install configuration for the application inside perun directory by executing:
```bash
-perun $ make config-install
-perun $ make all
+perun $ make
```
-With first command a default configuration file (`defaults/main.yaml`) will be copied to your home directory under the `~/.config/perun/main.yaml` path. After second command application will be compiled as a `perun` binary inside `bin` directory in your `$GOPATH/perun` workspace.
+After this, application will be compiled as a `perun` binary inside `bin` directory in your `$GOPATH/perun` workspace.
+
## Working with Perun
### Commands
-To validate your template with AWS API (*online validation*), just type:
+#### Validation
+To validate your template, just type:
```bash
~ $ perun validate
```
+Your template will be then validated using both our validation mechanism and AWS API
+(*aws validation*).
-To validate your template offline (*well*, almost offline :wink: - *AWS CloudFormation Resource Specification* still needs to be downloaded for a fresh installation) use `validate_offline` mode:
+#### Configuration
+To create your own configuration file use `configure` mode:
```bash
-~ $ perun validate_offline
+~ $ perun configure
```
-To convert your template between JSON and YAML formats you have to type:
+Then type path and name of new configuration file.
+
+#### Stack Parameters
+Bored of writing JSON parameter files? Perun allows you to interactively create parameters file
+for a given template. You can either pass the parameters interactively or as a command-line argument.
+##### Command Line Parameter way:
```bash
-~ $ perun convert
-
-
-
+~ $ perun create-parameters