Skip to content

Commit

Permalink
Add build user
Browse files Browse the repository at this point in the history
  • Loading branch information
dgl committed Oct 28, 2019
1 parent 4ffdc1b commit c8472d2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
docker_layer_caching: true
- run:
name: Docker build
command: docker build -t g-research/geras:$CIRCLE_BRANCH --build-arg GIT_REVISION="$CIRCLE_SHA1" --build-arg GIT_BRANCH="$CIRCLE_BRANCH" .
command: docker build -t g-research/geras:$CIRCLE_BRANCH --build-arg GIT_REVISION="$CIRCLE_SHA1" --build-arg GIT_BRANCH="$CIRCLE_BRANCH" --build-arg BUILD_USER="circleci" .

- run:
name: Docker run without flags
Expand Down
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ RUN go get github.com/grpc-ecosystem/grpc-health-probe@${GRPC_HEALTH_PROBE_VERSI
# docker build --build-arg GIT_REVISION="$(git rev-parse HEAD)" \
# --build-arg GIT_BRANCH="$(git rev-parse --abbrev-ref HEAD)" .
ARG GERAS_VERSION="development"
ARG BUILD_USER="docker"
ARG GIT_REVISION="unknown"
ARG GIT_BRANCH="unknown"

Expand All @@ -18,6 +19,7 @@ RUN go install -mod=vendor -ldflags '-extldflags "-static" \
-X github.com/prometheus/common/version.Version='"${GERAS_VERSION}"' \
-X github.com/prometheus/common/version.Revision='"${GIT_REVISION}"' \
-X github.com/prometheus/common/version.Branch='"${GIT_BRANCH}"' \
-X github.com/prometheus/common/version.BuildUser='"${BUILD_USER}"' \
-X github.com/prometheus/common/version.BuildDate='"$(date +%Y%m%d-%H:%M:%S)" \
./cmd/geras

Expand Down

0 comments on commit c8472d2

Please sign in to comment.