2 changed files with 39 additions and 0 deletions
@ -0,0 +1,21 @@ |
|||||
|
FROM registry.cn-hangzhou.aliyuncs.com/fs-devops/node:12-dev as builder |
||||
|
|
||||
|
COPY . /var/app |
||||
|
|
||||
|
WORKDIR /var/app |
||||
|
|
||||
|
EXPOSE 8080 |
||||
|
|
||||
|
RUN npm config set registry=http://10.8.30.22:7000 |
||||
|
RUN echo "{\"time\":\"$BUILD_TIMESTAMP\",\"build\": \"$BUILD_NUMBER\",\"revision\": \"$SVN_REVISION_1\",\"URL\":\"$SVN_URL_1\"}" > version.json |
||||
|
RUN npm cache clean -f |
||||
|
RUN rm -rf package-lock.json |
||||
|
RUN npm install --registry http://10.8.30.22:7000 |
||||
|
|
||||
|
FROM registry.cn-hangzhou.aliyuncs.com/fs-devops/node:12 |
||||
|
|
||||
|
COPY --from=builder --chown=node /var/app /home/node/app |
||||
|
|
||||
|
WORKDIR /home/node/app |
||||
|
|
||||
|
CMD ["node", "server.js"] |
@ -0,0 +1,18 @@ |
|||||
|
pipeline { |
||||
|
agent { |
||||
|
node{ |
||||
|
label 'jnlp-slave' |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
stages { |
||||
|
stage('jenkinsfile_vcmp_script_1.3 ......') { |
||||
|
steps { |
||||
|
buildName "#${BUILD_NUMBER} ~/iot/${JOB_NAME}:${IMAGE_VERSION}" |
||||
|
buildDescription "harbor.anxinyun.cn/iot/${JOB_NAME}:${IMAGE_VERSION}" |
||||
|
sh 'nerdctl build -t harbor.anxinyun.cn/iot/${JOB_NAME}:${IMAGE_VERSION} ./code/VideoAccess-VCMP/script/1.3.6/data/1_batch_entry_camera' |
||||
|
sh 'nerdctl push harbor.anxinyun.cn/iot/${JOB_NAME}:${IMAGE_VERSION}' |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
Loading…
Reference in new issue