Skip to content

Commit

Permalink
Consolidate new naming structure
Browse files Browse the repository at this point in the history
  • Loading branch information
lucperkins committed May 27, 2018
1 parent 4a4c823 commit 121eef6
Show file tree
Hide file tree
Showing 385 changed files with 208,133 additions and 16 deletions.
6 changes: 0 additions & 6 deletions BUILD

This file was deleted.

39 changes: 39 additions & 0 deletions BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
package(default_visibility = ["//visibility:public"])

load("@io_bazel_rules_go//go:def.bzl", "gazelle", "go_path", "go_prefix")
load("@bazel_gazelle//:def.bzl", "gazelle")
load("@io_bazel_rules_docker//go:image.bzl", "go_image")
load("@io_bazel_rules_docker//docker:docker.bzl", "docker_push")
load("@io_bazel_rules_docker//java:image.bzl", "java_image")

go_prefix("github.com/lucperkins/colossus")

gazelle(
name = "gazelle",
command = "fix",
external = "vendored",
)

go_path(
name = "all_srcs",
mode = "link",
deps = [
"//proto/auth:auth_go_proto",
],
)

go_image(
name = "colossus-web",
binary = "//web:web_docker",
)

go_image(
name = "colossus-auth",
binary = "//auth:auth_docker",
)

java_image(
name = "colossus-data",
main_class = "colossus.DataHandler",
runtime_deps = ["//data:data_java_lib"],
)
125 changes: 124 additions & 1 deletion Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,15 @@
[prune]
go-tests = true
unused-packages = true

[[constraint]]
name = "github.com/spf13/cobra"
version = "0.0.2"

[[constraint]]
name = "github.com/go-chi/chi"
version = "3.3.2"

[[constraint]]
name = "github.com/go-redis/redis"
version = "6.11.0"
53 changes: 49 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,52 @@
BAZEL = bazel
BAZEL = /usr/local/bin/bazel
KCTL = kubectl

all: gazelle
clean:
$(BAZEL) clean

.PHONY: build
build: clean gazelle
$(BAZEL) build //...

gazelle:
$(BAZEL) run //:gazelle
gazelle-repos:
$(BAZEL) run //:gazelle -- update-repos -from_file=Gopkg.lock

gazelle: gazelle-repos
$(BAZEL) run //:gazelle

dev: gazelle build

docker-registry:
docker run -d -p 5000:5000 --restart=always --name registry registry:2

minikube-start:
minikube start --insecure-registry localhost:5000

minikube-setup:
eval $(minikube docker-env)
minikube addons enable ingress

run-cli: gazelle
$(BAZEL) run //cli -- foo bar baz

run-web: gazelle
$(BAZEL) run //web

run-auth: gazelle
$(BAZEL) run //auth

docker-local-push:
$(BAZEL) run //:colossus-web -- --norun
$(BAZEL) run //:colossus-auth -- --norun
$(BAZEL) run //:colossus-data -- --norun

deploy: docker-local-push
$(KCTL) apply -f k8s/web.yaml

teardown:
$(KCTL) delete svc,deployment,ing --all

restart: teardown deploy

busybox-run:
$(KCTL) run curl --image=radial/busyboxplus:curl -i --tty
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Grip

Coming soon.
Loading

0 comments on commit 121eef6

Please sign in to comment.