Compare commits

..

No commits in common. "f92ef51b762af83e9bd72d04ee2a9347c2b105a1" and "3a04f99d31b4441af5519aa0ed3fd7a6634980f5" have entirely different histories.

5 changed files with 35 additions and 6674 deletions

View File

@ -14,10 +14,10 @@ get:
--- ---
kind: secret kind: secret
name: npm_url name: git_ssh
get: get:
path: odit-npm-cache path: odit-git-bot
name: url name: sshkey
--- ---
kind: pipeline kind: pipeline
@ -34,12 +34,8 @@ steps:
- name: run tests - name: run tests
image: registry.odit.services/hub/library/node:19.0.1-alpine3.16 image: registry.odit.services/hub/library/node:19.0.1-alpine3.16
commands: commands:
- npm config set registry $NPM_REGISTRY_URL && npm i -g pnpm@8 - yarn
- pnpm i - yarn test:ci
- pnpm test:ci
environment:
NPM_REGISTRY_URL:
from_secret: npm_url
trigger: trigger:
event: event:
- pull_request - pull_request
@ -65,8 +61,10 @@ steps:
password: password:
from_secret: docker_password from_secret: docker_password
build_args: build_args:
- NPM_REGISTRY_URL: - NPM_REGISTRY_DOMAIN:
from_secret: npm_url from_secret: npmjs_domain
- NPM_REGISTRY_TOKEN:
from_secret: npmjs_token
repo: lfk/mailer repo: lfk/mailer
tags: tags:
- dev - dev
@ -86,6 +84,13 @@ clone:
disable: true disable: true
steps: steps:
- name: clone
image: alpine/git
commands:
- git clone $DRONE_REMOTE_URL .
- git checkout dev
- git merge main
- git checkout main
- name: build latest - name: build latest
image: registry.odit.services/library/drone-kaniko image: registry.odit.services/library/drone-kaniko
settings: settings:
@ -94,8 +99,10 @@ steps:
password: password:
from_secret: docker_password from_secret: docker_password
build_args: build_args:
- NPM_REGISTRY_URL: - NPM_REGISTRY_DOMAIN:
from_secret: npm_url from_secret: npmjs_domain
- NPM_REGISTRY_TOKEN:
from_secret: npmjs_token
repo: lfk/mailer repo: lfk/mailer
tags: tags:
- latest - latest
@ -121,8 +128,10 @@ steps:
password: password:
from_secret: docker_password from_secret: docker_password
build_args: build_args:
- NPM_REGISTRY_URL: - NPM_REGISTRY_DOMAIN:
from_secret: npm_url from_secret: npmjs_domain
- NPM_REGISTRY_TOKEN:
from_secret: npmjs_token
repo: lfk/mailer repo: lfk/mailer
tags: tags:
- "${DRONE_TAG}" - "${DRONE_TAG}"

3
.gitignore vendored
View File

@ -137,4 +137,5 @@ build
/docs /docs
lib lib
/oss-attribution /oss-attribution
*.tmp *.tmp
pnpm-lock.yaml

View File

@ -1,20 +1,16 @@
# Typescript Build # Typescript Build
FROM registry.odit.services/hub/library/node:19.0.1-alpine3.16 as build FROM registry.odit.services/hub/library/node:19.0.1-alpine3.16
ARG NPM_REGISTRY_URL=https://registry.npmjs.org
WORKDIR /app WORKDIR /app
COPY package.json ./ COPY package.json ./
RUN npm config set registry $NPM_REGISTRY_URL && npm i -g pnpm@8 RUN npm i -g pnpm
RUN mkdir /pnpm && pnpm config set store-dir /pnpm && pnpm i RUN pnpm i
COPY tsconfig.json ./ COPY tsconfig.json ./
COPY src ./src COPY src ./src
RUN pnpm run build \ RUN pnpm run build
&& rm -rf /app/node_modules \
&& pnpm i --production --prefer-offline
# final image # final image
FROM registry.odit.services/hub/library/node:19.0.1-alpine3.16 FROM registry.odit.services/hub/library/node:19.0.1-alpine3.16
COPY --from=build /app/dist dist COPY package.json ./
COPY --from=build /app/node_modules /app/node_modules RUN npm i -g pnpm
RUN pnpm i --prod
COPY --from=0 /app/dist dist
ENTRYPOINT ["node", "dist/app.js"] ENTRYPOINT ["node", "dist/app.js"]

View File

@ -95,8 +95,5 @@
"hooks": { "hooks": {
"after:bump": "npm run changelog:export && npm run licenses:export && git add CHANGELOG.md && git add licenses.md" "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

File diff suppressed because it is too large Load Diff