Initial commit
This commit is contained in:
parent
b03171597b
commit
06faadb3a4
19
Dockerfile
Normal file
19
Dockerfile
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
FROM node:14.5.0-alpine3.12 as build-deps
|
||||||
|
|
||||||
|
WORKDIR /usr/src/build
|
||||||
|
COPY package*.json ./
|
||||||
|
COPY . .
|
||||||
|
RUN npm install && npm run build
|
||||||
|
|
||||||
|
|
||||||
|
FROM node:14.5.0-alpine3.12
|
||||||
|
|
||||||
|
WORKDIR /usr/src/app
|
||||||
|
COPY package*.json ./
|
||||||
|
RUN npm install --only=production
|
||||||
|
COPY --from=build-deps /usr/src/build/dist /usr/src/app/dist
|
||||||
|
COPY public/ ./public
|
||||||
|
ENV NODE_ENV "production"
|
||||||
|
EXPOSE 3000
|
||||||
|
|
||||||
|
CMD [ "node", "dist/server.js" ]
|
||||||
36
Jenkinsfile
vendored
Normal file
36
Jenkinsfile
vendored
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
|
||||||
|
podTemplate(yaml: """
|
||||||
|
kind: Pod
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: kaniko
|
||||||
|
image: gcr.io/kaniko-project/executor:debug-539ddefcae3fd6b411a95982a830d987f4214251
|
||||||
|
imagePullPolicy: Always
|
||||||
|
command:
|
||||||
|
- /busybox/cat
|
||||||
|
tty: true
|
||||||
|
volumeMounts:
|
||||||
|
- name: jenkins-docker-cfg
|
||||||
|
mountPath: /kaniko/.docker
|
||||||
|
volumes:
|
||||||
|
- name: jenkins-docker-cfg
|
||||||
|
projected:
|
||||||
|
sources:
|
||||||
|
- secret:
|
||||||
|
name: regcred
|
||||||
|
items:
|
||||||
|
- key: .dockerconfigjson
|
||||||
|
path: config.json
|
||||||
|
"""
|
||||||
|
) {
|
||||||
|
|
||||||
|
node(POD_LABEL) {
|
||||||
|
stage('Build with Kaniko') {
|
||||||
|
git url: 'ssh://git@git.ervine.org/jonny/x86_64-alpine-slack2chat.git', credentialsId: 'jenkins-to-git'
|
||||||
|
container('kaniko') {
|
||||||
|
sh '/kaniko/executor -f `pwd`/Dockerfile -c `pwd` --cache=true --destination=harbor.ervine.dev/public/x86_64/alpine/slack2chat:14.5.0'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Loading…
Reference in New Issue
Block a user