2023-03-03 16:23:46 +01:00
|
|
|
---
|
|
|
|
#######################
|
|
|
|
# SPT DOCKER PIPELINE #
|
|
|
|
#######################
|
|
|
|
|
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: Verify Code
|
|
|
|
|
|
|
|
concurrency:
|
|
|
|
limit: 1
|
|
|
|
|
|
|
|
clone:
|
|
|
|
depth: 3
|
|
|
|
|
|
|
|
trigger:
|
|
|
|
event:
|
|
|
|
- pull_request
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Install
|
|
|
|
image: registry.sp-tarkov.com/spt/pnpm:7.25.1
|
|
|
|
volumes:
|
|
|
|
- name: cache
|
|
|
|
path: /drone/src/.pnpm-store/v3
|
|
|
|
commands:
|
|
|
|
- cd ./project
|
|
|
|
- pnpm install
|
|
|
|
|
|
|
|
- name: Run Rome
|
|
|
|
image: registry.sp-tarkov.com/spt/pnpm:7.25.1
|
|
|
|
commands:
|
|
|
|
- cd ./project
|
|
|
|
- pnpm run lint
|
|
|
|
# - npm run check:circular
|
|
|
|
|
|
|
|
# - name: Jest coverage
|
|
|
|
# image: registry.sp-tarkov.com/spt/pnpm:7.25.1
|
|
|
|
# commands:
|
|
|
|
# - cd ./project
|
|
|
|
# - pnpm run test:coverage
|
|
|
|
|
|
|
|
- name: Check that Build is not broken
|
|
|
|
image: registry.sp-tarkov.com/spt/node-wine:16
|
|
|
|
commands:
|
|
|
|
- cd ./project
|
|
|
|
- npm run build:release
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
- name: cache
|
|
|
|
host:
|
|
|
|
path: /tmp/spt-cache/pnpm_store
|
|
|
|
image_pull_secrets:
|
|
|
|
- dockerconfig
|
|
|
|
---
|
|
|
|
#######################
|
|
|
|
# SPT SONAR PIPELINE #
|
|
|
|
#######################
|
|
|
|
|
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: Sonar checks on branch
|
|
|
|
|
|
|
|
concurrency:
|
|
|
|
limit: 1
|
|
|
|
|
|
|
|
clone:
|
|
|
|
depth: 3
|
|
|
|
|
|
|
|
trigger:
|
|
|
|
event:
|
|
|
|
- push
|
|
|
|
- tag
|
|
|
|
branch:
|
2023-03-03 18:20:50 +01:00
|
|
|
- master
|
2023-03-03 16:23:46 +01:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Install
|
|
|
|
image: registry.sp-tarkov.com/spt/pnpm:7.25.1
|
|
|
|
volumes:
|
|
|
|
- name: cache
|
|
|
|
path: /drone/src/.pnpm-store/v3
|
|
|
|
commands:
|
|
|
|
- cd ./project
|
|
|
|
- pnpm install
|
|
|
|
|
|
|
|
- name: Run Rome
|
|
|
|
image: registry.sp-tarkov.com/spt/pnpm:7.25.1
|
|
|
|
commands:
|
|
|
|
- cd ./project
|
|
|
|
- pnpm run lint
|
|
|
|
# - npm run check:circular
|
|
|
|
depends_on:
|
|
|
|
- Install
|
|
|
|
when:
|
|
|
|
event:
|
|
|
|
- push
|
|
|
|
|
|
|
|
# - name: Jest coverage
|
|
|
|
# image: registry.sp-tarkov.com/spt/pnpm:7.25.1
|
|
|
|
# commands:
|
|
|
|
# - cd ./project
|
|
|
|
# - pnpm run test:coverage
|
|
|
|
# depends_on:
|
|
|
|
# - Run Rome
|
|
|
|
# when:
|
|
|
|
# event:
|
|
|
|
# - push
|
|
|
|
|
|
|
|
- name: Run Sonar scanner on push
|
|
|
|
image: sonarsource/sonar-scanner-cli:4
|
|
|
|
environment:
|
|
|
|
SONAR_PROJECT:
|
|
|
|
from_secret: SONAR_PROJECT
|
|
|
|
SONAR_URL:
|
|
|
|
from_secret: SONAR_URL
|
|
|
|
SONAR_TOKEN:
|
|
|
|
from_secret: SONAR_TOKEN
|
|
|
|
commands:
|
|
|
|
- >
|
|
|
|
sonar-scanner
|
|
|
|
-Dsonar.projectKey=$SONAR_PROJECT
|
|
|
|
-Dsonar.sources="./project/src"
|
|
|
|
-Dsonar.language="ts"
|
|
|
|
-Dsonar.host.url=$SONAR_URL
|
|
|
|
-Dsonar.login=$SONAR_TOKEN
|
|
|
|
-Dsonar.sourceEncoding="utf-8"
|
|
|
|
-Dsonar.javascript.lcov.reportPaths=./project/coverage/lcov.info
|
|
|
|
depends_on:
|
|
|
|
# - Jest coverage
|
|
|
|
- Run Rome
|
|
|
|
when:
|
|
|
|
event:
|
|
|
|
- push
|
|
|
|
|
|
|
|
- name: Check that Build is not broken
|
|
|
|
image: registry.sp-tarkov.com/spt/node-wine:16
|
|
|
|
commands:
|
|
|
|
- cd ./project
|
|
|
|
- npm run build:release
|
|
|
|
depends_on:
|
|
|
|
- Run Sonar scanner on push
|
|
|
|
when:
|
|
|
|
event:
|
|
|
|
- push
|
|
|
|
|
|
|
|
- name: Run Sonar scanner on tag
|
|
|
|
image: sonarsource/sonar-scanner-cli:4
|
|
|
|
environment:
|
|
|
|
SONAR_PROJECT:
|
|
|
|
from_secret: SONAR_PROJECT
|
|
|
|
SONAR_URL:
|
|
|
|
from_secret: SONAR_URL
|
|
|
|
SONAR_TOKEN:
|
|
|
|
from_secret: SONAR_TOKEN
|
|
|
|
commands:
|
|
|
|
- >
|
|
|
|
sonar-scanner
|
|
|
|
-Dsonar.projectKey=$SONAR_PROJECT
|
|
|
|
-Dsonar.sources="./project/src"
|
|
|
|
-Dsonar.language="ts"
|
|
|
|
-Dsonar.host.url=$SONAR_URL
|
|
|
|
-Dsonar.login=$SONAR_TOKEN
|
|
|
|
-Dsonar.sourceEncoding="utf-8"
|
|
|
|
-Dsonar.projectVersion=$DRONE_TAG
|
|
|
|
depends_on:
|
|
|
|
# - Jest coverage
|
|
|
|
- Run Rome
|
|
|
|
when:
|
|
|
|
event:
|
|
|
|
- tag
|
|
|
|
|
|
|
|
- name: Build and publish docs docker image
|
|
|
|
image: plugins/kaniko:1.6.6-kaniko1.8.1
|
|
|
|
settings:
|
|
|
|
repo: registry.sp-tarkov.com/spt/aki-docs
|
|
|
|
registry: registry.sp-tarkov.com
|
|
|
|
enable_cache: true
|
|
|
|
cache_repo: registry.sp-tarkov.com/spt/aki-docs
|
|
|
|
password:
|
|
|
|
from_secret: DOCKER_PASSWORD
|
|
|
|
username:
|
|
|
|
from_secret: DOCKER_USERNAME
|
Updated dependencies + A few other things (!150)
Initially this was going to be an update to dependencies but it seems i got a little carried away!
Anyways this PR removes 2 unused dependencies (`jshint` and `utf-8-validate`), and 2 other, `del` and `fs-extra` that were replaced by the built-in `fs/promises`.
It also renames all `tsconfig` and `Dockerfile` files, in a way that when viewed in a file tree sorted alphabetically they will be next to each other.
It also updates the typescript target to `ES2022`, and changes moduleResolution from `Node` to `Node10` (this isn't an update, they are the same thing but `Node` is now deprecated).
It also adds the `node:` discriminator to every import from built-in modules.
It also has major changes to the build script, `del` and `fs-extra` were only being used in the build script, it's now using `fs/promises` instead, cleaned up the code from some functions, adds better documentation to a few functions, and renames some gulp tasks and npm scripts to better represent what they actually do.
And finally it updates dependencies, except for `atomically` which can't be updated unless the project switches to ESM.
Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/150
Co-authored-by: TheSparta <thesparta@noreply.dev.sp-tarkov.com>
Co-committed-by: TheSparta <thesparta@noreply.dev.sp-tarkov.com>
2023-10-14 11:01:41 +02:00
|
|
|
dockerfile: project/Dockerfile.docs
|
2023-03-03 16:23:46 +01:00
|
|
|
context: project/
|
|
|
|
tags: latest
|
|
|
|
depends_on:
|
|
|
|
- Check that Build is not broken
|
|
|
|
|
|
|
|
- name: Deploy docs
|
|
|
|
image: docker:19.03.3-dind
|
|
|
|
volumes:
|
|
|
|
- name: docker_sock
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
commands:
|
|
|
|
- "docker stack deploy --compose-file project/docker-compose.yml aki-docs"
|
|
|
|
- "docker service update --force aki-docs_docs"
|
|
|
|
depends_on:
|
|
|
|
- Build and publish docs docker image
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
- name: docker_sock
|
|
|
|
host:
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
- name: cache
|
|
|
|
host:
|
|
|
|
path: /tmp/spt-cache/pnpm_store
|
|
|
|
image_pull_secrets:
|
|
|
|
- dockerconfig
|
|
|
|
---
|
|
|
|
kind: signature
|
|
|
|
hmac: 9edf557994aab21f2961498d21c6469ee3a97ec002728764f379760609fa4e4b
|
|
|
|
|
|
|
|
...
|