Skip to content

Commit

Permalink
remove node docker stage, remove web ui
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenRadachy committed Oct 19, 2017
1 parent ff3a7e0 commit 7a149fd
Show file tree
Hide file tree
Showing 79 changed files with 4 additions and 1,017 deletions.
4 changes: 0 additions & 4 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
k6
samples
dist
web/dist
web/tmp
web/node_modules
web/bower_components
js/node_modules
.vagrant
.git
5 changes: 0 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
/k6
/k6.exe
/dist
/web/bower_components
/web/node_modules
/web/dist/*
!/web/dist/.gitkeep
/web/tmp
/js/node_modules
/docs

Expand Down
5 changes: 0 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
FROM node:8.7-alpine
FROM golang:1.9-alpine

COPY --from=0 / /
WORKDIR $GOPATH/src/github.com/loadimpact/k6
ADD . .
RUN apk --no-cache add --virtual .build-deps make git build-base && \
yarn global add ember-cli bower && \
make web && pwd && rm -r web/tmp web/node_modules web/bower_components && \
go get . && go install . && rm -rf $GOPATH/lib $GOPATH/pkg && \
(cd $GOPATH/src && ls | grep -v github | xargs rm -r) && \
(cd $GOPATH/src/github.com && ls | grep -v loadimpact | xargs rm -r) && \
apk del .build-deps

ENV K6_ADDRESS 0.0.0.0:6565
ENTRYPOINT ["k6"]
16 changes: 3 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,26 +1,16 @@
VERSION := 0.2.1
VERSION := 0.2.2

all: build web
all: build

.PHONY: build
build: web
build:
go build

.PHONY: check
check:
gometalinter --deadline 10m --config gometalinter.json ./...
go test -timeout 30s ./...

.PHONY: web
web: web/node_modules web/bower_components
cd web && node node_modules/.bin/ember build -prod

web/node_modules:
cd web && npm install

web/bower_components: web/node_modules
cd web && node node_modules/.bin/bower install --allow-root

.PHONY: docs
docs:
jsdoc -c jsdoc.json
Expand Down
15 changes: 0 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,18 +115,3 @@ Development Setup
go get -u github.com/loadimpact/k6
```

The only catch is, if you want the web UI available, it has to be built separately. Requires a working NodeJS installation.

First, install the `ember-cli` and `bower` tools if you don't have them already:

```bash
npm install -g ember-cli bower
```

Then build the UI:

```bash
cd $GOPATH/src/github.com/loadimpact/k6/web
npm install && bower install
ember build
```
5 changes: 1 addition & 4 deletions api/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,18 @@ import (
"fmt"
"net/http"

"github.com/GeertJohan/go.rice"
"github.com/loadimpact/k6/api/common"
"github.com/loadimpact/k6/api/v1"
"github.com/loadimpact/k6/core"
log "github.com/sirupsen/logrus"
"github.com/urfave/negroni"
)

var static = rice.MustFindBox("../web/dist")

func NewHandler() http.Handler {
mux := http.NewServeMux()
mux.Handle("/v1/", v1.NewHandler())
mux.Handle("/ping", HandlePing())
mux.Handle("/", http.FileServer(static.HTTPBox()))
mux.Handle("/", HandlePing())
return mux
}

Expand Down
4 changes: 0 additions & 4 deletions build-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ eval $(go env)
VERSION=${1:-$(git describe --tags --abbrev=0)}

# Fail early if external dependencies aren't installed.
node --version > /dev/null || (echo "ERROR: node is not installed, bailing out."; exit 1)
rice --help > /dev/null || (echo "ERROR: rice is not installed, run: go get github.com/GeertJohan/go.rice"; exit 1)

make_archive() {
Expand Down Expand Up @@ -52,9 +51,6 @@ build_dist() {

echo "--- Building Release: ${VERSION}"

echo "-> Building web assets..."
make web

echo "-> Building platform packages..."
mkdir -p dist

Expand Down
4 changes: 0 additions & 4 deletions web/.bowerrc

This file was deleted.

20 changes: 0 additions & 20 deletions web/.editorconfig

This file was deleted.

12 changes: 0 additions & 12 deletions web/.ember-cli

This file was deleted.

32 changes: 0 additions & 32 deletions web/.jshintrc

This file was deleted.

24 changes: 0 additions & 24 deletions web/.travis.yml

This file was deleted.

3 changes: 0 additions & 3 deletions web/.watchmanconfig

This file was deleted.

11 changes: 0 additions & 11 deletions web/app/adapters/application.js

This file was deleted.

18 changes: 0 additions & 18 deletions web/app/app.js

This file was deleted.

Empty file removed web/app/components/.gitkeep
Empty file.
6 changes: 0 additions & 6 deletions web/app/components/sb-check-list.js

This file was deleted.

6 changes: 0 additions & 6 deletions web/app/components/sb-check.js

This file was deleted.

4 changes: 0 additions & 4 deletions web/app/components/sb-group.js

This file was deleted.

Empty file removed web/app/controllers/.gitkeep
Empty file.
28 changes: 0 additions & 28 deletions web/app/controllers/application.js

This file was deleted.

17 changes: 0 additions & 17 deletions web/app/controllers/index.js

This file was deleted.

Empty file removed web/app/helpers/.gitkeep
Empty file.
12 changes: 0 additions & 12 deletions web/app/helpers/metric-format.js

This file was deleted.

25 changes: 0 additions & 25 deletions web/app/index.html

This file was deleted.

11 changes: 0 additions & 11 deletions web/app/initializers/inflector.js

This file was deleted.

Empty file removed web/app/models/.gitkeep
Empty file.
12 changes: 0 additions & 12 deletions web/app/models/group.js

This file was deleted.

7 changes: 0 additions & 7 deletions web/app/models/metric.js

This file was deleted.

Loading

0 comments on commit 7a149fd

Please sign in to comment.