巴林闲侠
1 year ago
2 changed files with 28 additions and 0 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 . /var/app |
|||
WORKDIR /var/app |
|||
RUN npm cache clean -f |
|||
RUN rm -rf package-lock.json |
|||
RUN npm install --registry http://10.8.30.22:7000 |
|||
CMD ["node", "index.js"] |
Loading…
Reference in new issue