Browse Source

构建配置文件

dev_trial
巴林闲侠 2 years ago
parent
commit
bb53ca80dd
  1. 21
      code/VideoAccess-VCMP/script/1.3.6/data/1_batch_entry_camera/Dockerfile
  2. 18
      jenkinsfile_vcmp_script_1.3.6_data_1

21
code/VideoAccess-VCMP/script/1.3.6/data/1_batch_entry_camera/Dockerfile

@ -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"]

18
jenkinsfile_vcmp_script_1.3.6_data_1

@ -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…
Cancel
Save