-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a96a9ae
commit 8ebbb74
Showing
24 changed files
with
282 additions
and
265 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.history | ||
.vagrant | ||
.vscode | ||
vendor* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
.history | ||
.vagrant | ||
.vscode | ||
vendor* | ||
debug.test | ||
vendor* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
linters: | ||
enable: | ||
- dupl | ||
- gocyclo | ||
- maligned | ||
- misspell | ||
- lll | ||
- unparam | ||
|
||
linters-settings: | ||
errcheck: | ||
check-type-assertions: true | ||
check-blank: true | ||
lll: | ||
line-length: 90 | ||
unparam: | ||
algo: rta |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
project_name: go-apigateway | ||
|
||
builds: | ||
- main: ./main/ | ||
env: | ||
- CGO_ENABLED=0 | ||
goos: | ||
- linux | ||
- windows | ||
|
||
archive: | ||
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}" | ||
format: binary | ||
|
||
sign: | ||
artifacts: none | ||
|
||
release: | ||
github: | ||
owner: TerrexTech | ||
name: go-apigateway | ||
|
||
changelog: | ||
sort: asc | ||
filters: | ||
exclude: | ||
- '^bors:' | ||
- '^docs:' | ||
- typo | ||
|
||
dockers: | ||
- image: terrextech/go-apigateway | ||
binary: go-apigateway | ||
dockerfile: Dockerfile_ci | ||
goos: linux | ||
goarch: amd64 | ||
tag_templates: | ||
- "{{ .Tag }}" | ||
- latest | ||
extra_files: | ||
- .env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
dist: trusty | ||
|
||
services: | ||
- docker | ||
|
||
language: go | ||
|
||
go: | ||
- "1.11" | ||
|
||
# Only clone the most recent commit | ||
git: | ||
depth: 1 | ||
|
||
branches: | ||
except: | ||
- staging.tmp | ||
|
||
env: | ||
global: | ||
- DEP_VERSION="0.5.0" | ||
- DOCKER_COMPOSE_VERSION=1.22.0 | ||
|
||
addons: | ||
apt: | ||
packages: | ||
- docker-ce | ||
|
||
before_install: | ||
# Download dep binary to $GOPATH/bin | ||
- curl -L -s https://github.com/golang/dep/releases/download/v${DEP_VERSION}/dep-linux-amd64 -o $GOPATH/bin/dep | ||
- chmod +x $GOPATH/bin/dep | ||
|
||
# Docker-Compose | ||
- sudo rm /usr/local/bin/docker-compose | ||
- curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname | ||
-s`-`uname -m` > docker-compose | ||
- chmod +x docker-compose | ||
- sudo mv docker-compose /usr/local/bin | ||
|
||
install: | ||
# Only install local deps if its a tagged-commit | ||
- if [[ ! -z ${TRAVIS_TAG} ]]; then dep ensure; fi | ||
|
||
before_script: | ||
- chmod +x ./run_test.sh | ||
|
||
script: | ||
- ./run_test.sh | ||
|
||
# after_script: | ||
# - docker-compose -f ./test/docker-compose.yaml down --volumes --rmi all | ||
|
||
after_success: | ||
- test -n "$TRAVIS_TAG" | ||
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin | ||
|
||
deploy: | ||
- provider: script | ||
skip_cleanup: true | ||
script: curl -sL https://git.io/goreleaser | bash -s -- --debug --skip-validate | ||
on: | ||
all_branches: true | ||
tags: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Dockerfile used by GoReleaser | ||
FROM scratch | ||
LABEL maintainer="Jaskaranbir Dhillon" | ||
|
||
COPY /go-apigateway ./ | ||
ENTRYPOINT ["./go-apigateway"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Dockerfile used to build the image in which the tests are run against | ||
# the image where compiled binary is running. | ||
FROM golang:1.11.0-alpine3.8 | ||
LABEL maintainer="Jaskaranbir Dhillon" | ||
|
||
ARG SOURCE_REPO | ||
|
||
ENV DEP_VERSION=0.5.0 | ||
|
||
# Download and install dep and git | ||
ADD https://github.com/golang/dep/releases/download/v${DEP_VERSION}/dep-linux-amd64 /usr/bin/dep | ||
RUN chmod +x /usr/bin/dep | ||
RUN apk add --update git | ||
|
||
WORKDIR $GOPATH/src/github.com/TerrexTech/${SOURCE_REPO} | ||
|
||
# Copy the code from the host and compile it | ||
COPY Gopkg.toml Gopkg.lock ./ | ||
RUN dep ensure --vendor-only -v | ||
|
||
COPY . ./ | ||
|
||
ENTRYPOINT go test -v ./... |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
status = [ "continuous-integration/travis-ci/push" ] | ||
delete_merged_branches = true | ||
[committer] | ||
name = "Ninja Bruh" | ||
email = "terrextech.ninjabruh@gmail.com" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
package gwerrors | ||
|
||
// InternalError represents an error when something goes wrong, and its our fault. | ||
const InternalError = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.