From a98c39ad04ff04485e2d430ee476d87f50b92a9c Mon Sep 17 00:00:00 2001 From: vx3r <vx3r@127-0-0-1.fr> Date: Tue, 25 Feb 2020 16:19:00 +0900 Subject: [PATCH] add version in back and front #16 / client can ignore global PK #17 / #18 email is now optional --- .gitlab-ci.yml | 5 ++++- Dockerfile | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4865708..545e303 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,7 +7,7 @@ build-back: stage: build artifacts image: golang:latest script: - - GOOS=linux GOARCH=amd64 go build -o ${CI_PROJECT_NAME}-linux-amd64 + - GOOS=linux GOARCH=amd64 go build -ldflags "-X main.VersionGitCommit=${CI_COMMIT_SHORT_SHA}" -o ${CI_PROJECT_NAME}-linux-amd64 artifacts: paths: - ${CI_PROJECT_NAME}-linux-amd64 @@ -16,6 +16,9 @@ build-front: stage: build artifacts image: node:10-alpine script: + - apk update + - apk upgrade + - apk add --no-cache git - cd ./ui - npm install - npm run build diff --git a/Dockerfile b/Dockerfile index 18ffbdc..1ff6002 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,12 @@ FROM golang:alpine AS build-back WORKDIR /app +RUN apk update && apk upgrade && apk add --no-cache git COPY . . RUN GIT_COMMIT=$(git rev-parse --short HEAD) && go build -ldflags "-X main.VersionGitCommit=$GIT_COMMIT" go build -o wg-gen-web-linux FROM node:10-alpine AS build-front WORKDIR /app +RUN apk update && apk upgrade && apk add --no-cache git COPY ui/package*.json ./ RUN npm install COPY ui/ ./ -- GitLab