-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from Financial-Times/feature/pac-categories
Added annotations-curation category for PAC + dep
- Loading branch information
Showing
10 changed files
with
539 additions
and
542 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
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,5 +1,5 @@ | ||
/upp-aggregate-healthcheck | ||
vendor/*/ | ||
vendor/ | ||
*.idea | ||
*.exe | ||
/.project | ||
|
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,23 +1,34 @@ | ||
FROM golang:1.7-alpine3.5 | ||
FROM golang:1.9-alpine | ||
|
||
RUN mkdir -p /upp-aggregate-healthcheck | ||
|
||
ADD . "$GOPATH/src/upp-aggregate-healthcheck" | ||
ENV PROJECT=upp-aggregate-healthcheck | ||
COPY . /${PROJECT}-sources/ | ||
|
||
RUN apk --no-cache --virtual .build-dependencies add git \ | ||
&& cd $GOPATH/src/upp-aggregate-healthcheck \ | ||
&& go get -u github.com/kardianos/govendor \ | ||
&& $GOPATH/bin/govendor sync \ | ||
&& go-wrapper download \ | ||
&& go-wrapper install \ | ||
&& ls -la $GOPATH \ | ||
&& cp -R resources /upp-aggregate-healthcheck/ \ | ||
&& cp -R html-templates /upp-aggregate-healthcheck/ \ | ||
&& ORG_PATH="github.com/Financial-Times" \ | ||
&& REPO_PATH="Financial-Times/${PROJECT}" \ | ||
&& mkdir -p $GOPATH/src/Financial-Times \ | ||
# Linking the project sources in the GOPATH folder | ||
&& ln -s /${PROJECT}-sources $GOPATH/src/${REPO_PATH} \ | ||
&& cd $GOPATH/src/${REPO_PATH} \ | ||
&& BUILDINFO_PACKAGE="Financial-Times/${PROJECT}/vendor/Financial-Times/service-status-go/buildinfo." \ | ||
&& VERSION="version=$(git describe --tag --always 2> /dev/null)" \ | ||
&& DATETIME="dateTime=$(date -u +%Y%m%d%H%M%S)" \ | ||
&& REPOSITORY="repository=$(git config --get remote.origin.url)" \ | ||
&& REVISION="revision=$(git rev-parse HEAD)" \ | ||
&& BUILDER="builder=$(go version)" \ | ||
&& LDFLAGS="-X '"${BUILDINFO_PACKAGE}$VERSION"' -X '"${BUILDINFO_PACKAGE}$DATETIME"' -X '"${BUILDINFO_PACKAGE}$REPOSITORY"' -X '"${BUILDINFO_PACKAGE}$REVISION"' -X '"${BUILDINFO_PACKAGE}$BUILDER"'" \ | ||
&& echo "Build flags: $LDFLAGS" \ | ||
&& echo "Fetching dependencies..." \ | ||
&& go get -u github.com/golang/dep/cmd/dep \ | ||
&& $GOPATH/bin/dep ensure \ | ||
&& go build -ldflags="${LDFLAGS}" \ | ||
&& mv ${PROJECT} /${PROJECT} \ | ||
&& mv /${PROJECT}-sources/resources /resources \ | ||
&& mv /${PROJECT}-sources/html-templates /html-templates \ | ||
&& rm -r /${PROJECT}-sources \ | ||
&& apk del .build-dependencies \ | ||
&& rm -rf $GOPATH/src $GOPATH/pkg | ||
|
||
WORKDIR /upp-aggregate-healthcheck | ||
&& rm -rf $GOPATH /var/cache/apk/* | ||
|
||
EXPOSE 8080 | ||
WORKDIR / | ||
|
||
CMD ["go-wrapper", "run"] | ||
CMD [ "/upp-aggregate-healthcheck" ] |
Oops, something went wrong.