Remove build stage

This commit is contained in:
MSWS
2023-08-27 02:09:50 -07:00
parent 2e3c15ba33
commit 716d90f503
3 changed files with 3270 additions and 28 deletions

View File

@@ -2,39 +2,15 @@ variables:
DOCKER_BUILDKIT: 1
CONTAINER_IMAGE: $CI_REGISTRY_IMAGE:$CI_COMMIT_BRANCH
services:
- docker:20.10.12-dind
stages:
- build
- publish
cache:
paths:
- node_modules/
build:
image: node:latest
stage: build
script:
- npm install
- npm run lint
- npm run build
artifacts:
untracked: false
when: on_success
expire_in: "3 days"
paths:
- dist/
tags:
- docker
publish:
image: docker:20.10.12
stage: publish
needs:
- build
stage: build
script:
- echo $CONTAINER_IMAGE
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD registry.edgegamers.io

View File

@@ -1,10 +1,14 @@
FROM node:latest
FROM node:20-slim
WORKDIR /ds-bot
COPY package*.json ./
RUN npm install
COPY . .
CMD ["node", "index.js"]
RUN npm run lint && npm run build
RUN rm -rf ./src && cp -r ./dist/* . && rm -rf ./dist
CMD ["node", "index.js"]

3264
package-lock.json generated

File diff suppressed because it is too large Load Diff