-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from belavina/issues/4-app-release
Release pipeline and App Bundling
- Loading branch information
Showing
9 changed files
with
147 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Golang CircleCI 2.0 configuration file | ||
# | ||
# Check https://circleci.com/docs/2.0/language-go/ for more details | ||
version: 2 | ||
jobs: | ||
deploy: | ||
docker: | ||
- image: circleci/golang:1.9 | ||
|
||
working_directory: /go/src/github.com/Seneca-CDOT/StatUtils | ||
|
||
steps: | ||
- checkout | ||
|
||
- run: | ||
name: "Get Utility Libraries" | ||
command: | | ||
go get -u github.com/tcnksm/ghr | ||
- run: | ||
name: "Build executables and package" | ||
command: | | ||
mkdir dist | ||
mkdir pkg | ||
GOOS=windows GOARCH=amd64 go build -o dist/perfmonitor.exe | ||
GOOS=linux GOARCH=amd64 go build -o dist/perfmonitor | ||
zip -r -j pkg/perfmonitor_win_amd64.zip dist/perfmonitor.exe ./INSTALL_WIN.md ./SysStats.ps1 ./Perfmonitor.xml | ||
zip -r -j pkg/perfmonitor_linux_amd64.zip dist/perfmonitor ./INSTALL_LINUX.md ./perfmonitor.service | ||
- run: | ||
name: "Deploy on github releases" | ||
command: | | ||
VERSION="v$(dist/perfmonitor -version)" | ||
ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -soft ${VERSION} pkg/ | ||
workflows: | ||
version: 2 | ||
build-deploy: | ||
jobs: | ||
- deploy: | ||
filters: | ||
branches: | ||
only: | ||
- master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
/*.exe | ||
/*.out | ||
.vscode | ||
pkg | ||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
**Linux Installation** | ||
|
||
Steps to install `perfmonitor` release on a linux system; | ||
|
||
1) Install binary: | ||
|
||
`cp ./perfmonitor /usr/bin/` | ||
|
||
2) Install service: | ||
|
||
``` | ||
cp perfmonitor.service /etc/systemd/system | ||
systemctl start perfmonitor | ||
systemctl enable perfmonitor | ||
``` | ||
3) Data is accessible at `:9159/sysstats` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
**Windows Installation** | ||
|
||
Steps to install `perfmonitor` release on a win system; | ||
|
||
|
||
1) Extract the release bundle as `C:\Program Files\perfmonitor_win_amd64` | ||
|
||
2) Open `Task Scheduler` as `Administrator` | ||
|
||
3) Import pre-defined task by picking `Import Task` on action tab | ||
|
||
a) select `Perfmonitor` xml file in `C:\Program Files\perfmonitor_win_amd64` | ||
|
||
b) Click `Ok`, select `Task Scheduler Library` on the left, right click on `Perfmonitor` & select `Enable` and then `Run` in the dropdown menu | ||
|
||
4) Alternatively, you can create a new task by choosing `Create task` option | ||
|
||
a) On tab `General`, set name as `Perfmonitor`, tick `Run whether user is logged on or not` and `Run with highest privileges` | ||
|
||
b) On tab `Triggers`, set `At startup` as task trigger | ||
|
||
c) On tab `Action`, point `Program/script` to `cmd`, set `Add arguments` as `/c perfmonitor.exe > log.txt` and `Start in` as `C:\Program Files\perfmonitor_win_amd64` | ||
|
||
d) Click `Ok`, select `Task Scheduler Library` on the left, right click on `Perfmonitor` & select `Run` in the dropdown menu |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[Unit] | ||
Description=Perfmonitor tool collecting system performance | ||
|
||
[Service] | ||
Type=idle | ||
Restart=always | ||
RestartSec=3 | ||
ExecStart=/usr/bin/perfmonitor | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters