Skip to content

Commit ccf854d

Browse files
Release v1.3.0
2 parents 80b6553 + 779d1b5 commit ccf854d

File tree

89 files changed

+9942
-4272
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+9942
-4272
lines changed

.circleci/config.yml

+21-14
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ jobs:
1919
at: /home/circleci
2020
- restore_cache:
2121
keys:
22-
- v3-front-dependencies-{{ checksum "front/package.json" }}
23-
- v3-front-dependencies-
22+
- v5-front-dependencies-{{ checksum "front/package.json" }}
23+
- v5-front-dependencies-
2424
- run:
2525
working_directory: front
2626
name: Download dependencies
@@ -29,7 +29,11 @@ jobs:
2929
paths:
3030
- front/node_modules
3131
- /home/circleci/.cache/yarn/v6
32-
key: v3-front-dependencies-{{ checksum "front/package.json" }}
32+
key: v5-front-dependencies-{{ checksum "front/package.json" }}
33+
- run:
34+
working_directory: front
35+
name: Run tests
36+
command: yarn test
3337
- run:
3438
working_directory: front
3539
name: Build frontend
@@ -47,33 +51,36 @@ jobs:
4751
at: /home/circleci
4852
- restore_cache:
4953
keys:
50-
- v3-back-dependencies-{{ checksum "go.sum" }}
51-
- v3-back-dependencies-
54+
- v4-back-dependencies-{{ checksum "back/go.sum" }}
55+
- v4-back-dependencies-
5256
- run:
57+
working_directory: back
5358
name: Run tests
5459
command: go test ./...
5560
- run:
61+
working_directory: back
5662
name: Build backend
5763
command: |
64+
cp -R ../front/build frontendBuild
5865
go install github.com/markbates/pkger/cmd/pkger && pkger
5966
export CGO_ENABLED=0
6067
go build karto
6168
GOOS=darwin GOARCH=amd64 go build -o karto_darwin
6269
GOOS=windows GOARCH=amd64 go build -o karto.exe
6370
- save_cache:
64-
key: v3-back-dependencies-{{ checksum "go.sum" }}
71+
key: v4-back-dependencies-{{ checksum "back/go.sum" }}
6572
paths:
6673
- /home/circleci/go/pkg/mod
6774
- store_artifacts:
68-
path: karto
75+
path: back/karto
6976
- store_artifacts:
70-
path: karto_darwin
77+
path: back/karto_darwin
7178
- store_artifacts:
72-
path: karto.exe
79+
path: back/karto.exe
7380
- persist_to_workspace:
7481
root: /home/circleci
7582
paths:
76-
- karto/karto
83+
- karto/back/karto
7784
dockerize-and-release:
7885
docker:
7986
- image: cimg/base:stable
@@ -87,16 +94,16 @@ jobs:
8794
command: |
8895
docker build -t zenikalabs/karto .
8996
docker tag zenikalabs/karto zenikalabs/karto:v1
90-
docker tag zenikalabs/karto zenikalabs/karto:v1.2
91-
docker tag zenikalabs/karto zenikalabs/karto:v1.2.1
97+
docker tag zenikalabs/karto zenikalabs/karto:v1.3
98+
docker tag zenikalabs/karto zenikalabs/karto:v1.3.0
9299
- run:
93100
name: Push docker image
94101
command: |
95102
echo "$DOCKER_PASS" | docker login --username $DOCKER_USER --password-stdin
96103
docker push zenikalabs/karto
97104
docker push zenikalabs/karto:v1
98-
docker push zenikalabs/karto:v1.2
99-
docker push zenikalabs/karto:v1.2.1
105+
docker push zenikalabs/karto:v1.3
106+
docker push zenikalabs/karto:v1.3.0
100107
workflows:
101108
version: 2
102109
build-test-and-deploy:

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
FROM scratch
22

3-
COPY ./karto /karto
3+
COPY ./back/karto /karto
44

55
ENTRYPOINT ["/karto"]

README.md

+7-6
Original file line numberDiff line numberDiff line change
@@ -90,23 +90,23 @@ The following tools must be available locally:
9090

9191
### Run the frontend in dev mode
9292

93-
In the `front` folder, execute:
93+
In the `front` directory, execute:
9494
```shell script
9595
npm start
9696
```
9797
This will expose the app in dev mode on `localhost:3000` with a proxy to `localhost:8000` for the API calls.
9898

9999
### Run the backend locally
100100

101-
Simply execute:
101+
In the `back` directory, execute:
102102
```shell script
103103
go build karto
104104
./karto
105105
```
106106

107107
### Test suites
108108

109-
To run the entire backend test suite:
109+
To run the entire backend test suite, execute in the `back` directory:
110110
```shell script
111111
go test ./...
112112
```
@@ -116,18 +116,19 @@ go test ./...
116116
In production mode, the frontend is packaged in the go binary using [pkger](https://github.com/markbates/pkger). In this
117117
configuration, the frontend is served on the `/` route and the API on the `/api` route.
118118

119-
To compile the Karto binary from source, first compile the frontend source code. In the `front` folder, execute:
119+
To compile the Karto binary from source, first compile the frontend source code. In the `front` directory, execute:
120120
```shell script
121121
npm run build
122122
```
123-
This will generate a `build` folder in `/front`.
123+
This will generate a `build` directory in `front`.
124124

125125
Then, package it inside the backend:
126126
```shell script
127+
cp -R front/build back/frontendBuild
127128
go install github.com/markbates/pkger/cmd/pkger
128129
pkger
129130
```
130-
This will generate a `pkged.go` file at the root with a binary content equivalent to the generated `build` folder.
131+
This will generate a `pkged.go` file in `back` with a binary content equivalent to the generated `build` directory.
131132

132133
Finally, compile the go binary:
133134
```shell script

analyzer/pod/pod_analyzer.go

-26
This file was deleted.

0 commit comments

Comments
 (0)