added version in docker to npm package.json

This commit is contained in:
Nico Hanus
2020-06-23 14:32:27 +02:00
committed by Michael Auer
parent 5d3a503d86
commit 6a34553c9f
2 changed files with 5 additions and 2 deletions

View File

@@ -1,9 +1,11 @@
#stage 1
FROM node:10-stretch as node
ARG IS_PRODUCTION=false
ARG SEMVERSION=1.0.0
WORKDIR /app
COPY . .
RUN umask 0022
RUN npm version ${SEMVERSION}
RUN npm install --always-auth=false
RUN if [ "${IS_PRODUCTION}" = "true" ] ; then npm run-script build-prod ; else npm run-script build ; fi

View File

@@ -36,6 +36,7 @@ jobs:
Dockerfile: Dockerfile
buildContext:
tags: '$(Build.BuildNumber)-$(Build.SourceVersion)'
arguments: '--build-arg SEMVERSION=$(Major).$(Minor).$(Patch)'
- job: cibuild_debug
displayName: ISAClient CI Debug
@@ -59,7 +60,7 @@ jobs:
Dockerfile: Dockerfile
buildContext:
tags: 'debug-$(Build.BuildNumber)-$(Build.SourceVersion)'
arguments: '--no-cache'
arguments: '--no-cache --build-arg SEMVERSION=$(Major).$(Minor).$(Patch)'
- task: Docker@2
displayName: 'push ISAClient Debug'
@@ -103,7 +104,7 @@ jobs:
Dockerfile: Dockerfile
buildContext:
tags: 'prod-$(Build.BuildNumber)-$(Build.SourceVersion)'
arguments: '--no-cache --build-arg IS_PRODUCTION=true'
arguments: '--no-cache --build-arg IS_PRODUCTION=true --build-arg SEMVERSION=$(Major).$(Minor).$(Patch)'
- task: Docker@2
displayName: 'push ISAClient Prod'