Compare commits
4 Commits
3a04f99d31
...
f92ef51b76
Author | SHA1 | Date | |
---|---|---|---|
f92ef51b76 | |||
8e86f2db31 | |||
6d607570af | |||
aa5a0ec836 |
39
.drone.yml
39
.drone.yml
@ -14,10 +14,10 @@ get:
|
||||
|
||||
---
|
||||
kind: secret
|
||||
name: git_ssh
|
||||
name: npm_url
|
||||
get:
|
||||
path: odit-git-bot
|
||||
name: sshkey
|
||||
path: odit-npm-cache
|
||||
name: url
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
@ -34,8 +34,12 @@ steps:
|
||||
- name: run tests
|
||||
image: registry.odit.services/hub/library/node:19.0.1-alpine3.16
|
||||
commands:
|
||||
- yarn
|
||||
- yarn test:ci
|
||||
- npm config set registry $NPM_REGISTRY_URL && npm i -g pnpm@8
|
||||
- pnpm i
|
||||
- pnpm test:ci
|
||||
environment:
|
||||
NPM_REGISTRY_URL:
|
||||
from_secret: npm_url
|
||||
trigger:
|
||||
event:
|
||||
- pull_request
|
||||
@ -61,10 +65,8 @@ steps:
|
||||
password:
|
||||
from_secret: docker_password
|
||||
build_args:
|
||||
- NPM_REGISTRY_DOMAIN:
|
||||
from_secret: npmjs_domain
|
||||
- NPM_REGISTRY_TOKEN:
|
||||
from_secret: npmjs_token
|
||||
- NPM_REGISTRY_URL:
|
||||
from_secret: npm_url
|
||||
repo: lfk/mailer
|
||||
tags:
|
||||
- dev
|
||||
@ -84,13 +86,6 @@ clone:
|
||||
disable: true
|
||||
|
||||
steps:
|
||||
- name: clone
|
||||
image: alpine/git
|
||||
commands:
|
||||
- git clone $DRONE_REMOTE_URL .
|
||||
- git checkout dev
|
||||
- git merge main
|
||||
- git checkout main
|
||||
- name: build latest
|
||||
image: registry.odit.services/library/drone-kaniko
|
||||
settings:
|
||||
@ -99,10 +94,8 @@ steps:
|
||||
password:
|
||||
from_secret: docker_password
|
||||
build_args:
|
||||
- NPM_REGISTRY_DOMAIN:
|
||||
from_secret: npmjs_domain
|
||||
- NPM_REGISTRY_TOKEN:
|
||||
from_secret: npmjs_token
|
||||
- NPM_REGISTRY_URL:
|
||||
from_secret: npm_url
|
||||
repo: lfk/mailer
|
||||
tags:
|
||||
- latest
|
||||
@ -128,10 +121,8 @@ steps:
|
||||
password:
|
||||
from_secret: docker_password
|
||||
build_args:
|
||||
- NPM_REGISTRY_DOMAIN:
|
||||
from_secret: npmjs_domain
|
||||
- NPM_REGISTRY_TOKEN:
|
||||
from_secret: npmjs_token
|
||||
- NPM_REGISTRY_URL:
|
||||
from_secret: npm_url
|
||||
repo: lfk/mailer
|
||||
tags:
|
||||
- "${DRONE_TAG}"
|
||||
|
3
.gitignore
vendored
3
.gitignore
vendored
@ -137,5 +137,4 @@ build
|
||||
/docs
|
||||
lib
|
||||
/oss-attribution
|
||||
*.tmp
|
||||
pnpm-lock.yaml
|
||||
*.tmp
|
20
Dockerfile
20
Dockerfile
@ -1,16 +1,20 @@
|
||||
# Typescript Build
|
||||
FROM registry.odit.services/hub/library/node:19.0.1-alpine3.16
|
||||
FROM registry.odit.services/hub/library/node:19.0.1-alpine3.16 as build
|
||||
ARG NPM_REGISTRY_URL=https://registry.npmjs.org
|
||||
WORKDIR /app
|
||||
|
||||
COPY package.json ./
|
||||
RUN npm i -g pnpm
|
||||
RUN pnpm i
|
||||
RUN npm config set registry $NPM_REGISTRY_URL && npm i -g pnpm@8
|
||||
RUN mkdir /pnpm && pnpm config set store-dir /pnpm && pnpm i
|
||||
|
||||
COPY tsconfig.json ./
|
||||
COPY src ./src
|
||||
RUN pnpm run build
|
||||
RUN pnpm run build \
|
||||
&& rm -rf /app/node_modules \
|
||||
&& pnpm i --production --prefer-offline
|
||||
|
||||
# final image
|
||||
FROM registry.odit.services/hub/library/node:19.0.1-alpine3.16
|
||||
COPY package.json ./
|
||||
RUN npm i -g pnpm
|
||||
RUN pnpm i --prod
|
||||
COPY --from=0 /app/dist dist
|
||||
COPY --from=build /app/dist dist
|
||||
COPY --from=build /app/node_modules /app/node_modules
|
||||
ENTRYPOINT ["node", "dist/app.js"]
|
@ -95,5 +95,8 @@
|
||||
"hooks": {
|
||||
"after:bump": "npm run changelog:export && npm run licenses:export && git add CHANGELOG.md && git add licenses.md"
|
||||
}
|
||||
},
|
||||
"engines": {
|
||||
"pnpm": "8.0.0"
|
||||
}
|
||||
}
|
||||
}
|
6642
pnpm-lock.yaml
generated
Normal file
6642
pnpm-lock.yaml
generated
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user