-
Notifications
You must be signed in to change notification settings - Fork 27
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
Showing
483 changed files
with
231,531 additions
and
177 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,5 @@ | ||
.dockerignore | ||
Dockerfile | ||
.git | ||
.hg | ||
.svn |
Large diffs are not rendered by default.
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,12 @@ | ||
language: go | ||
install: true | ||
sudo: required | ||
go: | ||
- 1.7 | ||
- 1.8 | ||
- 1.9 | ||
- master | ||
script: | ||
- ./test.sh | ||
after_success: | ||
- bash <(curl -s https://codecov.io/bash) |
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,20 @@ | ||
# build stage | ||
FROM golang:1.8-alpine3.6 AS build-env | ||
ADD . /src/github.com/ringtail/lucas | ||
ENV GOPATH /:/src/github.com/ringtail/lucas/vendor | ||
WORKDIR /src/github.com/ringtail/lucas | ||
RUN go build -o app | ||
|
||
|
||
# test stage | ||
#FROM golang:1.8-alpine3.6 | ||
#WORKDIR /src/github.com/ringtail/lucas | ||
#RUN go test | ||
|
||
|
||
# release stage | ||
FROM alpine | ||
WORKDIR /app | ||
EXPOSE 8080 | ||
COPY --from=build-env /src/github.com/ringtail/lucas/app /app/ | ||
CMD ["./app","run"] |
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,52 @@ | ||
pipeline { | ||
environment { | ||
REGISTRY_ENDPOINT = "https://registry.cn-hangzhou.aliyuncs.com/v2/" | ||
IMAGE_WITH_TAG = "registry.cn-hangzhou.aliyuncs.com/ringtail/lucas:0.0.1" | ||
REGISTRY_CERTS = "registry" | ||
} | ||
agent { | ||
node { | ||
label 'golang' | ||
} | ||
|
||
} | ||
stages { | ||
stage('Build') { | ||
steps { | ||
sh 'go build -o app' | ||
} | ||
} | ||
stage('Test') { | ||
steps { | ||
sh 'go test' | ||
} | ||
} | ||
stage('Code Quality') { | ||
steps { | ||
script { | ||
try{ | ||
checkstyle canComputeNew: false, defaultEncoding: '', healthy: '', pattern: '', unHealthy: '' | ||
}catch(e){ | ||
echo e | ||
} | ||
} | ||
|
||
} | ||
} | ||
stage('Image Build&Publish') { | ||
steps { | ||
echo 'Build Images' | ||
script { | ||
docker.withRegistry("${REGISTRY_ENDPOINT}", "${REGISTRY_CERTS}") { | ||
sh 'docker build -t ${IMAGE_WITH_TAG} .' | ||
sh 'docker push ${IMAGE_WITH_TAG}' | ||
} | ||
} | ||
|
||
} | ||
} | ||
} | ||
triggers { | ||
pollSCM('* * * * *') | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
{"platform": "Golang", "rigging_name": "GolangRigging", "config_file": "/Users/zhongweilzw/go/src/github.com/ringtail/lucas/derrick_conf"} |
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,9 @@ | ||
version: "2" | ||
services: | ||
web: | ||
build: | ||
context: . | ||
image: registry.cn-hangzhou.aliyuncs.com/ringtail/lucas:0.0.1 | ||
ports: | ||
- 8080 | ||
restart: always |
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 +1,41 @@ | ||
.main-container { | ||
padding:16px; | ||
} | ||
.container-title { | ||
margin:0 auto; | ||
text-align: center; | ||
font-size: 24px; | ||
} | ||
.item-key { | ||
display: inline-block; | ||
border: 1px solid #ccc; | ||
padding: 5px 10px; | ||
text-decoration: none; | ||
color: #666; | ||
font-family: arial, verdana, tahoma; | ||
font-size: 11px; | ||
border-radius: 5px; | ||
pointer: cursor; | ||
} | ||
|
||
.item-key.has-key { | ||
background-color: green; | ||
color: white; | ||
} | ||
|
||
.item-key:hover { | ||
background-color: #428bca; | ||
text-decoration: none; | ||
} | ||
|
||
.item-value { | ||
display: inline-block; | ||
} | ||
|
||
.data-viewer { | ||
border: 1px solid #cccccc; | ||
border-radius: 5px; | ||
min-height: 500px; | ||
overflow: auto; | ||
width:95%; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
annotations: | ||
derrick.service.type: nodeport | ||
derrick.version: 0.0.14 | ||
labels: | ||
derrick.service: lucas | ||
name: lucas | ||
spec: | ||
ports: | ||
- name: "8080" | ||
port: 8080 | ||
targetPort: 8080 | ||
selector: | ||
derrick.service: lucas | ||
type: NodePort | ||
--- | ||
apiVersion: extensions/v1beta1 | ||
kind: Deployment | ||
metadata: | ||
annotations: | ||
derrick.version: 0.0.14 | ||
labels: | ||
derrick.service: lucas | ||
name: lucas | ||
spec: | ||
replicas: 1 | ||
template: | ||
metadata: | ||
labels: | ||
derrick.service: lucas | ||
spec: | ||
containers: | ||
- image: registry.cn-hangzhou.aliyuncs.com/ringtail/lucas:0.0.1 | ||
name: web | ||
ports: | ||
- containerPort: 8080 |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
echo "" > coverage.txt | ||
|
||
for d in $(go list ./... | grep -v vendor); do | ||
go test -race -coverprofile=profile.out -covermode=atomic $d | ||
if [ -f profile.out ]; then | ||
cat profile.out >> coverage.txt | ||
rm profile.out | ||
fi | ||
done |
Oops, something went wrong.