Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# yaml-language-server: $schema=https://json.schemastore.org/dependabot-2.0.json
version: 2
updates:
# deps
- package-ecosystem: npm
target-branch: 'master'
schedule:
interval: weekly
allow:
- dependency-type: production
directory: /
commit-message:
prefix: 'deps'
groups:
map-colonies:
patterns:
- '@map-colonies/*'
opentelemetry:
patterns:
- '@opentelemetry/*'
patch:
update-types:
- patch
# dev-deps
- package-ecosystem: npm
schedule:
interval: weekly
allow:
- dependency-type: development
directory: /
commit-message:
prefix: 'devdeps'
groups:
map-colonies:
patterns:
- '@map-colonies/*'
opentelemetry:
patterns:
- '@opentelemetry/*'
types:
patterns:
- '@types/*'
dev-patch:
update-types:
- patch

# github deps
- package-ecosystem: github-actions
schedule:
interval: weekly
commit-message:
prefix: 'ci'
directory: '/'
68 changes: 47 additions & 21 deletions .github/workflows/build-and-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,53 @@ on:
tags:
- 'v*'

workflow_dispatch:
inputs:
version:
required: true
type: string
env:
HELM_EXPERIMENTAL_OCI: 1
jobs:
build_and_push:
runs-on: ubuntu-latest
steps:
- name: Artifactory Login
uses: MapColonies/shared-workflows/actions/artifactory-login@artifactory-login-v1.0.0
with:
registry: ${{ secrets.ACR_URL }}
username: ${{ secrets.ACR_PUSH_USER }}
password: ${{ secrets.ACR_PUSH_TOKEN }}

permissions:
contents: write
pull-requests: write
- name: Build Docker Image
id: build
uses: MapColonies/shared-workflows/actions/build-docker@build-docker-v1.1.0
with:
domain: raster
registry: ${{ secrets.ACR_URL }}

jobs:
build_and_push_docker:
uses: MapColonies/shared-workflows/.github/workflows/build-and-push-docker.yaml@v2
secrets: inherit
with:
scope: raster
- name: Push Docker Image
uses: MapColonies/shared-workflows/actions/push-docker@push-docker-v1.0.1
with:
image_name: ${{ steps.build.outputs.docker_image_full_name }}
image_tag: ${{ steps.build.outputs.docker_image_tag }}

- name: Build and Push Helm Chart
uses: MapColonies/shared-workflows/actions/build-and-push-helm@build-and-push-helm-v1.0.1
with:
context: ./helm
domain: raster
registry: ${{ secrets.ACR_URL }}

- name: Update Artifacts File- Docker
uses: MapColonies/shared-workflows/actions/update-artifacts-file@update-artifacts-file-v1.1.1
with:
domain: raster
artifact_name: ${{ github.event.repository.name }}
artifact_tag: ${{ github.ref_name }}
type: docker
registry: ${{ secrets.ACR_URL }}
github_token: ${{ secrets.GH_PAT }}

build_and_push_helm:
uses: MapColonies/shared-workflows/.github/workflows/build-and-push-helm.yaml@v2
secrets: inherit
with:
scope: raster
- name: Update Artifacts File- Helm
uses: MapColonies/shared-workflows/actions/update-artifacts-file@update-artifacts-file-v1.1.1
with:
domain: raster
artifact_name: ${{ github.event.repository.name }}
artifact_tag: ${{ github.ref_name }}
type: helm
registry: ${{ secrets.ACR_URL }}
github_token: ${{ secrets.GH_PAT }}
76 changes: 72 additions & 4 deletions .github/workflows/pull_request.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,76 @@
name: pull_request

on: [pull_request]

jobs:
pull_request:
uses: MapColonies/shared-workflows/.github/workflows/pull_request.yaml@v5
secrets: inherit
eslint:
name: Run TS Project eslint
runs-on: ubuntu-latest
strategy: &node-strategy
matrix:
node: [24.x]

steps:
- name: Run TS Project linters
uses: MapColonies/shared-workflows/actions/eslint@eslint-v1.0.1
with:
node_version: ${{ matrix.node }}

helm-lint:
name: Run Helm lint Check
runs-on: ubuntu-latest

steps:
- name: Check out TS Project Git repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Helm Lint Checks
uses: MapColonies/shared-workflows/actions/helm-lint@helm-lint-v1

openapi-lint:
name: Run OpenAPI lint Check
runs-on: ubuntu-latest

strategy: *node-strategy

steps:
- name: Check out TS Project Git repository
uses: actions/checkout@v4

- name: Init Nodejs
uses: MapColonies/shared-workflows/actions/init-npm@init-npm-v1
with:
node-version: ${{ matrix.node }}

- name: Lint OpenAPI
run: npx @redocly/cli lint --format=github-actions ./openapi3.yaml

tests:
name: Run Tests
runs-on: ubuntu-latest

strategy: *node-strategy

steps:
- name: Check out TS Project Git repository
uses: actions/checkout@v4

- name: Init Nodejs
uses: MapColonies/shared-workflows/actions/init-npm@init-npm-v1
with:
node-version: ${{ matrix.node }}

- name: Run tests
run: npm run test

- uses: actions/upload-artifact@v4
with:
name: Test Reporters ${{ matrix.node }}
path: ./reports/**

build_docker_image:
runs-on: ubuntu-latest
steps:
- name: Build and Push Docker image
uses: docker/build-push-action@v6
4 changes: 1 addition & 3 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ on:
push:
branches:
- master
workflow_dispatch:

permissions:
contents: write
Expand All @@ -15,7 +16,4 @@ jobs:
steps:
- uses: googleapis/release-please-action@v4
with:
# this assumes that you have created a personal access token
# (PAT) and configured it as a GitHub action secret named
# `MY_RELEASE_PLEASE_TOKEN` (this secret name is not important).
token: ${{ secrets.GH_PAT }}
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v20
v24
23 changes: 11 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,34 +1,33 @@
FROM node:20 as build


FROM node:24-slim AS build
WORKDIR /tmp/buildApp

COPY ./package*.json ./
COPY .husky/ .husky/

RUN npm install
COPY . .
RUN npm run build

FROM node:20.3.1-alpine3.17 as production

RUN apk add dumb-init

# Production stage with GDAL setup
FROM node:24-slim AS production
RUN apt-get update && apt-get install -y --no-install-recommends \
dumb-init \
gdal-bin \
&& rm -rf /var/lib/apt/lists/*
ENV NODE_ENV=production
ENV SERVER_PORT=8080


WORKDIR /usr/src/app

COPY --chown=node:node package*.json ./
COPY .husky/ .husky/



RUN npm ci --only=production

COPY --chown=node:node --from=build /tmp/buildApp/dist .
COPY --chown=node:node ./config ./config


USER node
EXPOSE 8080
CMD ["dumb-init", "node", "--import", "./instrumentation.mjs", "./index.js"]

CMD ["dumb-init", "node", "--require", "./common/tracing.js", "./index.js"]
3 changes: 1 addition & 2 deletions openapi3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ info:
license:
name: MIT
url: https://opensource.org/licenses/MIT
security: []
paths:
/storage:
get:
Expand Down Expand Up @@ -119,8 +120,6 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
security:
- {}
components:
requestBodies:
ExportByRoiBody:
Expand Down
Loading