wenlele 2 years ago
parent
commit
52ca9e0c5d
  1. 2
      code/web/Dockerfile
  2. 8
      jenkinsfile_web

2
code/web/Dockerfile

@ -15,7 +15,7 @@ RUN rm -rf client/src
RUN rm -rf node_modules RUN rm -rf node_modules
RUN npm install --production --registry http://10.8.30.22:7000 RUN npm install --production --registry http://10.8.30.22:7000
FROM registry.cn-hangzhou.aliyuncs.com/fs-devops/node-16:7.22-06-20 FROM registry.cn-hangzhou.aliyuncs.com/fs-devops/node-12
COPY --from=builder --chown=node /var/app /home/node/app COPY --from=builder --chown=node /var/app /home/node/app

8
jenkinsfile_web

@ -8,10 +8,10 @@ pipeline {
stages { stages {
stage('Testing site......') { stage('Testing site......') {
steps { steps {
buildName "#${BUILD_NUMBER} ~/fs-edge/${JOB_NAME}:${IMAGE_VERSION}" buildName "#${BUILD_NUMBER} ~/iot/${JOB_NAME}:${IMAGE_VERSION}"
buildDescription "harbor.anxinyun.cn/edge/${JOB_NAME}:${IMAGE_VERSION}" buildDescription "harbor.anxinyun.cn/iot/${JOB_NAME}:${IMAGE_VERSION}"
sh 'nerdctl build -t harbor.anxinyun.cn/edge/${JOB_NAME}:${IMAGE_VERSION} ./code/web' sh 'nerdctl build -t harbor.anxinyun.cn/iot/${JOB_NAME}:${IMAGE_VERSION} ./code/web'
sh 'nerdctl build -t harbor.anxinyun.cn/edge/${JOB_NAME}:${IMAGE_VERSION}' sh 'nerdctl build -t harbor.anxinyun.cn/iot/${JOB_NAME}:${IMAGE_VERSION}'
} }
} }
} }

Loading…
Cancel
Save