Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(*): update docker-go-dev and switch to using new linter #220

Merged
merged 1 commit into from
Aug 1, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
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
14 changes: 2 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ REPO_PATH := github.com/deis/${SHORT_NAME}

# The following variables describe the containerized development environment
# and other build options
DEV_ENV_IMAGE := quay.io/deis/go-dev:0.13.0
DEV_ENV_IMAGE := quay.io/deis/go-dev:0.16.0
DEV_ENV_WORK_DIR := /go/src/${REPO_PATH}
DEV_ENV_CMD := docker run --rm -v ${CURDIR}:${DEV_ENV_WORK_DIR} -w ${DEV_ENV_WORK_DIR} ${DEV_ENV_IMAGE}
DEV_ENV_CMD_INT := docker run -it --rm -v ${CURDIR}:${DEV_ENV_WORK_DIR} -w ${DEV_ENV_WORK_DIR} ${DEV_ENV_IMAGE}
Expand All @@ -36,12 +36,6 @@ SVC := manifests/deis-${SHORT_NAME}-service.yaml
dev: check-docker
${DEV_ENV_CMD_INT} bash

dev-registry: check-docker
@docker inspect registry >/dev/null 2>&1 && docker start registry || docker run --restart="always" -d -p 5000:5000 --name registry registry:0.9.1
@echo
@echo "To use a local registry for Deis development:"
@echo " export DEIS_REGISTRY=`docker-machine ip $$(docker-machine active 2>/dev/null) 2>/dev/null || echo $(HOST_IPADDR) `:5000/"

# Containerized dependency resolution
bootstrap: check-docker
${DEV_ENV_CMD} glide install
Expand Down Expand Up @@ -98,11 +92,7 @@ test-style: check-docker

# This should only be executed within the containerized development environment.
style-check:
# display output, then check
gofmt -l ${GO_FILES} ${GO_DIRS}
@gofmt -l ${GO_FILES} ${GO_DIRS} | read; if [ $$? == 0 ]; then echo "gofmt check failed."; exit 1; fi
go vet ${GO_PACKAGES}
for package in $$(glide novendor | tr " " "\n"); do golint $$package; done
lint
shellcheck $(SHELL_SCRIPTS)

test-unit:
Expand Down
8 changes: 3 additions & 5 deletions nginx/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ http {
`
)

// WriteCerts writes SSL certs to file from router configuration.
func WriteCerts(routerConfig *model.RouterConfig, sslPath string) error {
// Start by deleting all certs and their corresponding keys. This will ensure certs we no longer
// need are deleted. Certs that are still needed will simply be re-written.
Expand Down Expand Up @@ -272,13 +273,10 @@ func writeCert(context string, certificate *model.Certificate, sslPath string) e
if err != nil {
return err
}
err = ioutil.WriteFile(keyPath, []byte(certificate.Key), 0600)
if err != nil {
return err
}
return nil
return ioutil.WriteFile(keyPath, []byte(certificate.Key), 0600)
}

// WriteDHParam writes router DHParam to file from router configuration.
func WriteDHParam(routerConfig *model.RouterConfig, sslPath string) error {
dhParamPath := filepath.Join(sslPath, "dhparam.pem")
if routerConfig.SSLConfig.DHParam == "" {
Expand Down
2 changes: 1 addition & 1 deletion rootfs/bin/get_src_gpg
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ gpg --list-keys --fingerprint --with-colons |
gpg --import-ownertrust
curl -sSL "$url" -o "$f"
curl -sSL "$url.asc" -o "$f.asc"
gpg --verify $f.asc
gpg --verify "$f.asc"
tar xzf "$f"
rm "$f"