File tree Expand file tree Collapse file tree 7 files changed +33
-29
lines changed Expand file tree Collapse file tree 7 files changed +33
-29
lines changed Original file line number Diff line number Diff line change @@ -13,13 +13,17 @@ jobs:
1313 name : Sync dependencies
1414 command : |
1515 go get -u github.com/kardianos/govendor
16+ go get -u golang.org/x/tools/cmd/cover
17+ go get -u github.com/mattn/goveralls
1618 govendor sync -v
1719
1820 - run :
1921 name : Run tests
2022 command : |
2123 cd /go/src/jancajthaml/src/datadog-mock
22- go test -v ./...
24+ : > /go/src/jancajthaml/coverage.txt
25+ go test -v -cover -race -coverprofile=/go/src/jancajthaml/coverage.txt -covermode=atomic ./...
26+ goveralls -coverprofile=/go/src/jancajthaml/coverage.txt -service=circle-ci -repotoken=$COVERALLS_TOKEN
2327
2428 - run :
2529 name : Build server
@@ -43,19 +47,18 @@ jobs:
4347 at : /go/src/github.com/jancajthaml
4448
4549 - checkout
46-
4750 - setup_remote_docker
4851
4952 - run :
5053 name : Build application Docker image
5154 command : |
5255 cp -r /go/src/github.com/jancajthaml/target /app/target
53- docker build -t bundle .
54-
55- - run :
56- name : List images
57- command : |
58- docker images
56+ docker build \
57+ --build-arg VERSION=$(cat VERSION) \
58+ --build-arg VCS_REF=${CIRCLE_SHA1} \
59+ --build-arg VCS_URL=$(git config --get remote.origin.url) \
60+ --build-arg BUILD_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ") \
61+ -t bundle .
5962
6063 - deploy :
6164 name : Push image to DockerHUB
Original file line number Diff line number Diff line change @@ -16,6 +16,18 @@ FROM scratch
1616
1717MAINTAINER Jan Cajthaml <
[email protected] >
1818
19+ ARG BUILD_DATE
20+ ARG VCS_REF
21+ ARG VERSION
22+ LABEL org.label-schema.build-date=$BUILD_DATE \
23+ org.label-schema.name="datadog-mock" \
24+ org.label-schema.description="DataDog mock service Edit" \
25+ org.label-schema.vcs-ref=$VCS_REF \
26+ org.label-schema.vcs-url="https://github.com/jancajthaml/datadog-mock" \
27+ org.label-schema.vendor="Jan Cajthaml" \
28+ org.label-schema.version=$VERSION \
29+ org.label-schema.schema-version="1.0"
30+
1931COPY target/datadog_mock /datadog_mock
2032
2133EXPOSE 8125/UDP
Original file line number Diff line number Diff line change 1- ### Step 1: Are you in the right place?
2-
3- * For issues or feature requests related to the code ** in this repository** file a Github issue.
4- * For general technical questions, post a question on [ StackOverflow] ( http://stackoverflow.com/ ) tagged appropriately.
5-
6- ### Step 2: Describe the problem:
7-
8- #### Steps to reproduce:
9-
10- 1 . _____
11- 2 . _____
12- 3 . _____
13-
141#### Observed Results:
152
163 * What happened? This could be a description, log output, etc.
Original file line number Diff line number Diff line change @@ -6,6 +6,13 @@ all: install test authors run
66.PHONY : install
77install : prepare-dev lint bundle
88
9+ .PHONY : clean
10+ clean :
11+ @docker images | \
12+ grep -i " ^datadog/dev" | \
13+ awk ' { print $$3 }' | \
14+ xargs -P$(CORES ) -I{} docker rmi -f {} 2> /dev/null || :
15+
916.PHONY : perf
1017perf :
1118 @./dev/siege.sh
1623
1724.PHONY : sync
1825sync :
19- docker-compose run --rm fetch
2026 docker-compose run --rm sync
2127
2228.PHONY : lint
Original file line number Diff line number Diff line change 22
33datadog-mock is a golang statsd mock server listening on port 8125 and relaying events to stdout.
44
5- [ ![ Build Status] ( https://circleci.com/gh/jancajthaml/datadog-mock.svg?style=svg )] ( https://circleci.com/gh/jancajthaml/datadog-mock ) [ ![ Static Analysis] ( https://api.codacy.com/project/badge/Grade/c5c255a292f84cf88972f92f74f9174d )] ( https://www.codacy.com/app/jan-cajthaml/datadog-mock?utm_source=github.com& ; utm_medium=referral& ; utm_content=jancajthaml/datadog-mock& ; utm_campaign=Badge_Grade ) [ ![ Test Coverage] ( https://coveralls.io/repos/github/jancajthaml/datadog-mock/badge.svg?branch=master )] ( https://coveralls.io/github/jancajthaml/datadog-mock?branch=master )
5+ [ ![ Docker Version] ( https://images.microbadger.com/badges/version/jancajthaml/datadog_mock.svg )] ( https://microbadger.com/images/jancajthaml/datadog_mock )
6+ [ ![ Build Status] ( https://circleci.com/gh/jancajthaml/datadog-mock.svg?style=shield )] ( https://circleci.com/gh/jancajthaml/datadog-mock ) [ ![ Static Analysis] ( https://api.codacy.com/project/badge/Grade/c5c255a292f84cf88972f92f74f9174d )] ( https://www.codacy.com/app/jan-cajthaml/datadog-mock?utm_source=github.com& ; utm_medium=referral& ; utm_content=jancajthaml/datadog-mock& ; utm_campaign=Badge_Grade ) [ ![ Test Coverage] ( https://coveralls.io/repos/github/jancajthaml/datadog-mock/badge.svg?branch=master )] ( https://coveralls.io/github/jancajthaml/datadog-mock?branch=master )
67
78## Getting started ##
89
Original file line number Diff line number Diff line change 1+ 1.0.0
Original file line number Diff line number Diff line change @@ -25,12 +25,6 @@ services:
2525 entrypoint : govendor
2626 command : ["sync", "-v"]
2727
28- fetch :
29- extends : dev
30- image : datadog/dev:fetch
31- entrypoint : govendor
32- command : ["fetch", "github.com/ScottMansfield/nanolog"]
33-
3428 fmt :
3529 extends : dev
3630 image : datadog/dev:fmt
You can’t perform that action at this time.
0 commit comments