From 8fbb98103776c8ad27cf6acc588e0d73b6cbffb1 Mon Sep 17 00:00:00 2001
From: Clivern
Date: Sun, 9 Jun 2019 14:22:56 +0200
Subject: [PATCH 1/2] add parallel config
---
README.md | 3 ++-
config.dist.yml | 1 +
deployments/docker-compose/configs/config.docker.yml | 1 +
internal/app/module/releaser.go | 11 ++++++++++-
4 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index d17307d..ecae93a 100644
--- a/README.md
+++ b/README.md
@@ -90,6 +90,7 @@ releases:
build:
# Build absolute path
path: /app/var/build
+ parallelism: 1
# Application Database
database:
@@ -126,7 +127,7 @@ $ go run rabbit.go -config=/custom/path/config.prod.yml
## Deployment
-Rabbit needs a decent resources to be able to work properly. Because the build process itself done by goreleaser and it consumes a lot. So better to keep `parallelism` equal `1` and increase if you have more resources and would like to speed the build process.
+Rabbit needs a decent resources to be able to work properly. Because the build process itself done by goreleaser and it consumes a lot. So better to keep `build.parallelism` equal `1` and increase if you have more resources and would like to speed the build process.
### On a Linux Server
diff --git a/config.dist.yml b/config.dist.yml
index edea9ff..61e5e59 100644
--- a/config.dist.yml
+++ b/config.dist.yml
@@ -51,6 +51,7 @@ releases:
build:
# Build absolute path
path: /app/var/build
+ parallelism: 1
# Application Database
database:
diff --git a/deployments/docker-compose/configs/config.docker.yml b/deployments/docker-compose/configs/config.docker.yml
index c2536cd..2cd3954 100644
--- a/deployments/docker-compose/configs/config.docker.yml
+++ b/deployments/docker-compose/configs/config.docker.yml
@@ -51,6 +51,7 @@ releases:
build:
# Build absolute path
path: /app/var/build
+ parallelism: 1
# Application Database
database:
diff --git a/internal/app/module/releaser.go b/internal/app/module/releaser.go
index 9cbeb80..a0b9c16 100644
--- a/internal/app/module/releaser.go
+++ b/internal/app/module/releaser.go
@@ -12,6 +12,7 @@ import (
"github.com/spf13/viper"
"os"
"path/filepath"
+ "strconv"
"strings"
)
@@ -87,7 +88,15 @@ func (r *Releaser) Release() (bool, error) {
func (r *Releaser) Build() (bool, error) {
cmd := pkg.NewShellCommand()
- _, err := cmd.Exec(r.BuildPath, "goreleaser", "--snapshot", "--skip-publish", "--rm-dist")
+ _, err := cmd.Exec(
+ r.BuildPath,
+ "goreleaser",
+ "--snapshot",
+ "--skip-publish",
+ "--rm-dist",
+ "--parallelism",
+ strconv.Itoa(viper.GetInt("build.parallelism")),
+ )
if err != nil {
return false, err
From 2bee08a10647e5c539289ad18bb7b506a409a7cf Mon Sep 17 00:00:00 2001
From: "A. F"
Date: Sun, 9 Jun 2019 14:29:59 +0200
Subject: [PATCH 2/2] Update README.md
---
README.md | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/README.md b/README.md
index ecae93a..b3858b8 100644
--- a/README.md
+++ b/README.md
@@ -5,7 +5,7 @@
-
+
@@ -14,12 +14,12 @@
Rabbit is a lightweight service that will build and store your go projects binaries. Once a VCS system (github or bitbucket) notifies rabbit of a new release, it clones the project, builds different binaries and publish them.
-
+
Screenshot
-
+