Compare commits
7
Commits
v0.6.2
..
8f3faee573
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8f3faee573
|
||
|
|
6ff2ba702b
|
||
|
|
4ecefe8534
|
||
|
|
ab9295ee23
|
||
|
|
29d4e21656
|
||
|
|
490f24422b
|
||
|
|
67eb761a99
|
+17
-16
@@ -19,6 +19,13 @@ get:
|
||||
path: odit-git-bot
|
||||
name: sshkey
|
||||
|
||||
---
|
||||
kind: secret
|
||||
name: npm_url
|
||||
get:
|
||||
path: odit-npm-cache
|
||||
name: url
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
type: kubernetes
|
||||
@@ -30,7 +37,7 @@ steps:
|
||||
- name: clone
|
||||
image: alpine/git
|
||||
commands:
|
||||
- git clone $DRONE_REMOTE_URL .
|
||||
- git clone $CI_REPO_CLONE_URL .
|
||||
- git checkout dev
|
||||
- name: build dev
|
||||
depends_on: ["clone"]
|
||||
@@ -41,10 +48,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/document-server
|
||||
tags:
|
||||
- dev
|
||||
@@ -67,7 +72,7 @@ steps:
|
||||
- name: clone
|
||||
image: alpine/git
|
||||
commands:
|
||||
- git clone $DRONE_REMOTE_URL .
|
||||
- git clone $CI_REPO_CLONE_URL .
|
||||
- git checkout dev
|
||||
- name: build dev
|
||||
depends_on: ["clone"]
|
||||
@@ -78,10 +83,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/document-server
|
||||
tags:
|
||||
- latest
|
||||
@@ -100,7 +103,7 @@ type: kubernetes
|
||||
name: build:tags
|
||||
|
||||
steps:
|
||||
- name: build $DRONE_TAG
|
||||
- name: build $CI_COMMIT_TAG
|
||||
depends_on: ["clone"]
|
||||
image: registry.odit.services/library/drone-kaniko
|
||||
settings:
|
||||
@@ -109,13 +112,11 @@ 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/document-server
|
||||
tags:
|
||||
- "${DRONE_TAG}"
|
||||
- "${CI_COMMIT_TAG}"
|
||||
cache: true
|
||||
registry: registry.odit.services
|
||||
trigger:
|
||||
|
||||
+7
-4
@@ -1,14 +1,17 @@
|
||||
# Typescript Build
|
||||
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@7.29.3
|
||||
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 build \
|
||||
&& rm -rf /app/node_modules \
|
||||
&& pnpm i --production --prefer-offline
|
||||
&& pnpm i --production --frozen-lockfile
|
||||
|
||||
# final image
|
||||
FROM registry.odit.services/hub/library/alpine:3.16
|
||||
|
||||
Generated
+792
-777
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user