Skip to content
This repository has been archived by the owner on Jan 17, 2022. It is now read-only.

Commit

Permalink
Add coverage badge, circleci badge, go report card and runbook updated
Browse files Browse the repository at this point in the history
  • Loading branch information
gkazakov111 committed May 15, 2020
1 parent d01c3ed commit d394bd2
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 9 deletions.
1 change: 0 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,3 @@ workflows:
- ft-golang-ci/scan:
name: scan-dependencies
context: cm-team-snyk

17 changes: 10 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,21 @@ RUN VERSION="version=$(git describe --tag --always 2> /dev/null)" \
&& BUILDER="builder=$(go version)" \
&& LDFLAGS="-s -w -X '"${BUILDINFO_PACKAGE}$VERSION"' -X '"${BUILDINFO_PACKAGE}$DATETIME"' -X '"${BUILDINFO_PACKAGE}$REPOSITORY"' -X '"${BUILDINFO_PACKAGE}$REVISION"' -X '"${BUILDINFO_PACKAGE}$BUILDER"'" \
&& CGO_ENABLED=0 go build -mod=readonly -a -o /artifacts/${PROJECT} -ldflags="${LDFLAGS}" \
&& echo "Build flags: ${LDFLAGS}"
&& echo "Build flags: ${LDFLAGS}" \
&& mv attributes.template /attributes.template \
&& mv systemAttributes.template /systemAttributes.template \
&& mv usageTickets.template /usageTickets.template

# Multi-stage build - copy certs and the binary into the image
FROM scratch
FROM alpine
WORKDIR /
COPY --from=0 /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=0 /artifacts/* /
COPY --from=0 /root/.kube/config /root/.kube/config
COPY --from=0 /usr/local/bin/kubectl /
COPY --from=0 /start.sh /
COPY --from=0 /root/.kube/config /

CMD [ "/coco-synthetic-image-publication-monitor" ]

COPY --from=0 /attributes.template /
COPY --from=0 /systemAttributes.template /
COPY --from=0 /usageTickets.template /

ENV AWS_ADDRESS s3.amazonaws.com
ENV BUCKET_ADDRESS com.ft.imagepublish.int
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# synthetic-publication

[![Coverage Status](https://coveralls.io/repos/github/Financial-Times/coco-synthetic-image-publication-monitor/badge.svg?branch=master)](https://coveralls.io/github/Financial-Times/coco-synthetic-image-publication-monitor?branch=master)
[![CircleCI](https://circleci.com/gh/Financial-Times/coco-synthetic-image-publication-monitor/tree/master.svg?style=svg)](https://circleci.com/gh/Financial-Times/coco-synthetic-image-publication-monitor/tree/master)
[![Go Report Card](https://goreportcard.com/badge/github.com/Financial-Times/coco-synthetic-image-publication-monitor)](https://goreportcard.com/report/github.com/Financial-Times/coco-synthetic-image-publication-monitor)

Performs test image publications and monitors for problem.

This service periodically hits the current stack's cms-notifier with a random image, which then is picked up by the kafka-bridge and forwarded to the containerised stack's cms-notifier. The image is then stored in a specific S3 bucket. The service after a given waiting time tests whether the content in S3 matches the published image.
Expand Down
3 changes: 2 additions & 1 deletion synth-publish.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ func main() {
}
http.HandleFunc("/__health", fthealth.Handler(timedHC))
http.HandleFunc(httphandlers.GTGPath, httphandlers.NewGoodToGoHandler(gtg.StatusChecker(app.GTG)))
http.HandleFunc(httphandlers.BuildInfoPath, httphandlers.BuildInfoHandler)
http.HandleFunc("/history", app.historyHandler)
http.HandleFunc("/forcePublish", app.forcePublish)
err := http.ListenAndServe(":8080", nil)
Expand Down Expand Up @@ -121,7 +122,7 @@ func (app *syntheticPublication) healthcheck() fthealth.Check {
return fthealth.Check{
BusinessImpact: "Image publication doesn't work",
Name: "End-to-end test of image publication",
PanicGuide: "Contact #co-co channel on Slack",
PanicGuide: "https://runbooks.in.ft.com/synth-image-pub-monitor",
Severity: 1,
TechnicalSummary: "Lots of things could have gone wrong. Check the /history endpoint for more info",
Checker: app.latestPublicationStatus,
Expand Down

0 comments on commit d394bd2

Please sign in to comment.