This repository has been archived by the owner on May 3, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
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 #2 from Financial-Times/unifyIdentifiers
Unify identifiers
- Loading branch information
Showing
13 changed files
with
233 additions
and
322 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 |
---|---|---|
@@ -1,18 +1,27 @@ | ||
FROM alpine:3.3 | ||
|
||
ADD . /locations-transformer/ | ||
|
||
ADD *.go .git /locations-transformer/ | ||
RUN apk add --update bash \ | ||
&& apk --update add git bzr \ | ||
&& apk --update add go \ | ||
&& apk --update add git go bzr \ | ||
&& cd locations-transformer \ | ||
&& git fetch origin 'refs/tags/*:refs/tags/*' \ | ||
&& BUILDINFO_PACKAGE="github.com/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"'" \ | ||
&& cd .. \ | ||
&& export GOPATH=/gopath \ | ||
&& REPO_PATH="github.com/Financial-Times/locations-transformer" \ | ||
&& mkdir -p $GOPATH/src/${REPO_PATH} \ | ||
&& cp -r locations-transformer/* $GOPATH/src/${REPO_PATH} \ | ||
&& cd $GOPATH/src/${REPO_PATH} \ | ||
&& go get -t ./... \ | ||
&& go build \ | ||
&& cd $GOPATH/src/${REPO_PATH} \ | ||
&& echo ${LDFLAGS} \ | ||
&& go build -ldflags="${LDFLAGS}" \ | ||
&& mv locations-transformer /app \ | ||
&& apk del go git bzr \ | ||
&& apk del go git bzr\ | ||
&& rm -rf $GOPATH /var/cache/apk/* | ||
CMD [ "/app" ] |
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
Oops, something went wrong.