Compare commits

...

6 Commits

Author SHA1 Message Date
6275aaa326 Switched ci over to pnpm + cache
Some checks failed
continuous-integration/drone/pr Build was killed
continuous-integration/drone/push Build is failing
2023-03-29 19:56:05 +02:00
2a94bfa622 pinned pnpm version 2023-03-29 19:53:42 +02:00
a64f6c9822 COPY by stage name 2023-03-29 19:52:59 +02:00
93d43b7684 Switched dockerfile to pnpm 8 with cache 2023-03-29 19:52:31 +02:00
16ce0a8480 🚀Bumped version to v0.14.3
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-18 22:15:02 +01:00
9a8d618ae4 Adjusted modulo for new fixed card length 2023-03-18 22:14:50 +01:00
5 changed files with 37 additions and 22 deletions

View File

@@ -26,6 +26,13 @@ get:
path: odit-ci-bot
name: apikey
---
kind: secret
name: npm_url
get:
path: odit-npm-cache
name: url
---
kind: pipeline
type: kubernetes
@@ -41,8 +48,9 @@ steps:
- name: run tests
image: registry.odit.services/hub/library/node:19.5.0-alpine3.16
commands:
- yarn
- yarn test:ci
- npm config set registry $NPM_REGISTRY_URL && npm i -g pnpm@8
- pnpm i
- pnpm test:ci
trigger:
event:
- pull_request
@@ -69,10 +77,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/backend
tags:
- dev
@@ -109,10 +115,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/backend
tags:
- latest
@@ -149,10 +153,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/backend
tags:
- "${DRONE_TAG}"

View File

@@ -2,8 +2,15 @@
All notable changes to this project will be documented in this file. Dates are displayed in UTC.
#### [v0.14.3](https://git.odit.services/lfk/backend/compare/v0.14.2...v0.14.3)
- Adjusted modulo for new fixed card length [`9a8d618`](https://git.odit.services/lfk/backend/commit/9a8d618ae4584640e8be1ce9fe4bddd2ef7a92ae)
#### [v0.14.2](https://git.odit.services/lfk/backend/compare/v0.14.1...v0.14.2)
> 18 March 2023
- 🚀Bumped version to v0.14.2 [`38da2d3`](https://git.odit.services/lfk/backend/commit/38da2d33187f4b24eef878642e153663ecd95de1)
- Back to modulo [`068deb4`](https://git.odit.services/lfk/backend/commit/068deb4960bd16decf99887ffbda7a7d3dd9ff0b)
#### [v0.14.1](https://git.odit.services/lfk/backend/compare/v0.14.0...v0.14.1)

View File

@@ -1,15 +1,18 @@
# Typescript Build
FROM registry.odit.services/hub/library/node:19.5.0-alpine3.16
FROM registry.odit.services/hub/library/node:19.5.0-alpine3.16 as build
ARG NPM_REGISTRY_URL=https://registry.npmjs.org
WORKDIR /app
COPY package.json ./
RUN npx pnpm@7.26.3 i
RUN npm config set registry $NPM_REGISTRY_URL && npm i -g pnpm@8 && pnpm i
COPY tsconfig.json ormconfig.js ./
COPY src ./src
RUN npm run build
RUN pnpm build
# final image
FROM registry.odit.services/hub/library/node:19.5.0-alpine3.16
FROM registry.odit.services/hub/library/node:19.5.0-alpine3.16 as final
COPY package.json ormconfig.js ./
RUN npx pnpm@7.26.3 i --prod
COPY --from=0 /app/dist dist
COPY --from=build /app/dist dist
ENTRYPOINT ["node", "dist/app.js"]

View File

@@ -1,8 +1,11 @@
{
"name": "@odit/lfk-backend",
"version": "0.14.2",
"version": "0.14.3",
"main": "src/app.ts",
"repository": "https://git.odit.services/lfk/backend",
"engines": {
"pnpm": "8.0.0"
},
"author": {
"name": "ODIT.Services",
"email": "info@odit.services",
@@ -111,4 +114,4 @@
"docs/*"
]
}
}
}

View File

@@ -57,7 +57,7 @@ export class CreateTrackScan {
* @returns The runnerCard whom's id you provided.
*/
public async getCard(): Promise<RunnerCard> {
const id = this.card % 20000000;
const id = this.card % 2000000;
const runnerCard = await getConnection().getRepository(RunnerCard).findOne({ id: id }, { relations: ["runner"] });
if (!runnerCard) {
throw new RunnerCardNotFoundError();