no message

This commit is contained in:
Roee Gadot
2021-07-15 14:09:27 +03:00
parent 6b7cb16a9f
commit f839212b30
3 changed files with 15 additions and 8 deletions

View File

@@ -60,9 +60,11 @@ jobs:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
env:
SEM_VER: ${{ steps.versioning.outputs.version }}
BUILD_TIMESTAMP: ${{ steps.version_parameters.outputs.build_timestamp }}
build-args: |
SEM_VER=${{ steps.versioning.outputs.version }}
BUILD_TIMESTAMP=${{ steps.version_parameters.outputs.build_timestamp }}
GIT_BRANCH=${{ steps.version_parameters.outputs.branch }}
COMMIT_HASH=${{ github.sha }}
# - name: Build and Push CLI
# run: make push-cli SEM_VER='${{ steps.versioning.outputs.version }}' BUILD_TIMESTAMP='${{ steps.version_parameters.outputs.build_timestamp }}'
# - name: publish

View File

@@ -23,15 +23,20 @@ RUN go mod download
# cheap trick to make the build faster (As long as go.mod wasn't changes)
RUN go list -f '{{.Path}}@{{.Version}}' -m all | sed 1d | grep -e 'go-cache' -e 'sqlite' | xargs go get
ARG COMMIT_HASH
ARG GIT_BRANCH
ARG BUILD_TIMESTAMP
ARG SEM_VER
# Copy and build api code
COPY shared ../shared
COPY tap ../tap
COPY api .
RUN go build -ldflags="-s -w \
-X 'mizuserver/version.GitCommitHash=$(COMMIT_HASH)' \
-X 'mizuserver/version.Branch=$(GIT_BRANCH)' \
-X 'mizuserver/version.BuildTimestamp=$(BUILD_TIMESTAMP)' \
-X 'mizuserver/version.SemVer=$(SEM_VER)'" -o mizuagent .
-X 'mizuserver/version.GitCommitHash=${COMMIT_HASH}' \
-X 'mizuserver/version.Branch=${GIT_BRANCH}' \
-X 'mizuserver/version.BuildTimestamp=${BUILD_TIMESTAMP}' \
-X 'mizuserver/version.SemVer=${SEM_VER}'" -o mizuagent .
FROM alpine:3.13.5

View File

@@ -28,7 +28,7 @@ var standalone = flag.Bool("standalone", false, "Run in standalone tapper and AP
var aggregatorAddress = flag.String("aggregator-address", "", "Address of mizu collector for tapping")
func main() {
rlog.Infof("Version parameters are: %s %s %s %s", version.Branch, version.SemVer, version.BuildTimestamp, version.BuildTimestamp)
rlog.Infof("Version parameters are: %s %s %s %s", version.Branch, version.SemVer, version.GitCommitHash, version.BuildTimestamp)
flag.Parse()
hostMode := os.Getenv(shared.HostModeEnvVar) == "1"