wenlele
2 years ago
16 changed files with 249 additions and 121 deletions
@ -0,0 +1,21 @@ |
|||||
|
podTemplate { |
||||
|
node('pod-templ-jenkins-slave-common') { |
||||
|
|
||||
|
env.IMAGE_NAME = "${IOT_IMAGES_REGISTRY}/${SMARTCITY}/${JOB_NAME}" |
||||
|
env.IMAGE_NAME_SHORT = "${SMARTCITY}/${JOB_NAME}" |
||||
|
env.CODE_ADDR = "${GIT_ADDRESS}/free-sun/Highways4Good.git" |
||||
|
|
||||
|
stage('Run shell') { |
||||
|
git branch: 'dev', credentialsId: 'gitea-builder', url: "${CODE_ADDR}" |
||||
|
|
||||
|
container('image-builder') { |
||||
|
sh''' |
||||
|
/kaniko/executor --context=${BUILD_WORKSPACE} --dockerfile=./scripts/1.3.1/data/1_insert_report_data/Dockerfilenew --destination=${IMAGE_NAME}:${IMAGE_VERSION} --cache=false --cleanup |
||||
|
''' |
||||
|
} |
||||
|
|
||||
|
buildName "${IMAGE_NAME_SHORT}:${IMAGE_VERSION}" |
||||
|
buildDescription "${IMAGE_NAME}:${IMAGE_VERSION}" |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,7 @@ |
|||||
|
FROM repository.anxinyun.cn/base-images/nodejs12:20.10.12.2 |
||||
|
COPY ./scripts/1.3.1/data/1_insert_report_data /var/app |
||||
|
WORKDIR /var/app |
||||
|
RUN npm cache clean -f |
||||
|
RUN rm -rf package-lock.json |
||||
|
RUN npm install --registry https://nexus.ngaiot.com/repository/fs-npm/ |
||||
|
CMD ["node", "index.js"] |
Loading…
Reference in new issue