WIP: feat: jenkins push docker imagen by branch #2763
|
@ -1,6 +1,4 @@
|
|||
node_modules
|
||||
|
||||
print/node_modules
|
||||
front
|
||||
db
|
||||
e2e
|
||||
storage
|
||||
|
|
|
@ -89,8 +89,25 @@ pipeline {
|
|||
sh 'pnpm install --prefer-offline --prefix=front'
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
// stage('Push image') {
|
||||
// environment {
|
||||
// CREDENTIALS = credentials('docker-registry')
|
||||
// IMAGE = "$REGISTRY/salix-back"
|
||||
// }
|
||||
// steps {
|
||||
// script {
|
||||
// def packageJson = readJSON file: 'package.json'
|
||||
// env.VERSION = "e2e-try"
|
||||
// }
|
||||
// sh 'docker-compose build back'
|
||||
// sh 'docker login --username $CREDENTIALS_USR --password $CREDENTIALS_PSW $REGISTRY'
|
||||
// sh 'docker tag $IMAGE:$VERSION $IMAGE:$GIT_BRANCH'
|
||||
// sh 'docker push $IMAGE:$GIT_BRANCH'
|
||||
// }
|
||||
// }
|
||||
stage('Stack') {
|
||||
parallel {
|
||||
stage('Back') {
|
||||
|
|
|
@ -47,14 +47,20 @@ COPY loopback/package.json loopback/
|
|||
RUN pnpm install --prod
|
||||
|
||||
COPY loopback loopback
|
||||
RUN rm loopback/server/datasources.json && mv loopback/server/datasources.docker.json loopback/server/datasources.json
|
||||
|
||||
COPY back back
|
||||
COPY db db
|
||||
COPY .git .git
|
||||
COPY modules modules
|
||||
COPY print print
|
||||
COPY \
|
||||
LICENSE \
|
||||
README.md \
|
||||
myt.config.yml \
|
||||
./
|
||||
|
||||
|
||||
CMD ["pm2-runtime", "./back/process.yml"]
|
||||
|
||||
HEALTHCHECK --interval=15s --timeout=10s \
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
FROM docker:dind AS base
|
||||
|
||||
ENV TZ Europe/Madrid
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN apk update \
|
||||
&& apk add --update nodejs npm python3 \
|
||||
krb5-dev libressl-dev
|
||||
|
||||
RUN apk update \
|
||||
&& apk add --virtual build-dependencies \
|
||||
build-base gcc wget git
|
||||
|
||||
|
||||
RUN npm i -g pnpm
|
||||
|
||||
WORKDIR /salix
|
||||
|
||||
COPY db db
|
||||
COPY node_modules node_modules
|
||||
COPY .git .git
|
||||
COPY myt.config.yml .
|
||||
|
||||
# RUN pnpm i @verdnatura/myt
|
||||
|
||||
|
||||
FROM base AS db
|
||||
|
||||
WORKDIR /salix
|
|
@ -121,19 +121,19 @@
|
|||
"video/mp4"
|
||||
]
|
||||
},
|
||||
"supplierStorage": {
|
||||
"name": "supplierStorage",
|
||||
"connector": "loopback-component-storage",
|
||||
"provider": "filesystem",
|
||||
"root": "./storage/dms",
|
||||
"maxFileSize": "31457280",
|
||||
"allowedContentTypes": [
|
||||
"image/png",
|
||||
"image/jpeg",
|
||||
"image/jpg",
|
||||
"image/webp",
|
||||
"video/mp4",
|
||||
"application/pdf"
|
||||
"supplierStorage": {
|
||||
"name": "supplierStorage",
|
||||
"connector": "loopback-component-storage",
|
||||
"provider": "filesystem",
|
||||
"root": "./storage/dms",
|
||||
"maxFileSize": "31457280",
|
||||
"allowedContentTypes": [
|
||||
"image/png",
|
||||
"image/jpeg",
|
||||
"image/jpg",
|
||||
"image/webp",
|
||||
"video/mp4",
|
||||
"application/pdf"
|
||||
]
|
||||
},
|
||||
"accessStorage": {
|
||||
|
|
Loading…
Reference in New Issue
Volver a poner, lo que quitado para en local no tener que hacer pnpm i cada vez