Skip to content
This repository has been archived by the owner on May 6, 2021. It is now read-only.

Implement #17 Fetch public keys from auth service #23

Merged
merged 16 commits into from
Oct 16, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add communication with Auth support
  • Loading branch information
chmouel committed Oct 16, 2018
commit 115a867fc78f3976d9514a6c1515d575b2886e06
93 changes: 75 additions & 18 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,26 +1,83 @@
# Binaries for programs and plugins
*.exe
*.exe~
*.dll
### Intellij ###
.idea/
*.iws
*.iml
/out/
.idea_modules/
atlassian-ide-plugin.xml

### Eclipse ###
.metadata
tmp/
*.tmp
*.bak
*.swp
*~.nib
local.properties
.settings/
.loadpath
.recommenders

# Eclipse Core
.project

# External tool builders
.externalToolBuilders/

# Locally stored "Eclipse launch configurations"
*.launch

# Code Recommenders
.recommenders/


### VisualStudioCode ###
.vscode

### Go ###
# Compiled Object files, Static and Dynamic libs (Shared Objects)
*.o
*.a
*.so
*.dylib
bin

# Test binary, build with `go test -c`
*.test
# Folders
_obj
_test

# Architecture specific extensions/prefixes
*.[568vq]
[568vq].out

*.cgo1.go
*.cgo2.c
_cgo_defun.c
_cgo_gotypes.go
_cgo_export.*

# Output of the go coverage tool, specifically when used with LiteIDE
*.out
_testmain.go

*.exe
*.test
*.prof

# vendored deps are not kept in git
vendor
# Auth specific artifacts
/debug
**/debug.test

# generate goa code
app
swagger
# Auth binaries
bin/

# tmp dir
tmp
# Glide package manager
.glide
vendor/

# Generate assets
# Generated assets
app/
assets/js/
bindata_assetfs.go
client/
swagger/
tool/
migration/sqlbindata.go
environment/generated/
auth/client
95 changes: 81 additions & 14 deletions Gopkg.lock

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

11 changes: 11 additions & 0 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ required = [
"github.com/goadesign/goa/encoding/form",
"github.com/goadesign/goa/goagen",
"github.com/goadesign/goa/goagen/codegen",
"github.com/fabric8-services/fabric8-auth/design",
"github.com/goadesign/goa/goagen/gen_app",
"github.com/goadesign/goa/goagen/gen_controller",
"github.com/goadesign/goa/goagen/gen_swagger",
Expand All @@ -48,6 +49,7 @@ required = [

ignored = [
"github.com/fabric8-services/fabric8-build-service/app",
"github.com/fabric8-services/fabric8-tenant/auth/client",
]

[prune]
Expand All @@ -57,3 +59,12 @@ ignored = [
[[constraint]]
name = "github.com/stretchr/testify"
version = "1.2.1"

[[constraint]]
name = "github.com/fabric8-services/fabric8-common"
source = "https://github.com/fabric8-services/fabric8-common.git"
branch = "master"

[[constraint]]
name = "github.com/fabric8-services/fabric8-auth"
revision = "19eb16aaf10758299c4a5360600af983b8470909"
18 changes: 14 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ DESIGNS := $(shell find $(SOURCE_DIR)/$(DESIGN_DIR) -path $(SOURCE_DIR)/vendor -
ALL_PKGS_EXCLUDE_PATTERN = 'vendor\|app\|tool\/cli\|design\|client\|test'
LDFLAGS=-ldflags "-X ${PACKAGE_NAME}/app.Commit=${COMMIT} -X ${PACKAGE_NAME}/app.BuildTime=${BUILD_TIME}"

# Postgres Container
POSTGRES_CONTAINER_NAME = db-build
POSTGRES_CONTAINER_PORT = 5433

# By default reduce the amount of log output from tests
F8_LOG_LEVEL ?= error

Expand Down Expand Up @@ -81,6 +85,7 @@ test-unit: prebuild-check docker-run-local-postgres $(SOURCES) ## Runs the unit
$(call log-info,"Running test: $@")
$(eval TEST_PACKAGES:=$(shell go list ./... | grep -v $(ALL_PKGS_EXCLUDE_PATTERN)))
sleep 5 # just so we get the postgres docker starting
F8_POSTGRES_PORT="$(POSTGRES_CONTAINER_PORT)" \
F8_RESOURCE_UNIT_TEST=1 F8_RESOURCE_DATABASE=1 F8_DEVELOPER_MODE_ENABLED=1 \
F8_LOG_LEVEL=$(F8_LOG_LEVEL) go test $(GO_TEST_VERBOSITY_FLAG) $(TEST_PACKAGES)

Expand All @@ -89,6 +94,7 @@ coverage: prebuild-check deps $(SOURCES) ## Run coverage
$(call log-info,"Running coverage: $@")
$(eval TEST_PACKAGES:=$(shell go list ./... | grep -v $(ALL_PKGS_EXCLUDE_PATTERN)))
@cd $(VENDOR_DIR)/github.com/haya14busa/goverage && go build
F8_POSTGRES_PORT=$(POSTGRES_CONTAINER_PORT) && \
F8_RESOURCE_UNIT_TEST=1 F8_DEVELOPER_MODE_ENABLED=1 \
F8_RESOURCE_UNIT_TEST=1 F8_LOG_LEVEL=$(F8_LOG_LEVEL) F8_RESOURCE_DATABASE=1 \
./vendor/github.com/haya14busa/goverage/goverage -v -coverprofile=tmp/coverage.out $(TEST_PACKAGES)
Expand Down Expand Up @@ -237,6 +243,7 @@ clean-generated:
-rm -rf ./app
-rm -rf ./swagger/
-rm -f ./migration/sqlbindata.go
-rm -rf ./auth/client

CLEAN_TARGETS += clean-vendor
.PHONY: clean-vendor
Expand Down Expand Up @@ -301,9 +308,12 @@ regenerate: clean-generated generate ## Runs the "clean-generated" and the "gene
# -------------------------------------------------------------------
.PHONE: docker-run-local-postgres
docker-run-local-postgres: docker-clean-postgres
@[[ "$(docker ps -q --filter "name=postgres")xxx" == xxx ]] && \
docker run --name postgres -e POSTGRESQL_ADMIN_PASSWORD=`sed -n '/postgres.password/ { s/.*: //;p ;}' config.yaml` \
-d -p 5432:5432 registry.centos.org/postgresql/postgresql:9.6 >/dev/null
$(info >>--- Starting container $(POSTGRES_CONTAINER_NAME) ---<<)
@[[ "$(docker ps -q --filter "name=$(POSTGRES_CONTAINER_NAME)")xxx" == xxx ]] && \
docker run --name $(POSTGRES_CONTAINER_NAME) -e POSTGRESQL_ADMIN_PASSWORD=`sed -n '/postgres.password/ { s/.*: //;p ;}' config.yaml` \
-d -p $(POSTGRES_CONTAINER_PORT):5432 registry.centos.org/postgresql/postgresql:9.6 >/dev/null

docker-clean-postgres:
@docker rm -f postgres 2>/dev/null || true
$(info >>--- Stopping container $(POSTGRES_CONTAINER_NAME) ---<<)
@docker stop $(POSTGRES_CONTAINER_NAME) 2>/dev/null || true
@docker rm -f $(POSTGRES_CONTAINER_NAME) 2>/dev/null || true
Loading